-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
bugThis issue is a bug.This issue is a bug.documentationThis is a problem with documentation.This is a problem with documentation.p2This is a standard priority issueThis is a standard priority issue
Description
Describe the bug
In AWS JDK V2, when a client is interrupted, it does not clears the Interrupted Flag. However, there is a comment stating that it does.
aws-sdk-java-v2/core/sdk-core/src/main/java/software/amazon/awssdk/core/io/SdkFilterInputStream.java
Lines 36 to 47 in ffc9ccc
/** | |
* Aborts with subclass specific abortion logic executed if needed. | |
* Note the interrupted status of the thread is cleared by this method. | |
* | |
* @throws AbortedException if found necessary. | |
*/ | |
protected final void abortIfNeeded() { | |
if (Thread.currentThread().isInterrupted()) { | |
abort(); // execute subclass specific abortion logic | |
throw AbortedException.builder().build(); | |
} | |
} |
In AWS JDK V1, there interrupted status is indeed cleared.
Please ensure that V2 maintains the same behavior and clear the flag. This will help migrations from V1 to V2.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The Interrupt flag should be cleared.
Current Behavior
The Interrupt flag is not cleared.
Reproduction Steps
Provided code samples in description.
Possible Solution
Provided suggesting in description.
Additional Information/Context
No response
AWS Java SDK version used
2
JDK version used
17
Operating System and version
Linux
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.documentationThis is a problem with documentation.This is a problem with documentation.p2This is a standard priority issueThis is a standard priority issue