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

fix: update HttpRequest#getVersion to use stable logic #919

Merged
merged 1 commit into from Dec 17, 2019
Merged

fix: update HttpRequest#getVersion to use stable logic #919

merged 1 commit into from Dec 17, 2019

Conversation

BenWhitehead
Copy link
Contributor

The original implementation of getVersion used the implementation
version of the package of the declaring class, however there is
differing behavior between Android and openjdk based jvms.

In order to be consistent across platforms we will now always resolve
the value from the google-http-client.properties file that is
generated during the build. This method should be stable as it based
on loading a classpath resource which has cross jvm support.

Fixes #892

The original implementation of `getVersion` used the implementation
version of the package of the declaring class, however there is
differing behavior between Android and openjdk based jvms.

In order to be consistent across platforms we will now always resolve
the value from the `google-http-client.properties` file that is
generated during the build. This method should be stable as it based
on loading a classpath resource which has cross jvm support.

Fixes #892
@BenWhitehead BenWhitehead requested a review from a team as a code owner December 17, 2019 01:01
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 17, 2019
@chingor13 chingor13 merged commit 853ab4b into googleapis:master Dec 17, 2019
@BenWhitehead BenWhitehead deleted the fix-892 branch December 17, 2019 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versions newer than 1.32.0 report wrong version in User-Agent on Android
4 participants