[TR-163] Index does not explicily close the properties file Created: 20/May/11  Updated: 13/Jun/11  Resolved: 20/May/11

Status: Resolved
Project: Terrier Core
Component/s: .structures
Affects Version/s: 3.0
Fix Version/s: 3.5

Type: Bug Priority: Trivial
Reporter: Richard McCreadie Assignee: Richard McCreadie
Resolution: Fixed  
Labels: None

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.

Comment by Richard McCreadie [ 20/May/11 ]

Fixed and committed 3405

Generated at Tue Aug 11 19:38:25 BST 2020 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.