Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-163

Index does not explicily close the properties file

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.5
    • Component/s: .structures
    • Labels:
      None

      Description

      The terrier index object creates an unreferenced input stream to load the properties file from. Once loading is complete Java will garbage collect the stream. However, if many index objects are loaded in sequence and at a fast enough rate, Java will not garbage collect fast enough to close all of the streams, leading to a FileNotFound error due to too many open files.

      The InputStream should be explicitly declared and closed after reading.

        Attachments

          Activity

          Hide
          richardm Richard McCreadie added a comment -

          Fixed and committed 3405

          Show
          richardm Richard McCreadie added a comment - Fixed and committed 3405

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              richardm Richard McCreadie
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: