You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2009/03/19 03:52:07 UTC

svn commit: r755817 - in /xmlgraphics/batik/trunk: CHANGES sources/org/apache/batik/util/Service.java

Author: cam
Date: Thu Mar 19 02:52:07 2009
New Revision: 755817

URL: http://svn.apache.org/viewvc?rev=755817&view=rev
Log:
Fix bug where a service resource file loaded via API would not be
closed properly.

Closes bug: 46871
Submitted by: Fabrizio Giudici <fa...@tidalwave.it>

Modified:
    xmlgraphics/batik/trunk/CHANGES
    xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java

Modified: xmlgraphics/batik/trunk/CHANGES
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=755817&r1=755816&r2=755817&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Thu Mar 19 02:52:07 2009
@@ -10,7 +10,8 @@
 1. Bugzilla problem reports fixed:
 
     43411, 44553, 44590, 44919, 44936, 44966, 45112, 45114, 45117,
-    45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431, 46855
+    45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431, 46855,
+    46871
 
 2. New features
 

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java?rev=755817&r1=755816&r2=755817&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java Thu Mar 19 02:52:07 2009
@@ -134,22 +134,25 @@
                 // Just try the next file...
             } finally {
                 // close and release all io-resources to avoid leaks
-                if ( is != null ){
+                if (is != null) {
                     try {
                         is.close();
-                    } catch ( IOException ignored ){}
+                    } catch (IOException ignored) {
+                    }
                     is = null;
                 }
-                if ( r != null ){
+                if (r != null) {
                     try{
                         r.close();
-                    } catch ( IOException ignored ){}
+                    } catch (IOException ignored) {
+                    }
                     r = null;
                 }
-                if ( br == null ){
-                    try{
+                if (br != null) {
+                    try {
                         br.close();
-                    } catch ( IOException ignored ){}
+                    } catch (IOException ignored) {
+                    }
                     br = null;
                 }
             }