db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1189063 - /db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java
Date Wed, 26 Oct 2011 08:00:46 GMT
Author: kahatlen
Date: Wed Oct 26 08:00:46 2011
New Revision: 1189063

URL: http://svn.apache.org/viewvc?rev=1189063&view=rev
Log:
DERBY-5480: File handle leak in MessageVetter

Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java?rev=1189063&r1=1189062&r2=1189063&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageVetter.java Wed Oct 26 08:00:46
2011
@@ -115,7 +115,12 @@ public class MessageVetter {
     private MessageVetter(File file) throws IOException {
         this.file = file;
         properties = new Properties();
-        properties.load(new FileInputStream(file));
+        FileInputStream in = new FileInputStream(file);
+        try {
+            properties.load(in);
+        } finally {
+            in.close();
+        }
     }
 
     /**



Mime
View raw message