Skip to content

Adding Java vendor to user agent and using it everywhere #1140

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

Merged
merged 2 commits into from
Mar 19, 2019

Conversation

spfink
Copy link
Contributor

@spfink spfink commented Mar 18, 2019

Adds Java vendor to the user agent:

aws-sdk-java/2.5.1-SNAPSHOT Mac_OS_X/10.12.6 Java_HotSpot_TM__64-Bit_Server_VM/25.202-b08 Java/1.8.0_202 vendor/Oracle_Corporation

aws-sdk-java/2.5.1-SNAPSHOT Mac_OS_X/10.12.6 OpenJDK_64-Bit_Server_VM/25.202-b08 Java/1.8.0_202 vendor/Amazon.com_Inc.

Testing

Updated/added tests

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

@spfink spfink force-pushed the finks/corretto-user-agent branch from 62a74fc to 9c4521c Compare March 18, 2019 20:26
@codecov-io
Copy link

codecov-io commented Mar 18, 2019

Codecov Report

Merging #1140 into master will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1140      +/-   ##
============================================
- Coverage     58.82%   58.81%   -0.01%     
  Complexity     4565     4565              
============================================
  Files           742      742              
  Lines         22893    22895       +2     
  Branches       1707     1707              
============================================
- Hits          13466    13465       -1     
- Misses         8734     8737       +3     
  Partials        693      693
Impacted Files Coverage Δ Complexity Δ
...oftware/amazon/awssdk/utils/JavaSystemSetting.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...awssdk/regions/util/ResourcesEndpointProvider.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...azon/awssdk/core/internal/util/UserAgentUtils.java 64.81% <100%> (+2.55%) 11 <0> (+1) ⬆️
...nio/netty/internal/OldConnectionReaperHandler.java 81.81% <0%> (-9.1%) 14% <0%> (-1%)

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 7438933...10a965d. Read the comment docs.

System.getProperty(JavaSystemSetting.JAVA_VENDOR.property(), "finks");
String userAgent = UserAgentUtils.userAgent();
System.clearProperty(JavaSystemSetting.JAVA_VENDOR.property());
assertThat(userAgent.contains("vendor/finks"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertThat(userAgent).contains("vendor/finks")? same as line 46

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@spfink spfink force-pushed the finks/corretto-user-agent branch from 23a99f0 to 33758e4 Compare March 19, 2019 17:18
@spfink spfink merged commit 019cca1 into master Mar 19, 2019
@spfink spfink deleted the finks/corretto-user-agent branch March 17, 2020 23:41
aws-sdk-java-automation added a commit that referenced this pull request Jan 7, 2021
…a424b42fc

Pull request: release <- staging/95f04397-3568-453d-94b6-e95a424b42fc
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.

3 participants