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-crypto.git
commit b28513dd79d0feb60d1a206d0d28511a11fccd5c Author: Gary Gregory <[email protected]> AuthorDate: Wed Jan 28 08:27:13 2026 -0500 OsInfo now restores the current thread's interrupt flag when catching InterruptedException --- src/changes/changes.xml | 3 ++- src/main/java/org/apache/commons/crypto/OsInfo.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index fa57ce49..0dcb9219 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -96,7 +96,8 @@ <action dev="ggregory" type="fix" due-to="Gary Gregory">StreamOutput.StreamOutput(OutputStream, int) now throws NullPointerException on null input.</action> <action dev="ggregory" type="fix" due-to="Gary Gregory">SecureRandom in JavaCryptoRandom is not seeded.</action> <action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs [ERROR] Medium: Unread field: org.apache.commons.crypto.jna.OpenSslJnaCipher.IV_LENGTH; should this field be static? [org.apache.commons.crypto.jna.OpenSslJnaCipher] At OpenSslJnaCipher.java:[line 80] SS_SHOULD_BE_STATIC.</action> - <action dev="ggregory" type="fix" due-to="Gary Gregory">Pick up maven-antrun-plugin version from parent POM org.apache:apache.</action> + <action dev="ggregory" type="fix" due-to="Gary Gregory">Pick up maven-antrun-plugin version from parent POM org.apache:apache.</action> + <action dev="ggregory" type="fix" due-to="Gary Gregory">OsInfo now restores the current thread's interrupt flag when catching InterruptedException.</action> <!-- ADD --> <action type="add" dev="sebb">Added support for OpenSSL 3.0, 3.1, 3.2</action> <action type="add" dev="sebb">Implement OpenSSL_version_num for JNA</action> diff --git a/src/main/java/org/apache/commons/crypto/OsInfo.java b/src/main/java/org/apache/commons/crypto/OsInfo.java index d983eb9e..2c00c0d2 100644 --- a/src/main/java/org/apache/commons/crypto/OsInfo.java +++ b/src/main/java/org/apache/commons/crypto/OsInfo.java @@ -124,7 +124,9 @@ static String getArchName() { if (exitCode == 0) { return "armhf"; } - } catch (final IOException | InterruptedException e) { // NOPMD + } catch (final InterruptedException e) { + Thread.currentThread().interrupt(); + } catch (final IOException e) { // NOPMD // ignored: fall back to "arm" arch (soft-float ABI) } } else {
