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:55:13 UTC

[uima-uimaj] branch bugfix/255-File-handle-leak-accessing-performanceTuning.properties updated (fea3e5762 -> 82067b6cc)

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


 discard fea3e5762 Issue #254: CPE worker threads should inherit TCCL from control thread
     new 82067b6cc Issue #255: File handle leak accessing performanceTuning.properties

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fea3e5762)
            \
             N -- N -- N   refs/heads/bugfix/255-File-handle-leak-accessing-performanceTuning.properties (82067b6cc)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:


[uima-uimaj] 01/01: Issue #255: File handle leak accessing performanceTuning.properties

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 82067b6ccebf836414ddf9d4c935e91a1af906f4
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Fri Oct 14 09:39:39 2022 +0200

    Issue #255: File handle leak accessing performanceTuning.properties
    
    - Wrap access with try-with-resources
---
 .../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);