Bug#329980: marked as done (Please include patch for antlr 2.7.5 from Hibernate 3 project)

Debian Bug Tracking System owner at bugs.debian.org
Tue Jan 24 23:03:53 UTC 2006


Your message dated Tue, 24 Jan 2006 14:47:08 -0800
with message-id <E1F1WwO-0005cp-4x at spohr.debian.org>
and subject line Bug#329980: fixed in antlr 2.7.6-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 24 Sep 2005 22:00:15 +0000
>From barry at bytemason.org Sat Sep 24 15:00:15 2005
Return-path: <barry at bytemason.org>
Received: from pollock.hmdnsgroup.com [63.247.129.26] 
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EJI47-0007ZP-00; Sat, 24 Sep 2005 15:00:15 -0700
Received: from dsl027-161-197.atl1.dsl.speakeasy.net ([216.27.161.197] helo=[192.168.1.13])
	by pollock.hmdnsgroup.com with esmtpa (Exim 4.52)
	id 1EJI45-0000tB-En
	for submit at bugs.debian.org; Sat, 24 Sep 2005 18:00:14 -0400
Message-ID: <4335CC63.1020002 at bytemason.org>
Date: Sat, 24 Sep 2005 18:00:03 -0400
From: Barry Hawkins <barry at bytemason.org>
User-Agent: Debian Thunderbird 1.0.6 (X11/20050802)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: Please include patch for antlr 2.7.5 from Hibernate 3 project
X-Enigmail-Version: 0.92.0.0
Content-Type: multipart/mixed;
 boundary="------------040407000903080005060302"
X-HMDNSGroup-MailScanner-Information: Please contact the ISP for more information
X-HMDNSGroup-MailScanner: Found to be clean
X-MailScanner-From: barry at bytemason.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - pollock.hmdnsgroup.com
X-AntiAbuse: Original Domain - bugs.debian.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - bytemason.org
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_01,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

This is a multi-part message in MIME format.
--------------040407000903080005060302
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: antlr
Version: 2.7.5-8
Severity: wishlist

The Hibernate project[0] ran into issues with ANTLR 2.7.5 which resulted
in them submitting a patch to the ANTLR upstream project which is
scheduled to be included in 2.7.6; however, 2.7.6 has not come yet.  The
patch can be found in the Hibernate JIRA system, issue #HHH-218[1].
This patch (or 2.7.6) is a dependency for Hibernate.  I would like to
see this patch applied for 2.7.5, as it is something that is supposed to
be included in 2.7.6.

I am also willing to do the work to implement this.

[0] - http://www.hibernate.org
[1] - http://opensource2.atlassian.com/projects/hibernate/browse/HHH-218

Regards,
- --
Barry Hawkins
site: www.bytemason.org
weblog: www.yepthatsme.com

Registered Linux User #368650
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDNcxjHuKcDICy0QoRAglEAJ9uc5FaK7tP5JvANydKDLqEI08L4QCg9edc
EKa9aroa/t1zF6UMn7BfCXE=
=i83z
-----END PGP SIGNATURE-----

--------------040407000903080005060302
Content-Type: text/x-patch;
 name="antlr-2.7.5H3.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="antlr-2.7.5H3.patch"

diff -ruN ./antlr/ASTFactory.java ../antlr-2.7.5-patched/antlr/ASTFactory.java
--- ./antlr/ASTFactory.java	Sat Mar 26 03:57:51 2005
+++ ../antlr-2.7.5-patched/antlr/ASTFactory.java	Thu Sep 22 16:23:43 2005
@@ -89,7 +89,7 @@
 		}
 		Class c = null;
 		try {
-			c = Class.forName(className);
+			c = ReflectHelper.classForName(className);
 			tokenTypeToASTClassMap.put(new Integer(tokenType), c);
 		}
 		catch (Exception e) {
@@ -217,7 +217,7 @@
 	public AST create(String className) {
 		Class c = null;
 		try {
-			c = Class.forName(className);
+			c = ReflectHelper.classForName(className);
 		}
 		catch (Exception e) {
 			throw new IllegalArgumentException("Invalid class, "+className);
@@ -232,7 +232,7 @@
 		Class c = null;
 		AST t = null;
 		try {
-			c = Class.forName(className);
+			c = ReflectHelper.classForName(className);
 			Class[] tokenArgType = new Class[] { antlr.Token.class };
 			try {
 				Constructor ctor = c.getConstructor(tokenArgType);
@@ -375,7 +375,7 @@
     public void setASTNodeClass(String t) {
         theASTNodeType = t;
         try {
-            theASTNodeTypeClass = Class.forName(t); // get class def
+            theASTNodeTypeClass = ReflectHelper.classForName(t);; // get class def
         }
         catch (Exception e) {
             // either class not found,
diff -ruN ./antlr/CharScanner.java ../antlr-2.7.5-patched/antlr/CharScanner.java
--- ./antlr/CharScanner.java	Sat Mar 26 03:57:51 2005
+++ ../antlr-2.7.5-patched/antlr/CharScanner.java	Thu Sep 22 16:23:43 2005
@@ -334,7 +334,7 @@
 
     public void setTokenObjectClass(String cl) {
         try {
-            tokenObjectClass = Class.forName(cl);
+            tokenObjectClass = ReflectHelper.classForName(cl);
         }
         catch (ClassNotFoundException ce) {
             panic("ClassNotFoundException: " + cl);
diff -ruN ./antlr/ReflectHelper.java ../antlr-2.7.5-patched/antlr/ReflectHelper.java
--- ./antlr/ReflectHelper.java	Wed Dec 31 18:00:00 1969
+++ ../antlr-2.7.5-patched/antlr/ReflectHelper.java	Thu Sep 22 16:07:30 2005
@@ -0,0 +1,45 @@
+// NOTE:  During decompile, Jad displayed the following messages:
+// Parsing ReflectHelper.class... Generating ReflectHelper.jad
+// Couldn't fully decompile method classForName
+// Couldn't resolve all exception handlers in method classForName
+
+// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
+// Jad home page: http://www.kpdus.com/jad.html
+// Decompiler options: packimports(3) 
+// Source File Name:   ReflectHelper.java
+
+package antlr;
+
+
+public final class ReflectHelper
+{
+
+// Due to decompile problems mentioned above, the original classForName
+// method generated by Jad has been commented out here and replaced by
+// code that makes a bit more sense (dead code removed).
+//
+//    public static Class classForName(String s)
+//        throws ClassNotFoundException
+//    {
+//        ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+//        if(classloader != null)
+//            return classloader.loadClass(s);
+//        return Class.forName(s);
+//        Exception exception;
+//        exception;
+//        return Class.forName(s);
+//    }
+
+    public static Class classForName(String s)
+        throws ClassNotFoundException
+    {
+        ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+        if(classloader != null)
+            return classloader.loadClass(s);
+        return Class.forName(s);
+    }
+
+    private ReflectHelper()
+    {
+    }
+}
diff -ruN ./antlr/Tool.java ../antlr-2.7.5-patched/antlr/Tool.java
--- ./antlr/Tool.java	Sat Mar 26 03:57:51 2005
+++ ../antlr-2.7.5-patched/antlr/Tool.java	Thu Sep 22 16:23:43 2005
@@ -246,7 +246,7 @@
             //      (necessary for VAJ interface)
             String codeGenClassName = "antlr." + getLanguage(behavior) + "CodeGenerator";
             try {
-                Class codeGenClass = Class.forName(codeGenClassName);
+                Class codeGenClass = ReflectHelper.classForName(codeGenClassName);
                 codeGen = (CodeGenerator)codeGenClass.newInstance();
                 codeGen.setBehavior(behavior);
                 codeGen.setAnalyzer(analyzer);
@@ -303,9 +303,9 @@
      int argslen = initargs.length;
      Class cl[] = new Class[argslen];
      for (int i=0;i&lt;argslen;i++) {
-     cl[i] = Class.forName(initargs[i].getClass().getName());
+     cl[i] = ReflectHelper.classForName(initargs[i].getClass().getName());
      }
-     c = Class.forName (p);
+     c = ReflectHelper.classForName (p);
      Constructor con = c.getConstructor (cl);
      o = con.newInstance (initargs);
      } catch (Exception e) {
@@ -318,7 +318,7 @@
         Class c;
         Object o = null;
         try {
-            c = Class.forName(p);// get class def
+            c = ReflectHelper.classForName(p);// get class def
             o = c.newInstance(); // make a new one
         }
         catch (Exception e) {
diff -ruN ./antlr/build/Tool.java ../antlr-2.7.5-patched/antlr/build/Tool.java
--- ./antlr/build/Tool.java	Sat Mar 26 03:57:51 2005
+++ ../antlr-2.7.5-patched/antlr/build/Tool.java	Thu Sep 22 16:23:43 2005
@@ -3,6 +3,8 @@
 import java.io.*;
 import java.lang.reflect.*;
 
+import antlr.ReflectHelper;
+
 /** An application-specific build tool for ANTLR.  Old build
  *  was a shell script that of course is not portable.  All it
  *  did though was to compile; this Java program is a portable
@@ -74,14 +76,14 @@
         Method m = null;
         Object appObj = null;
         try {
-            c = Class.forName(app);
+            c = ReflectHelper.classForName(app);
             appObj = c.newInstance();
         }
         catch (Exception e) {
             // try again with antlr.build.app
             try {
                 if ( !app.startsWith("antlr.build.") ) {
-                    c = Class.forName("antlr.build."+app);
+                    c = ReflectHelper.classForName("antlr.build."+app);
                 }
                 error("no such application "+app, e);
             }
diff -ruN ./antlr/debug/LLkDebuggingParser.java ../antlr-2.7.5-patched/antlr/debug/LLkDebuggingParser.java
--- ./antlr/debug/LLkDebuggingParser.java	Sat Mar 26 03:57:51 2005
+++ ../antlr-2.7.5-patched/antlr/debug/LLkDebuggingParser.java	Thu Sep 22 16:23:43 2005
@@ -1,6 +1,7 @@
 package antlr.debug;
 
 import antlr.ParserSharedInputState;
+import antlr.ReflectHelper;
 import antlr.TokenStreamException;
 import antlr.LLkParser;
 import antlr.TokenBuffer;
@@ -212,13 +213,13 @@
 		// default parser debug setup is ParseView
 		try {
 			try {
-				Class.forName("javax.swing.JButton");
+				ReflectHelper.classForName("javax.swing.JButton");
 			}
 			catch (ClassNotFoundException e) {
 				System.err.println("Swing is required to use ParseView, but is not present in your CLASSPATH");
 				System.exit(1);
 			}
-			Class c = Class.forName("antlr.parseview.ParseView");
+			Class c = ReflectHelper.classForName("antlr.parseview.ParseView");
 			Constructor constructor = c.getConstructor(new Class[] {LLkDebuggingParser.class, TokenStream.class, TokenBuffer.class});
 			constructor.newInstance(new Object[] {this, lexer, tokenBuf});
 		}

--------------040407000903080005060302--

---------------------------------------
Received: (at 329980-close) by bugs.debian.org; 24 Jan 2006 22:50:31 +0000
>From katie at ftp-master.debian.org Tue Jan 24 14:50:31 2006
Return-path: <katie at ftp-master.debian.org>
Received: from katie by spohr.debian.org with local (Exim 4.50)
	id 1F1WwO-0005cp-4x; Tue, 24 Jan 2006 14:47:08 -0800
From: Michael Koch <konqueror at gmx.de>
To: 329980-close at bugs.debian.org
X-Katie: $Revision: 1.65 $
Subject: Bug#329980: fixed in antlr 2.7.6-1
Message-Id: <E1F1WwO-0005cp-4x at spohr.debian.org>
Sender: Archive Administrator <katie at ftp-master.debian.org>
Date: Tue, 24 Jan 2006 14:47:08 -0800
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 4

Source: antlr
Source-Version: 2.7.6-1

We believe that the bug you reported is fixed in the latest version of
antlr, which is due to be installed in the Debian FTP archive:

antlr_2.7.6-1.diff.gz
  to pool/main/a/antlr/antlr_2.7.6-1.diff.gz
antlr_2.7.6-1.dsc
  to pool/main/a/antlr/antlr_2.7.6-1.dsc
antlr_2.7.6-1_all.deb
  to pool/main/a/antlr/antlr_2.7.6-1_all.deb
antlr_2.7.6.orig.tar.gz
  to pool/main/a/antlr/antlr_2.7.6.orig.tar.gz
cantlr_2.7.6-1_i386.deb
  to pool/main/a/antlr/cantlr_2.7.6-1_i386.deb
libantlr-dev_2.7.6-1_i386.deb
  to pool/main/a/antlr/libantlr-dev_2.7.6-1_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 329980 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Koch <konqueror at gmx.de> (supplier of updated antlr package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 24 Jan 2006 23:12:32 +0000
Source: antlr
Binary: antlr cantlr libantlr-dev
Architecture: source all i386
Version: 2.7.6-1
Distribution: unstable
Urgency: low
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Changed-By: Michael Koch <konqueror at gmx.de>
Description: 
 antlr      - language tool for constructing recognizers, compilers etc
 cantlr     - language tool for constructing recognizers, compilers etc
 libantlr-dev - language tool for constructing recognizers, compilers etc
Closes: 308356 317373 329980 336622 340049
Changes: 
 antlr (2.7.6-1) unstable; urgency=low
 .
   * New upstream release
     - Works with hibernate (Closes: #329980)
     - Removed two files from orig upstream tarball. See debian/README.source
       (Closes: #340049).
   * debian/control: libantlr-dev: Removed Depends on build essential packages
     libc6-dev and libstdc++5-3.3-dev (Closes: #317373).
   * Added antlr-config script to libantlr-dev (Closes: #336622).
   * Inluded python module in antlr package (Closes: #308356).
   * Cleaned up debian/rules.
Files: 
 5fe407c709d9e71ca6e4ca266aa10886 846 devel optional antlr_2.7.6-1.dsc
 df64b76a67f96bc3651d56a1af93ce9a 1806556 devel optional antlr_2.7.6.orig.tar.gz
 18ee9ce217f550fc70760068be3036e8 8447 devel optional antlr_2.7.6-1.diff.gz
 eee4be1abc3d955c5a13f334ea5a8415 1325872 devel optional antlr_2.7.6-1_all.deb
 4c24539cf44afd92797ed9fc491c3dc1 180678 libdevel optional libantlr-dev_2.7.6-1_i386.deb
 6ba1858b689fe8ebb2c64710f738ddd0 483380 devel optional cantlr_2.7.6-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFD1rZJWSOgCCdjSDsRAsoSAJsEPORaixLpg2IaEZj6kvDBCUPoigCeJRIb
ECXesPWsTjCOBnShoWWMS+U=
=tbcd
-----END PGP SIGNATURE-----




More information about the pkg-java-maintainers mailing list