Message381

Author nobody
Recipients
Date 2001-08-10.23:22:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Hi!
I've found and (more or less) isolated a bug in jythonc
2.1a3. The bug occurs under the following circumstances:

1. A package derives a subclass A from a java class.
2. The same package derives a subclass B from A.
3. The package gets compiled with the --package option.

When creating java code, jythonc 2.1a3 doubles the
package name in front of B, i.e., if the name of the
package is foo, then it creates the name foo.foo.B,
which causes javac to terminate with an error.

Here's a program that reproduces the bug:
-----------------------------------
import java

class spam(java.lang.Object):
    pass

class eggs(spam):
    pass
-----------------------------------

Here's what happens when the above program is being
compiled with the --package option:

/usr/local/jython-2.1a3/jythonc --package foo jcbug.py

processing jcbug

Required packages:
  java.lang

Creating adapters:

Creating .java files:
  jcbug module
    spam extends java.lang.Object
    eggs extends foo.foo.jcbug.spam

Compiling .java to .class...
Compiling with args: ['/usr/local/jdk1.2.2/bin/javac',
'-classpath',
'/usr/local/jython-2.1a3/jython.jar::./jpywork::/usr/local/jython-2.1a3/Tools/jythonc:/home/brinkman/prog/java/test/.:/usr/local/jython-2.1a3/Lib:/home/brinkman/prog/java/gumbie:/home/brinkman/prog/java',
'./jpywork/foo/jcbug.java']
1  ./jpywork/foo/jcbug.java:103: Superclass
foo.foo.jcbug.spam of nested class foo.jcbug. eggs not
found.
    public static class eggs extends foo.foo.jcbug.spam
implements org.python.core.PyProxy,
org.python.core.ClassDictInit {
                                     ^
1 error

ERROR DURING JAVA COMPILATION... EXITING


This problem does not occur with jythonc 2.0, so it
seems to be new.
Best,
    Peter
    brinkman@math.uiuc.edu
History
Date User Action Args
2008-02-20 17:16:53adminlinkissue449956 messages
2008-02-20 17:16:53admincreate