commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1152924 - in /commons/proper/daemon/trunk: RELEASE-NOTES.txt pom.xml src/java/org/apache/commons/daemon/support/DaemonConfiguration.java
Date Mon, 01 Aug 2011 20:31:35 GMT
Author: mturk
Date: Mon Aug  1 20:31:34 2011
New Revision: 1152924

URL: http://svn.apache.org/viewvc?rev=1152924&view=rev
Log:
DAEMON-211: Make sure the File is closed

Modified:
    commons/proper/daemon/trunk/RELEASE-NOTES.txt
    commons/proper/daemon/trunk/pom.xml
    commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonConfiguration.java

Modified: commons/proper/daemon/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/RELEASE-NOTES.txt?rev=1152924&r1=1152923&r2=1152924&view=diff
==============================================================================
--- commons/proper/daemon/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/daemon/trunk/RELEASE-NOTES.txt Mon Aug  1 20:31:34 2011
@@ -78,6 +78,8 @@ NEW FEATURES:
 
 BUG FIXES:
 
+1.0.7: DAEMON-211
+
 1.0.6: DAEMON-186, DAEMON-193, DAEMON-194, DAEMON-206, DAEMON-185, DAEMON-200
        DAEMON-192
 

Modified: commons/proper/daemon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/pom.xml?rev=1152924&r1=1152923&r2=1152924&view=diff
==============================================================================
--- commons/proper/daemon/trunk/pom.xml (original)
+++ commons/proper/daemon/trunk/pom.xml Mon Aug  1 20:31:34 2011
@@ -27,7 +27,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>commons-daemon</groupId>
   <artifactId>commons-daemon</artifactId>
-  <version>1.0.6</version>
+  <version>1.0.7</version>
   <name>Commons Daemon</name>
   <!-- Daemon started in Commons in 2002 with an import of code from Tomcat,
        which is why the NOTICE file has an earlier date than the inceptionYear -->

Modified: commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonConfiguration.java?rev=1152924&r1=1152923&r2=1152924&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonConfiguration.java
(original)
+++ commons/proper/daemon/trunk/src/java/org/apache/commons/daemon/support/DaemonConfiguration.java
Mon Aug  1 20:31:34 2011
@@ -83,10 +83,11 @@ public final class DaemonConfiguration
     public boolean load(String fileName)
     {
         boolean ok = false;
+        FileInputStream file = null;
         try {
             if (fileName == null)
                 fileName = DEFAULT_CONFIG;
-            FileInputStream file = new FileInputStream(fileName);
+            file = new FileInputStream(fileName);
             configurationProperties.clear();
             configurationProperties.load(file);
             ok = true;
@@ -96,6 +97,12 @@ public final class DaemonConfiguration
         }
         catch (IOException ex) {
             // Error reading properties file
+        } finally {
+            try {
+                if (file != null)
+                    file.close();
+            } catch (IOException ex) {
+            }
         }
         return ok;
     }



Mime
View raw message