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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bsf.git


The following commit(s) were added to refs/heads/master by this push:
     new 1731edb  JavaUtils now restores the current thread's interrupt flag 
when catching InterruptedException
1731edb is described below

commit 1731edbc21bfe759170ff32c14f2cfff4748ad70
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jan 28 08:34:15 2026 -0500

    JavaUtils now restores the current thread's interrupt flag when catching
    InterruptedException
---
 src/changes/changes.xml                          | 1 +
 src/main/java/org/apache/bsf/util/JavaUtils.java | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8fca4ea..e352c1a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -41,6 +41,7 @@
       <action type="update" dev="ggregory" due-to="Dependabot, Gary 
Gregory">Bump org.apache.commons:commons-lang3 from 3.12.0 to 3.20.0 #110, 
#157, #162, #171, #236.</action>
       <action type="update" dev="ggregory" due-to="Henri Biestro, Gary 
Gregory">Migrate from Commons JEXL 1.1 to 3.5.0 #224.</action>
       <action type="update" dev="ggregory" due-to="Dependabot, Gary 
Gregory">Bump org.apache.commons:commons-jexl3 from 3.5.0 to 3.6.1 #268, 
#271.</action>
+      <action type="update" dev="ggregory" due-to="Gary Gregory">JavaUtils now 
restores the current thread's interrupt flag when catching 
InterruptedException.</action>
     </release>
   </body>
 </document>
diff --git a/src/main/java/org/apache/bsf/util/JavaUtils.java 
b/src/main/java/org/apache/bsf/util/JavaUtils.java
index e0da6c5..70ae9e5 100644
--- a/src/main/java/org/apache/bsf/util/JavaUtils.java
+++ b/src/main/java/org/apache/bsf/util/JavaUtils.java
@@ -48,6 +48,7 @@ public class JavaUtils {
         } catch (final SecurityException e) {
             logger.error("ERROR: Unable to create subprocess to exec(javac).", 
e);
         } catch (final InterruptedException e) {
+            Thread.currentThread().interrupt();
             logger.error("ERROR: Wait for exec(javac) was interrupted.", e);
         }
         return false;

Reply via email to