Description
Anonymous inner classes show up as null's when getDeclaredClasses is called.
=================== Main.java =============================
public class Main {
public static void main(String[] args) throws Exception {
Class[] classes = DerivedByte.class.getDeclaredClasses();
for (int i = 0; i < classes.length; i++)
}
}
===================== DerivedByte =======================
public class DerivedByte {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
"http://soapinterop.org/xsd",
"DerivedByte",
"ns1");
private static java.lang.String generatePrefix(java.lang.String namespace) {
if (namespace.equals("http://soapinterop.org/xsd"))
return null;
}
protected byte localDerivedByte;
public byte getDerivedByte()
{ return localDerivedByte; }public void setDerivedByte(byte param)
{ this.localDerivedByte = param; }public static boolean isReaderMTOMAware()
{ return true; }/**
- Factory class that keeps the parse method
*/
public static class FactoryUnknown macro: { public static DerivedByte parse(String xml) throws java.lang.Exception { DerivedByte object = new DerivedByte(); return object; } }
public String getOMElement(
final javax.xml.namespace.QName parentQName) {
Runnable r = new Runnable() {
public void run() {
}
};
r.run();
return null;
}
public String getOMElement2(
final javax.xml.namespace.QName parentQName) {
Runnable r2 = new Runnable() {
public void run() {
}
};
r2.run();
return null;
}
}
======================= Output on Harmony ====================================
[dims@dims-desktop test]$ $JAVA_HOME/bin/java -cp . Main
CLASS - DerivedByte.Factory
CLASS - null
CLASS - null
======================= Output on JDK1.5 ====================================
[dims@dims-desktop test]$ $JAVA_HOME/bin/java -cp . Main
CLASS - DerivedByte.Factory