harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5746) getDeclaredClasses returns nulls (Apache Axis2)
Date Wed, 16 Apr 2008 15:55:21 GMT
getDeclaredClasses returns nulls (Apache Axis2)
-----------------------------------------------

                 Key: HARMONY-5746
                 URL: https://issues.apache.org/jira/browse/HARMONY-5746
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Davanum Srinivas


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++) {
            Class aClass = classes[i];
            System.out.println("CLASS - " + aClass.getCanonicalName());
        }
    }
}

===================== 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 "ns1";
        }
        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 Factory {
        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

          

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message