You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2022/10/14 07:39:47 UTC

[uima-uimaj] branch bugfix/255-File-handle-leak-accessing-performanceTuning.properties created (now fea3e5762)

This is an automated email from the ASF dual-hosted git repository.

rec pushed a change to branch bugfix/255-File-handle-leak-accessing-performanceTuning.properties
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git


      at fea3e5762 Issue #254: CPE worker threads should inherit TCCL from control thread

This branch includes the following new commits:

     new fea3e5762 Issue #254: CPE worker threads should inherit TCCL from control thread

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[uima-uimaj] 01/01: Issue #254: CPE worker threads should inherit TCCL from control thread

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch bugfix/255-File-handle-leak-accessing-performanceTuning.properties
in repository https://gitbox.apache.org/repos/asf/uima-uimaj.git

commit fea3e5762ba70da6ab4f924279a80372a9d1ab9a
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Fri Oct 14 09:39:39 2022 +0200

    Issue #254: CPE worker threads should inherit TCCL from control thread
    
    -
---
 .../src/main/java/org/apache/uima/impl/UIMAFramework_impl.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/uimaj-core/src/main/java/org/apache/uima/impl/UIMAFramework_impl.java b/uimaj-core/src/main/java/org/apache/uima/impl/UIMAFramework_impl.java
index 3e72df30f..2058a41ae 100644
--- a/uimaj-core/src/main/java/org/apache/uima/impl/UIMAFramework_impl.java
+++ b/uimaj-core/src/main/java/org/apache/uima/impl/UIMAFramework_impl.java
@@ -21,6 +21,7 @@ package org.apache.uima.impl;
 
 import java.beans.Introspector;
 import java.io.IOException;
+import java.io.InputStream;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -185,8 +186,10 @@ public class UIMAFramework_impl extends UIMAFramework {
 
     // read performance tuning properties
     mDefaultPerformanceTuningProperties = new Properties();
-    mDefaultPerformanceTuningProperties
-            .load(UIMAFramework_impl.class.getResourceAsStream("performanceTuning.properties"));
+    try (InputStream is = UIMAFramework_impl.class
+            .getResourceAsStream("performanceTuning.properties")) {
+      mDefaultPerformanceTuningProperties.load(is);
+    }
 
     // create new HashMap for the LogWrappers
     mLoggers = new ConcurrentHashMap<>(200, 1.0f);