harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r493213 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java
Date Fri, 05 Jan 2007 22:37:56 GMT
Author: tellison
Date: Fri Jan  5 14:37:55 2007
New Revision: 493213

URL: http://svn.apache.org/viewvc?view=rev&rev=493213
Log:
Ensure ResourceBundle closes input stream if exception loading properties.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java?view=diff&rev=493213&r1=493212&r2=493213
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/ResourceBundle.java
Fri Jan  5 14:37:55 2007
@@ -287,9 +287,12 @@
                     });
             if (stream != null) {
                 try {
-                    bundle = new PropertyResourceBundle(stream);
+                    try {
+                        bundle = new PropertyResourceBundle(stream);
+                    } finally {
+                        stream.close();
+                    }
                     bundle.setLocale(locale);
-                    stream.close();
                 } catch (IOException e) {
                 }
             }



Mime
View raw message