OpenJDK / portola / portola
changeset 20581:65d17ea72da3
8025745: Clarify API documentation of JAXP factories.
Summary: Clarifies usage of ServiceLoader in JAXP factories.
Reviewed-by: alanb, joehw, psandoz
author | dfuchs |
---|---|
date | Fri, 04 Oct 2013 19:15:10 +0200 |
parents | ec467abf6fc9 |
children | c0688fa51d68 |
files | jaxp/src/javax/xml/datatype/DatatypeFactory.java jaxp/src/javax/xml/parsers/DocumentBuilderFactory.java jaxp/src/javax/xml/parsers/SAXParserFactory.java jaxp/src/javax/xml/stream/XMLEventFactory.java jaxp/src/javax/xml/stream/XMLInputFactory.java jaxp/src/javax/xml/stream/XMLOutputFactory.java jaxp/src/javax/xml/transform/TransformerFactory.java jaxp/src/javax/xml/validation/SchemaFactory.java jaxp/src/javax/xml/xpath/XPathFactory.java |
diffstat | 9 files changed, 85 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ * </li> * <li> * 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. * <br> * In case of {@link java.util.ServiceConfigurationError service * configuration error} a {@link javax.xml.datatype.DatatypeConfigurationException}
--- 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 @@ * <li> * 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. * </li> * <li> * Otherwise, the system-default implementation is returned.
--- 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 @@ * <li> * 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. * </li> * <li> * Otherwise the system-default implementation is returned.
--- 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 @@ * <li> * 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. * </li> * <li> * 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. * </li> * <li> * Otherwise, throws a {@link FactoryConfigurationError}.
--- 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 @@ * <li> * 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. * </li> * <li> * 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. * </li> * <li> * Otherwise, throws a {@link FactoryConfigurationError}.
--- 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 @@ * <li> * 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. * </li> * <li> * 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. * </li> * <li> * Otherwise, throws a {@link FactoryConfigurationError}.
--- 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 @@ * <li> * 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. * </li> * <li> * Otherwise, the system-default implementation is returned.
--- 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 @@ * <li> * 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.<br> + * 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. + * <br> * Each potential service provider is required to implement the method * {@link #isSchemaLanguageSupported(String schemaLanguage)}. * <br>
--- 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 @@ * <li> * 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. * <br> * Each potential service provider is required to implement the method * {@link #isObjectModelSupported(String objectModel)}.