Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
This isn't strictly a "javac" issue, but it is caused by compiler tools code used by the tools with which the bug is an issue, so I figured I would put it in the compiler category for now. The problem is that if you use rmic or javap with a class name that, with anything that might qualify as a package qualifier stripped off, contains spaces in other than the first position, a CompilerError is thrown. For example: [terrier]<peter> 41 % javap "a b" sun.tools.java.CompilerError: mangle a b at sun.tools.java.Type.mangleInnerType(Type.java) at sun.tools.java.Type.tClass(Type.java) at sun.tools.util.LoadEnvironment.classExists(LoadEnvironment.java) at sun.tools.javap.JavaP.displayResults(JavaP.java) at sun.tools.javap.JavaP.perform(JavaP.java) at sun.tools.javap.JavaP.main(JavaP.java) This only happens with the most recent (8/20) putback of changes to the JDK 1.2 beta workspace (it did not occur with JDK 1.2I, at least as long as you use the command line wrapper). It was caused by the fix to 4053337, where the wrapper scripts for these tools no longer convert single arguments with spaces into separate arguments to the tool (which was happening accidentally). The cause of this bug is that Type.mangleInnerType is called because when looking for the binary class file, the mangled representation of inner class names must be used in file names. This strips off package qualifiers, replaces ". " with "$", but then if Identifier.isInner() return true, a CompilerError will get thrown. But Identifier.isInner() will return true if indexOf(' ') > 0, so if there are any extraneous spaces in the identifier after the first position, it will still return true.
|