Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4375

ResourceLoaderUtils - connection not close for FileURLConnection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0.0-RC1, 2.3-next-M3, 2.3-next-M4, 3.0.0, 4.0.0-RC1
    • 2.3-next-M5, 3.0.0, 4.0.0-RC1, 2.3.8
    • General
    • None

    Description

      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

       

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            milansi Milan Siebenbürger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: