Author: toad
Date: 2006-02-21 13:34:13 +0000 (Tue, 21 Feb 2006)
New Revision: 8080

Modified:
   trunk/freenet/src/freenet/config/FilePersistentConfig.java
   trunk/freenet/src/freenet/node/Version.java
Log:
451:
Forgot to close the config file after reading it on startup.

Modified: trunk/freenet/src/freenet/config/FilePersistentConfig.java
===================================================================
--- trunk/freenet/src/freenet/config/FilePersistentConfig.java  2006-02-21 
12:31:19 UTC (rev 8079)
+++ trunk/freenet/src/freenet/config/FilePersistentConfig.java  2006-02-21 
13:34:13 UTC (rev 8080)
@@ -54,8 +54,17 @@
         * @throws IOException */
        private void initialLoad() throws IOException {
                FileInputStream fis = new FileInputStream(filename);
-               LineReadingInputStream lis = new LineReadingInputStream(fis);
-               origConfigFileContents = new SimpleFieldSet(lis, 4096, 256, 
true);
+               try {
+                       LineReadingInputStream lis = new 
LineReadingInputStream(fis);
+                       origConfigFileContents = new SimpleFieldSet(lis, 4096, 
256, true);
+               } finally {
+                       try {
+                               fis.close();
+                       } catch (IOException e) {
+                               System.err.println("Could not close 
"+filename+": "+e);
+                               e.printStackTrace();
+                       }
+               }
        }

        public void register(SubConfig sc) {

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-02-21 12:31:19 UTC (rev 
8079)
+++ trunk/freenet/src/freenet/node/Version.java 2006-02-21 13:34:13 UTC (rev 
8080)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 450;
+       private static final int buildNumber = 451;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 403;


Reply via email to