# HG changeset patch
# User dfuchs
# Date 1380906910 -7200
# Node ID 65d17ea72da3c12e597271927e990679317a71ff
# Parent ec467abf6fc968f400016aa3a3d3c45ccf50e20d
8025745: Clarify API documentation of JAXP factories.
Summary: Clarifies usage of ServiceLoader in JAXP factories.
Reviewed-by: alanb, joehw, psandoz
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/datatype/DatatypeFactory.java
--- a/jaxp/src/javax/xml/datatype/DatatypeFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/datatype/DatatypeFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -49,7 +49,13 @@
*
*
* Uses the service-provider loading facilities, defined by the {@link java.util.ServiceLoader} class, to attempt
- * to locate and load an implementation of the service.
+ * to locate and load an implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
* In case of {@link java.util.ServiceConfigurationError service
* configuration error} a {@link javax.xml.datatype.DatatypeConfigurationException}
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java
--- a/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -82,7 +82,13 @@
*
* Uses the service-provider loading facilities, defined by the
* {@link java.util.ServiceLoader} class, to attempt to locate and load an
- * implementation of the service.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, the system-default implementation is returned.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/parsers/SAXParserFactory.java
--- a/jaxp/src/javax/xml/parsers/SAXParserFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/parsers/SAXParserFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -86,7 +86,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise the system-default implementation is returned.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/stream/XMLEventFactory.java
--- a/jaxp/src/javax/xml/stream/XMLEventFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/stream/XMLEventFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -84,7 +84,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, the system-default implementation is returned.
@@ -152,7 +158,13 @@
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, throws a {@link FactoryConfigurationError}.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/stream/XMLInputFactory.java
--- a/jaxp/src/javax/xml/stream/XMLInputFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/stream/XMLInputFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -174,7 +174,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, the system-default implementation is returned.
@@ -242,7 +248,13 @@
* If {@code factoryId} is "javax.xml.stream.XMLInputFactory",
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, throws a {@link FactoryConfigurationError}.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/stream/XMLOutputFactory.java
--- a/jaxp/src/javax/xml/stream/XMLOutputFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/stream/XMLOutputFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -150,7 +150,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, the system-default implementation is returned.
@@ -216,7 +222,13 @@
* If {@code factoryId} is "javax.xml.stream.XMLOutputFactory",
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, throws a {@link FactoryConfigurationError}.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/transform/TransformerFactory.java
--- a/jaxp/src/javax/xml/transform/TransformerFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/transform/TransformerFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -77,7 +77,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
*
* Otherwise, the system-default implementation is returned.
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/validation/SchemaFactory.java
--- a/jaxp/src/javax/xml/validation/SchemaFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/validation/SchemaFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -148,7 +148,14 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
+ *
* Each potential service provider is required to implement the method
* {@link #isSchemaLanguageSupported(String schemaLanguage)}.
*
diff -r ec467abf6fc9 -r 65d17ea72da3 jaxp/src/javax/xml/xpath/XPathFactory.java
--- a/jaxp/src/javax/xml/xpath/XPathFactory.java Tue Oct 01 17:14:08 2013 +0400
+++ b/jaxp/src/javax/xml/xpath/XPathFactory.java Fri Oct 04 19:15:10 2013 +0200
@@ -123,7 +123,13 @@
*
* 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.
+ * implementation of the service using the {@linkplain
+ * java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+ * the service-provider loading facility will use the {@linkplain
+ * java.lang.Thread#getContextClassLoader() current thread's context class loader}
+ * to attempt to load the service. If the context class
+ * loader is null, the {@linkplain
+ * ClassLoader#getSystemClassLoader() system class loader} will be used.
*
* Each potential service provider is required to implement the method
* {@link #isObjectModelSupported(String objectModel)}.