myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r742986 - /myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Date Tue, 10 Feb 2009 14:50:20 GMT
Author: bommel
Date: Tue Feb 10 14:49:58 2009
New Revision: 742986

URL: http://svn.apache.org/viewvc?rev=742986&view=rev
Log:
(MYFACES-2149) Stream not closed thank to Marcin Wisnicki for the patch

Modified:
    myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Modified: myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=742986&r1=742985&r2=742986&view=diff
==============================================================================
--- myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
(original)
+++ myfaces/core/trunk_1.2.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Tue Feb 10 14:49:58 2009
@@ -502,20 +502,24 @@
                 facesConfigs.put(systemId,url);
             }
 
-            Iterator<Map.Entry<String,URL>> facesConfigIt=facesConfigs.entrySet().iterator();
-
-            while(facesConfigIt.hasNext()) {
-                Map.Entry<String,URL> entry = facesConfigIt.next();
+            for (Map.Entry<String, URL> entry : facesConfigs.entrySet())
+            {
                 InputStream stream = null;
-                try {
-                    openStreamWithoutCache(entry.getValue());
+                try
+                {
+                    stream = openStreamWithoutCache(entry.getValue());
                     if (log.isInfoEnabled())
+                    {
                         log.info("Reading config : " + entry.getKey());
+                    }
                     getDispenser().feed(getUnmarshaller().getFacesConfig(stream, entry.getKey()));
                 }
-                finally {
-                    if(stream!=null)
+                finally
+                {
+                    if (stream != null)
+                    {
                         stream.close();
+                    }
                 }
             }
         }



Mime
View raw message