You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by GitBox <gi...@apache.org> on 2022/06/26 19:27:14 UTC

[GitHub] [myfaces] arturobernalg commented on a diff in pull request #281: Use try-with-resources Statement and avoid closing it manually.

arturobernalg commented on code in PR #281:
URL: https://github.com/apache/myfaces/pull/281#discussion_r906861459


##########
impl/src/main/java/org/apache/myfaces/config/impl/FacesConfigUnmarshallerImpl.java:
##########
@@ -179,18 +180,8 @@ public FacesConfigImpl getFacesConfig(InputStream in, String systemId) throws IO
         {
             throw new FacesException(e);
         }
-        finally
-        {
-            try
-            {
-                in.close();
-            }
-            catch (IOException e)
-            {
-                // ignore silently
-            }
-        }
-          
+        // ignore silently

Review Comment:
   done



##########
impl/src/main/java/org/apache/myfaces/resource/TempDirFileCacheContractResourceLoader.java:
##########
@@ -229,20 +227,7 @@ protected void createTemporalFileVersion(FacesContext facesContext, ResourceMeta
         {
             throw new FacesException("Unexpected exception while create file:", e);
         }
-        finally
-        {
-            if (inputStream != null)
-            {
-                try
-                {
-                    inputStream.close();
-                }
-                catch (IOException e)
-                {
-                    // Ignore
-                }
-            }
-        }
+        // Ignore

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org