Fix Bugzilla 1490; move return of cached foundFactory to
after attempting lookup of system property (this matches
DocumentBuilderFactory; in the future we'll be using the
xml-commons files, but we're not ready to integrate those yet)
diff --git a/src/javax/xml/parsers/SAXParserFactory.java b/src/javax/xml/parsers/SAXParserFactory.java
index 4bae74d..8c9dee8 100644
--- a/src/javax/xml/parsers/SAXParserFactory.java
+++ b/src/javax/xml/parsers/SAXParserFactory.java
@@ -315,9 +315,6 @@
private static String findFactory(String factoryId,
String defaultFactory)
{
- if( foundFactory!=null)
- return foundFactory;
-
// Use the system property first
try {
foundFactory =
@@ -332,6 +329,10 @@
}catch (SecurityException se) {
}
+ // Then try the previously found one (fix Bugzilla 1490 13-Jun-01 -sc)
+ if( foundFactory!=null)
+ return foundFactory;
+
// try to read from $java.home/lib/jaxp.properties
try {
String javah=System.getProperty( "java.home" );