They are up to spec (the JVM spec), but break Java language compatibility :-/ This is a bit twisted, but the idea is that the reflection API assumes a certain name mangling (namely, that an inner class name is formed by the binary name of it's enclosing class, a '$', and the simple name of that class). Sun's JDK uses this to decide the implemented inner name, while IBM uses the proper field in the InnerClass attribute (and runs without error).
In most cases, Sun's scheme works, but we do have cases when there are more than one '$', or none. In this case, it is the top-level object Go, which is encoded as Go$, which is listed as the outer class of Hello. Then, the full name (Go$Hello) - the outer class name (Go$) results in Hello, but according to the name scheme, it should have been $Hello.
|