Change in Behavior of Client Interrupts Between V1 and V2 #5979
Labels
bug
This issue is a bug.
documentation
This is a problem with documentation.
p2
This is a standard priority issue
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
In AWS JDK V1, there interrupted status is indeed cleared.
https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/main/java/com/amazonaws/internal/SdkFilterInputStream.java#L53-L63
https://github.com/aws/aws-sdk-java/blob/bdca0550fc15769618a51338f5f2f84bc603a1cf/aws-java-sdk-core/src/main/java/com/amazonaws/util/SdkRuntime.java#L20-L26
https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#interrupted--
Please ensure that V2 maintains the same behavior and clear the flag. This will help migrations from V1 to V2.
Regression Issue
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
The text was updated successfully, but these errors were encountered: