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-vfs.git
commit 528ac3f0fb1e35c3195958ce9ee5c1afa6b4aa18 Author: Gary Gregory <[email protected]> AuthorDate: Wed Jan 28 08:24:37 2026 -0500 SftpFileSystem.executeCommand(String, StringBuilder) now restores the current thread's interrupt flag when catching InterruptedException --- .../main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java | 1 + src/changes/changes.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java index b38ac7a03..32800bed4 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java @@ -186,6 +186,7 @@ public class SftpFileSystem extends AbstractFileSystem { Thread.sleep(SLEEP_MILLIS); } catch (final InterruptedException e) { // Someone asked us to stop. + Thread.currentThread().interrupt(); break; } } diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 28f040b81..7cf903355 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -59,6 +59,7 @@ The <action> type attribute can be add,update,fix,remove. <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix Apache RAT plugin console warnings.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix build on Java 25, it's no longer experimental on GH CI.</action> <action type="fix" dev="ggregory" due-to="Gary Gregory">DefaultFileMonitor now restores the current thread's interrupt flag when catching InterruptedException.</action> + <action type="fix" dev="ggregory" due-to="Gary Gregory">SftpFileSystem.executeCommand(String, StringBuilder) now restores the current thread's interrupt flag when catching InterruptedException.</action> <!-- ADD --> <action type="add" dev="ggregory" due-to="Gary Gregory">Add org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.sendOptions(String, String).</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add FtpFileSystemConfigBuilder.getControlEncodingCharset(FileSystemOptions) and deprecate getControlEncoding(FileSystemOptions).</action>
