-
Enhancement
-
Resolution: Fixed
-
P2
-
8
-
b01
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8032737 | 9 | Joe Wang | P2 | Closed | Fixed | b03 |
JDK-8045777 | 8u25 | Joe Wang | P2 | Resolved | Fixed | b01 |
JDK-8052450 | emb-8u26 | Joe Wang | P2 | Resolved | Fixed | b17 |
Let's consider XMLEventFactory.newFactory(String factoryId, ClassLoader classLoader) spec excerpt:
* If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
* use the service-provider loading facilities, defined by the
* {@link java.util.ServiceLoader} class, to attempt to locate and load an
* implementation of the service using the specified {@code ClassLoader}.
* If {@code classLoader} is null, the {@linkplain
* java.util.ServiceLoader#load(java.lang.Class) default loading mechanism} will apply:
Above excerpt refers to java.util.ServiceLoader#load(java.lang.Class) method for null classLoader case.
Similarly java.util.ServiceLoader#load(java.lang.Class, ClassLoader) should be referred for the case of non null classLoader; for instance like it's presented below:
* If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
* use the service-provider loading facilities, defined by the
* {@link java.util.ServiceLoader} class, to attempt to {@linkplain java.util.ServiceLoader#load(java.lang.Class, java.lang.ClassLoader) locate and load} an
* implementation of the service using the specified {@code ClassLoader}.
The similar change should be applied:
to XMLInputFactory.newFactory(String factoryId, ClassLoader classLoader)
and to XMLOutputFactory.newFactory(String factoryId, ClassLoader classLoader).
* If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
* use the service-provider loading facilities, defined by the
* {@link java.util.ServiceLoader} class, to attempt to locate and load an
* implementation of the service using the specified {@code ClassLoader}.
* If {@code classLoader} is null, the {@linkplain
* java.util.ServiceLoader#load(java.lang.Class) default loading mechanism} will apply:
Above excerpt refers to java.util.ServiceLoader#load(java.lang.Class) method for null classLoader case.
Similarly java.util.ServiceLoader#load(java.lang.Class, ClassLoader) should be referred for the case of non null classLoader; for instance like it's presented below:
* If {@code factoryId} is "javax.xml.stream.XMLEventFactory",
* use the service-provider loading facilities, defined by the
* {@link java.util.ServiceLoader} class, to attempt to {@linkplain java.util.ServiceLoader#load(java.lang.Class, java.lang.ClassLoader) locate and load} an
* implementation of the service using the specified {@code ClassLoader}.
The similar change should be applied:
to XMLInputFactory.newFactory(String factoryId, ClassLoader classLoader)
and to XMLOutputFactory.newFactory(String factoryId, ClassLoader classLoader).
- backported by
-
JDK-8045777 Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
- Resolved
-
JDK-8052450 Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
- Resolved
-
JDK-8032737 Spec: javax.xml.stream.XMLEventFactory/XMLOutputFactory/XMLInputFactory.newFactory(String, ClassLoader) referring to ServiceLoader.load(Class, ClassLoader)
- Closed