mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8049378: Examine references to ${java.home}/lib in JAXP
Reviewed-by: lancea, alanb
This commit is contained in:
parent
cd16fed9b8
commit
a953097a89
10 changed files with 356 additions and 201 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -132,8 +132,9 @@ public abstract class SchemaFactory {
|
|||
* where "the class loader" refers to the context class loader:</p>
|
||||
* <ol>
|
||||
* <li>
|
||||
* <p>
|
||||
* If the system property
|
||||
* <code>"javax.xml.validation.SchemaFactory:<i>schemaLanguage</i>"</code>
|
||||
* {@code "javax.xml.validation.SchemaFactory:<i>schemaLanguage</i>"}
|
||||
* is present (where <i>schemaLanguage</i> is the parameter
|
||||
* to this method), then its value is read
|
||||
* as a class name. The method will try to
|
||||
|
@ -141,12 +142,22 @@ public abstract class SchemaFactory {
|
|||
* and returns it if it is successfully created.
|
||||
* </li>
|
||||
* <li>
|
||||
* <code>$java.home/conf/jaxp.properties</code> is read and
|
||||
* the value associated with the key being the system property above
|
||||
* is looked for. If present, the value is processed just like above.
|
||||
* <p>
|
||||
* Use the configuration file "jaxp.properties". The file is in standard
|
||||
* {@link java.util.Properties} format and typically located in the
|
||||
* conf directory of the Java installation. It contains the fully qualified
|
||||
* name of the implementation class with the key being the system property
|
||||
* defined above.
|
||||
* <p>
|
||||
* The jaxp.properties file is read only once by the JAXP implementation
|
||||
* and its values are then cached for future use. If the file does not exist
|
||||
* when the first attempt is made to read from it, no further attempts are
|
||||
* made to check for its existence. It is not possible to change the value
|
||||
* of any property in jaxp.properties after it has been read for the first time.
|
||||
* </li>
|
||||
* <li>
|
||||
* Use the service-provider loading facilities, defined by the
|
||||
* <p>
|
||||
* Use the service-provider loading facility, defined by the
|
||||
* {@link java.util.ServiceLoader} class, to attempt to locate and load an
|
||||
* implementation of the service using the {@linkplain
|
||||
* java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
|
||||
|
@ -166,19 +177,20 @@ public abstract class SchemaFactory {
|
|||
* {@link SchemaFactoryConfigurationError} will be thrown.
|
||||
* </li>
|
||||
* <li>
|
||||
* <p>
|
||||
* Platform default <code>SchemaFactory</code> is located
|
||||
* in a implementation specific way. There must be a platform default
|
||||
* <code>SchemaFactory</code> for W3C XML Schema.
|
||||
* </li>
|
||||
* </ol>
|
||||
*
|
||||
* <p>If everything fails, {@link IllegalArgumentException} will be thrown.</p>
|
||||
* <p>If everything fails, {@link IllegalArgumentException} will be thrown.
|
||||
*
|
||||
* <p><strong>Tip for Trouble-shooting:</strong></p>
|
||||
* <p><strong>Tip for Trouble-shooting:</strong>
|
||||
* <p>See {@link java.util.Properties#load(java.io.InputStream)} for
|
||||
* exactly how a property file is parsed. In particular, colons ':'
|
||||
* need to be escaped in a property file, so make sure schema language
|
||||
* URIs are properly escaped in it. For example:</p>
|
||||
* URIs are properly escaped in it. For example:
|
||||
* <pre>
|
||||
* http\://www.w3.org/2001/XMLSchema=org.acme.foo.XSSchemaFactory
|
||||
* </pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue