db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1505853 - in /db/derby/code/branches/10.8: ./ java/build/org/apache/derbyBuild/MessageVetter.java
Date Mon, 22 Jul 2013 23:36:39 GMT
Author: mamta
Date: Mon Jul 22 23:36:38 2013
New Revision: 1505853

URL: http://svn.apache.org/r1505853
Log:
DERBY-5480(File handle leak in MessageVetter)

Backporting to 10.8. Fix contributed by Knut


Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/build/org/apache/derbyBuild/MessageVetter.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1189063

Modified: db/derby/code/branches/10.8/java/build/org/apache/derbyBuild/MessageVetter.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/build/org/apache/derbyBuild/MessageVetter.java?rev=1505853&r1=1505852&r2=1505853&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/build/org/apache/derbyBuild/MessageVetter.java (original)
+++ db/derby/code/branches/10.8/java/build/org/apache/derbyBuild/MessageVetter.java Mon Jul
22 23:36:38 2013
@@ -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