garyp       01/05/21 09:16:23

  Modified:    java/src/org/apache/xalan/templates OutputProperties.java
  Log:
  Fix to the following bug reported by [EMAIL PROTECTED]:
  
  loadPropertiesFile method in org\apache\xalan\templates\OutputProperties.java 
does not fall back
  to the Thread Context Class Loader to load properties files like 
output_xml.properties etc. This
  is causing problems in ServletExec_3_1+C2.
  
  Revision  Changes    Path
  1.15      +6 -2      
xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java
  
  Index: OutputProperties.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/OutputProperties.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- OutputProperties.java     2001/05/21 14:21:40     1.14
  +++ OutputProperties.java     2001/05/21 16:16:15     1.15
  @@ -73,6 +73,7 @@
   import org.apache.xml.utils.FastStringBuffer;
   import org.apache.xml.utils.WrappedRuntimeException;
   import org.apache.xalan.serialize.Method;
  +import org.apache.xalan.extensions.ExtensionHandler;
   
   import javax.xml.transform.TransformerException;
   import javax.xml.transform.OutputKeys;
  @@ -185,9 +186,9 @@
       InputStream is = null;
       BufferedInputStream bis = null;
       try {
  -      is = OutputProperties.class.getResourceAsStream(resourceName);
  +      is = 
ExtensionHandler.getClassForName("org.apache.xalan.templates.OutputProperties").getResourceAsStream(resourceName);
         bis = new BufferedInputStream(is);
  -    props.load(bis);
  +      props.load(bis);
       } 
       catch (IOException ioe) {
         if ( defaults == null ) {
  @@ -206,6 +207,9 @@
           throw new WrappedRuntimeException("Could not load '"+resourceName+"' 
(check CLASSPATH, applet security), now using just the defaults ", se);
         }
       } 
  +    catch (ClassNotFoundException cnfe) {
  +      throw new WrappedRuntimeException("Internal error.  Could not load 
org.apache.xalan.templates.OutputProperties!", cnfe);
  +    }
       finally {
         if ( bis != null ) {
           bis.close();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to