Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safely declare Netty AttributeKeys #1887

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Safely declare Netty AttributeKeys #1887

merged 1 commit into from
Jun 10, 2020

Conversation

dagnir
Copy link
Contributor

@dagnir dagnir commented Jun 10, 2020

This commit prevents the Netty client from throwing an exception in cases where
it tries to declare an attribute key and the key already exists. This can happen
when separate instances of the SDK are loaded by different classloaders, but the
Netty classes loaded by a third and shared by the other classloaders.

Fixes #1886

Description

Motivation and Context

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

This commit prevents the Netty client from throwing an exception in cases where
it tries to declare an attribute key and the key already exists. This can happen
when separate instances of the SDK are loaded by different classloaders, but the
Netty classes loaded by a third and shared by the other classloaders.

Fixes aws#1886
@sonarcloud
Copy link

sonarcloud bot commented Jun 10, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2020

Codecov Report

Merging #1887 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1887      +/-   ##
============================================
- Coverage     76.21%   76.21%   -0.01%     
  Complexity      187      187              
============================================
  Files          1076     1076              
  Lines         32564    32568       +4     
  Branches       2569     2569              
============================================
+ Hits          24818    24821       +3     
- Misses         6486     6488       +2     
+ Partials       1260     1259       -1     
Flag Coverage Δ Complexity Δ
#unittests 76.21% <100.00%> (-0.01%) 187.00 <0.00> (ø)
Impacted Files Coverage Δ Complexity Δ
...k/http/nio/netty/internal/ChannelAttributeKey.java 100.00% <100.00%> (ø) 0.00 <0.00> (ø)
.../nio/netty/internal/Http1TunnelConnectionPool.java 98.24% <100.00%> (ø) 0.00 <0.00> (ø)
...ttp/nio/netty/internal/ReleaseOnceChannelPool.java 80.00% <100.00%> (ø) 0.00 <0.00> (ø)
...ty/internal/http2/Http2MultiplexedChannelPool.java 76.75% <100.00%> (ø) 0.00 <0.00> (ø)
...ssdk/http/nio/netty/internal/utils/NettyUtils.java 37.50% <100.00%> (+4.16%) 0.00 <0.00> (ø)
...ernal/utils/OrderedWriteChannelHandlerContext.java 60.86% <100.00%> (ø) 0.00 <0.00> (ø)
.../awssdk/http/apache/internal/net/SdkSslSocket.java 50.00% <0.00%> (-9.10%) 0.00% <0.00%> (ø%)
...ware/amazon/awssdk/utils/cache/CachedSupplier.java 90.24% <0.00%> (+2.43%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d155ac8...96e67ec. Read the comment docs.

@dagnir dagnir merged commit b679524 into aws:master Jun 10, 2020
@dagnir dagnir deleted the gh1886 branch June 11, 2020 00:12
aws-sdk-java-automation added a commit that referenced this pull request Jan 6, 2022
…d159b777d

Pull request: release <- staging/51882ae8-4247-4092-9ccc-2bcd159b777d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalArgumentException: 'isReleased' is already in use
3 participants