[StAX] XMLInputFactory.newInstance(String, ClassLoader) does not use bootstrap loader

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • 6-pool
    • Affects Version/s: javadb_10.0
    • Component/s: xml

      I am using JDK 1.6.0_02. I am referring to javax.xml.stream.XMLInputFactory.newInstance(String, ClassLoader) method. This method does not treat "null classloader" correctly. If I want to use the classloader that loads XMLInputFactory.class, then in JDK 1.6 env, it is obviously null since the bootstrap classloader has this class. In such a situation, the implementation in JDK 1.6 falls back to Thread's context class loader, which I think is against the behavior defined in the spec. It should use the three argument variant of Class.forName with null as the last argument.

            Assignee:
            Joe Wang
            Reporter:
            Sanjeeb Sahoo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: