mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-19 14:55:17 +00:00
8013502: Improve stream factories
Reviewed-by: joehw, mullan, lancea
This commit is contained in:
parent
8b314fcc50
commit
dee5d80756
@ -253,7 +253,13 @@ class FactoryFinder {
|
||||
|
||||
// Use the system property first
|
||||
try {
|
||||
String systemProp = ss.getSystemProperty(factoryId);
|
||||
|
||||
final String systemProp;
|
||||
if (type.getName().equals(factoryId)) {
|
||||
systemProp = ss.getSystemProperty(factoryId);
|
||||
} else {
|
||||
systemProp = System.getProperty(factoryId);
|
||||
}
|
||||
if (systemProp != null) {
|
||||
dPrint("found system property, value=" + systemProp);
|
||||
// There's a bug here - because 'cl' is ignored.
|
||||
@ -262,7 +268,8 @@ class FactoryFinder {
|
||||
}
|
||||
}
|
||||
catch (SecurityException se) {
|
||||
if (debug) se.printStackTrace();
|
||||
throw new FactoryConfigurationError(
|
||||
"Failed to read factoryId '" + factoryId + "'", se);
|
||||
}
|
||||
|
||||
// Try read $java.home/lib/stax.properties followed by
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user