8049367: Modular Run-Time Images

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore
This commit is contained in:
Chris Hegarty 2014-12-03 14:22:17 +00:00
parent b9ea81b9ed
commit 3c5c554fad
18 changed files with 53 additions and 82 deletions

View file

@ -66,7 +66,7 @@ public abstract class DocumentBuilderFactory {
* property.
* </li>
* <li>
* Use the properties file "lib/jaxp.properties" in the JRE directory.
* Use the properties file "conf/jaxp.properties" in the JRE directory.
* This configuration file is in standard <code>java.util.Properties
* </code> format and contains the fully qualified name of the
* implementation class with the key being the system property defined

View file

@ -50,12 +50,12 @@ class FactoryFinder {
private static boolean debug = false;
/**
* Cache for properties in java.home/lib/jaxp.properties
* Cache for properties in java.home/conf/jaxp.properties
*/
private static final Properties cacheProps = new Properties();
/**
* Flag indicating if properties from java.home/lib/jaxp.properties
* Flag indicating if properties from java.home/conf/jaxp.properties
* have been cached.
*/
static volatile boolean firstTime = true;
@ -236,13 +236,13 @@ class FactoryFinder {
if (debug) se.printStackTrace();
}
// try to read from $java.home/lib/jaxp.properties
// try to read from $java.home/conf/jaxp.properties
try {
if (firstTime) {
synchronized (cacheProps) {
if (firstTime) {
String configFile = ss.getSystemProperty("java.home") + File.separator +
"lib" + File.separator + "jaxp.properties";
"conf" + File.separator + "jaxp.properties";
File f = new File(configFile);
firstTime = false;
if (ss.doesFileExist(f)) {
@ -255,7 +255,7 @@ class FactoryFinder {
final String factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
dPrint("found in ${java.home}/conf/jaxp.properties, value=" + factoryClassName);
return newInstance(type, factoryClassName, null, true);
}
}

View file

@ -70,7 +70,7 @@ public abstract class SAXParserFactory {
* property.
* </li>
* <li>
* Use the properties file "lib/jaxp.properties" in the JRE directory.
* Use the properties file "conf/jaxp.properties" in the JRE directory.
* This configuration file is in standard <code>java.util.Properties
* </code> format and contains the fully qualified name of the
* implementation class with the key being the system property defined