$ j2py demoClass.java
Traceback (most recent call last):
File "/pathToPython/bin/j2py", line 258, in <module>
sys.exit(runMain(configScript(sys.argv[1:])))
File "/pathToPython/bin/j2py", line 57, in runMain
return runOneOrMany(options)
File "/pathToPython/bin/j2py", line 82, in runOneOrMany
return runTransform(options)
File "/pathToPython/bin/j2py", line 134, in runTransform
module.walk(tree)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 86, in walk
visitor.walk(child, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 83, in walk
visitor = self.accept(tree, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 43, in accept
return call(node, memo)
File "/pathToPython/lib/python2.7/site-packages/java2python/compiler/visitor.py", line 121, in acceptType
name = node.firstChildOfType(tokens.IDENT).text
AttributeError: 'NoneType' object has no attribute 'text'
In this case I can easily rewrite the Java code via search-and-replace or even comment the code out, but it would be nice to have this handled automatically.
Given the following (simplified as much as possible) class definition:
I get the following error:
The original offending line is actually a call to Logger.getLogger, like so:
In this case I can easily rewrite the Java code via search-and-replace or even comment the code out, but it would be nice to have this handled automatically.