Author: vhennebert
Date: Thu Dec 16 19:17:21 2010
New Revision: 1050104

URL: http://svn.apache.org/viewvc?rev=1050104&view=rev
Log:
Bugzilla #49060: File Descriptor leak in AFP renderer
Patch by Peter Hancock, applied with minor style modifications

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPStreamer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPStreamer.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPStreamer.java?rev=1050104&r1=1050103&r2=1050104&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPStreamer.java 
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPStreamer.java Thu Dec 
16 19:17:21 2010
@@ -174,6 +174,14 @@ public class AFPStreamer implements Stre
 
         outputStream.close();
 
+
+        if (documentOutputStream != null) {
+            documentOutputStream.close();
+        }
+
+        if (documentFile != null) {
+            documentFile.close();
+        }
         // delete temporary file
         tempFile.delete();
     }
@@ -213,4 +221,4 @@ public class AFPStreamer implements Stre
 //        long end = System.currentTimeMillis();
 //        log.debug("writing time " + (end - start) + "ms");
     }
-}
\ No newline at end of file
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to