cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/components/xslt XSLTProcessorImpl.java
Date Fri, 14 Dec 2001 03:12:10 GMT
vgritsenko    01/12/13 19:12:10

  Modified:    src/org/apache/cocoon/components/xslt Tag: cocoon_20_branch
                        XSLTProcessorImpl.java
  Log:
  Patch from Michael Hartle [mhartle@hartle-klug.com] to prevent XSLT file locking
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.11  +8 -3      xml-cocoon2/src/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.4.2.10
  retrieving revision 1.4.2.11
  diff -u -r1.4.2.10 -r1.4.2.11
  --- XSLTProcessorImpl.java	2001/12/13 20:36:41	1.4.2.10
  +++ XSLTProcessorImpl.java	2001/12/14 03:12:10	1.4.2.11
  @@ -43,6 +43,7 @@
   import javax.xml.transform.stream.StreamResult;
   import javax.xml.transform.stream.StreamSource;
   import java.io.File;
  +import java.io.InputStream;
   import java.io.IOException;
   import java.io.StringWriter;
   import java.io.Writer;
  @@ -253,10 +254,14 @@
           }
         }
         InputSource is = source.getInputSource();
  +      InputStream bs = is.getByteStream();
         getLogger().debug("XSLTProcessorImpl: starting transform");
  -      transformer.transform(new StreamSource(is.getByteStream(),
  -                                             is.getSystemId()),
  -                            result);
  +      try {
  +        transformer.transform(new StreamSource(bs, is.getSystemId()),
  +                              result);
  +      } finally {
  +        bs.close();
  +      }
         if (this.getLogger().isDebugEnabled()) {
           getLogger().debug("XSLTProcessorImpl: transform done");
           if (result instanceof StreamResult) {
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message