Skip to content

Prevent conn leak on thread interrupt - #6835

Merged
dagnir merged 4 commits into
masterfrom
dongie/apache5-connection-leak-interrupt
Apr 3, 2026
Merged

Prevent conn leak on thread interrupt#6835
dagnir merged 4 commits into
masterfrom
dongie/apache5-connection-leak-interrupt

Checkstyle fix

fcdc139
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 3, 2026 in 15m 46s

Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 66 in http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh4lHkM_Q1xdxy5S&open=AZ1QZh4lHkM_Q1xdxy5S&pullRequest=6835

Check warning on line 44 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/conn/SafePoolingHttpClientConnectionManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this 'public' modifier.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNoXkZ0EE30Smc4s&open=AZ1GBNoXkZ0EE30Smc4s&pullRequest=6835

Check warning on line 97 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5X&open=AZ1QZh5KHkM_Q1xdxy5X&pullRequest=6835

Check warning on line 149 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.util.concurrent.TimeoutException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5e&open=AZ1QZh5KHkM_Q1xdxy5e&pullRequest=6835

Check warning on line 195 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5i&open=AZ1QZh5KHkM_Q1xdxy5i&pullRequest=6835

Check warning on line 29 in http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this generic name to match the regular expression '^[A-Z][0-9]?$'.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNoCkZ0EE30Smc4q&open=AZ1GBNoCkZ0EE30Smc4q&pullRequest=6835

Check warning on line 38 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this 'public' modifier.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5T&open=AZ1QZh5KHkM_Q1xdxy5T&pullRequest=6835

Check warning on line 47 in http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/internal/conn/SafeStrictConnPool.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add the "@Override" annotation above this method signature

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNn1kZ0EE30Smc4p&open=AZ1GBNn1kZ0EE30Smc4p&pullRequest=6835

Check warning on line 89 in http-clients/apache5-client/src/main/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNoCkZ0EE30Smc4r&open=AZ1GBNoCkZ0EE30Smc4r&pullRequest=6835

Check warning on line 115 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/conn/SafePoolingHttpClientConnectionManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "execute"; it is deprecated.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNoXkZ0EE30Smc4t&open=AZ1GBNoXkZ0EE30Smc4t&pullRequest=6835

Check warning on line 134 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5c&open=AZ1QZh5KHkM_Q1xdxy5c&pullRequest=6835

Check warning on line 167 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.util.concurrent.TimeoutException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5g&open=AZ1QZh5KHkM_Q1xdxy5g&pullRequest=6835

Check warning on line 143 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5d&open=AZ1QZh5KHkM_Q1xdxy5d&pullRequest=6835

Check warning on line 55 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5U&open=AZ1QZh5KHkM_Q1xdxy5U&pullRequest=6835

Check warning on line 123 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5a&open=AZ1QZh5KHkM_Q1xdxy5a&pullRequest=6835

Check warning on line 125 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/conn/SafePoolingHttpClientConnectionManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use isZero() instead.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1GBNoXkZ0EE30Smc4u&open=AZ1GBNoXkZ0EE30Smc4u&pullRequest=6835

Check warning on line 177 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5h&open=AZ1QZh5KHkM_Q1xdxy5h&pullRequest=6835

Check warning on line 83 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5V&open=AZ1QZh5KHkM_Q1xdxy5V&pullRequest=6835

Check warning on line 109 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5Z&open=AZ1QZh5KHkM_Q1xdxy5Z&pullRequest=6835

Check warning on line 159 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5f&open=AZ1QZh5KHkM_Q1xdxy5f&pullRequest=6835

Check warning on line 132 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'java.util.concurrent.TimeoutException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5b&open=AZ1QZh5KHkM_Q1xdxy5b&pullRequest=6835

Check warning on line 89 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5W&open=AZ1QZh5KHkM_Q1xdxy5W&pullRequest=6835

Check warning on line 210 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5j&open=AZ1QZh5KHkM_Q1xdxy5j&pullRequest=6835

Check warning on line 98 in http-clients/apache5-client/src/test/java/software/amazon/awssdk/http/apache5/internal/utils/CancelOnInterruptWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=aws_aws-sdk-java-v2&issues=AZ1QZh5KHkM_Q1xdxy5Y&open=AZ1QZh5KHkM_Q1xdxy5Y&pullRequest=6835