You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Milan Siebenbürger (Jira)" <de...@myfaces.apache.org> on 2021/01/18 12:34:00 UTC
[jira] [Created] (MYFACES-4375) ResourceLoaderUtils - connection
not close for FileURLConnection
Milan Siebenbürger created MYFACES-4375:
-------------------------------------------
Summary: ResourceLoaderUtils - connection not close for FileURLConnection
Key: MYFACES-4375
URL: https://issues.apache.org/jira/browse/MYFACES-4375
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 3.0.0, 2.3-next-M4, 2.3-next-M3, 3.0.0-RC1
Reporter: Milan Siebenbürger
Hello,
we are facing problem with non-closed connection in ResourceLoaderUtils. Since this change (pull request> https://github.com/apache/myfaces/pull/90)
in method ResourceLoaderUtils.getResourceLastModification(URL url) is connection opened, but it is never closed (assuming it is not instance of JarURLConnection, which is closed correctly).
If URLConnection is FileURLConnection (our case), it is not closed, and afterwards file is locked in file system and can't be accessed (for deleting, etc)...
Method ResourceLoaderUtils.getResourceLastModification is called at ResourceImpl:316.
Do you have any solution or workaround for this case, or could it be fixed somehow (ie same as JarURLConnection)?
Thanks
Milan Siebenbürger
--
This message was sent by Atlassian Jira
(v8.3.4#803005)