I just looked at the patch :

--- PropertiesConfiguration.java        28 Mar 2004 14:43:04 -0000 1.5
+++ PropertiesConfiguration.java        28 Mar 2004 15:34:23 -0000 1.6
@@ -99,7 +99,9 @@
     public void load(String fileName) throws ConfigurationException
     {
         try {
-            load(getPropertyStream(fileName));
+            InputStream is = getPropertyStream(fileName);
+            load(is);
+            is.close();
         }


I think the call to the close() method should be in a finally block instead.


Emmanuel Bourg


Eric Pugh wrote:
Hi Stephen,

I think I have just resolved the problem! Thanks for sending it.

Eric


-----Original Message-----
From: Stephen Colebourne [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 9:30 PM
To: Jakarta Commons Developers List
Subject: [configuration] Closing opened input streams


A bug was reported against [collections] ExtendedProperties http://issues.apache.org/bugzilla/show_bug.cgi?id=27737

I found that the input stream created in the constructor was not closed. I
just checked PropertiesConfiguration, and the load() methods seem to have
the same problem.

Stephen


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to