Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1862

Resource leak in ResolveVisitor.isSourceNewer()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • None
    • None
    • Patch

    Description

      at org.codehaus.groovy.control.ResolveVisitor.isSourceNewer(ResolveVisitor.java:296) is a resource leak:

      lastMod = source.openConnection().getLastModified();
      

      The connection returned by openConnection() is never closed.

      I think the solution is:

      URLConnection conn = source.openConnection();
      lastMod = conn.getLastModified();
      conn.getInputStream.close();
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            digulla Aaron Digulla
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: