costin 00/11/09 15:03:59
Modified: java/src/javax/xml/transform TransformerFactory.java
Log:
Sync with the javax.xml tree.
As sugested, the cached value for factory will be used after the
system property, because the user might change the system property.
We still cache the value read from java.home/lib/jaxp.properties and
from CLASSPATH because both involve expensive file operations.
Revision Changes Path
1.5 +14 -16
xml-xalan/java/src/javax/xml/transform/TransformerFactory.java
Index: TransformerFactory.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/javax/xml/transform/TransformerFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TransformerFactory.java 2000/11/07 17:25:15 1.4
+++ TransformerFactory.java 2000/11/09 23:03:59 1.5
@@ -303,25 +303,23 @@
*/
private static String findFactory(String factoryId, String defaultFactory)
{
-
- if (foundFactory != null)
- return foundFactory;
-
// Use the system property first
- try
- {
- foundFactory = System.getProperty(factoryId);
-
- if (foundFactory != null)
- {
- if (debug)
- System.err.println("JAXP: found system property" + foundFactory);
-
- return foundFactory;
+ try {
+ String systemProp =
+ System.getProperty( factoryId );
+ if( systemProp!=null) {
+ if( debug )
+ System.err.println("JAXP: found system property" +
+ systemProp );
+ return systemProp;
}
+
+ }catch (SecurityException se) {
}
- catch (SecurityException se){}
-
+
+ if (foundFactory != null)
+ return foundFactory;
+
// try to read from $java.home/lib/jaxp.properties
try
{