[cp-patches] [4.8 Regression] gjavah throws an exception
Mon Dec 17 18:38:00 GMT 2012
On Mon, 2012-12-17 at 15:39 +0000, Andrew Haley wrote:
> If a class has inner classes, those inner classes are searched on
> the classpath. This is wrong if the argument to javah is a filename:
> the inner class may not exist on the classpath, and even if they do
> they will be the wrong versions.
> IMO, if given filenames gjavah should not search for inner classes
> at all. This patch does so.
> 2012-12-17 Andrew Haley <firstname.lastname@example.org>
> * tools/gnu/classpath/tools/javah/Main.java (parseClasses): Dont
> scan inner classes if our item is a file.
That looks right to me. As you said on irc, no other javah
implementation seems to support "raw class files" as input. Others only
seem to accept class names. So there is no "best practice" to follow in
this case. Not trying to search for inner classes when a class file is
provided seems a good choice since at the bytecode level there really
isn't such a thing as an inner class (just funnily named classes).
More information about the Java