apache/uima-uimaj

File handle leak accessing performanceTuning.properties

reckart opened this issue · 0 comments

Describe the bug
There appears to be a file handle leak when accessing performanceTuning.properties.

To Reproduce
Use the file leak detector when running some test.

Expected behavior
All opened resources should be closed.

Screenshots

#16 .../uima-uimaj/uimaj-core/target/classes/org/apache/uima/impl/performanceTuning.properties by thread:main on Fri Oct 14 08:59:07 CEST 2022
	at java.io.FileInputStream.<init>(FileInputStream.java:139)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
	at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:239)
	at java.lang.Class.getResourceAsStream(Class.java:2223)
	at org.apache.uima.impl.UIMAFramework_impl._initialize(UIMAFramework_impl.java:189)
	at org.apache.uima.UIMAFramework.<clinit>(UIMAFramework.java:1320)
	at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.loadTypeSystemDescriptionsFromScannedLocations(TypeSystemDescriptionFactory.java:146)
	at org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription(TypeSystemDescriptionFactory.java:129)
	at org.apache.uima.fit.factory.CasFactory.createCas(CasFactory.java:101)
	at org.apache.uima.fit.factory.JCasFactory.createJCas(JCasFactory.java:88)
        ....

Please complete the following information:

  • Version: 3.2.0