microsoft / oauth2-useragent

Microsoft OAuth 2.0 User Agent library for Java. Provides classes to facilitate the implementation of "4.1. Authorization Code Grant" from RFC 6749.
Other
35 stars 22 forks source link

Support Java 9+ Version Strings #41

Closed novak closed 6 years ago

novak commented 6 years ago

Java 9 introduced a new format for the Java version string. This PR adds support for the new format and if there's no match will fall back to the previous version string format.

This fixes an issue surfaced in the Git Credential Manager which has this as a dependency: Issue #74

davidstaheli commented 6 years ago

@yacaovsnc can you please review this?

yacaovsnc commented 6 years ago

LGTM. Only a minor style concern. I want to avoid control the flow by exceptions.

novak commented 6 years ago

@yacaovsnc can certainly change that. was actually something I thought of once I opened the PR.

novak commented 6 years ago

@yacaovsnc I refactored getMatches() and updated the generic parseVersion usage as well.

novak commented 6 years ago

Thanks @yacaovsnc

@DavidStaheli is it possible to generate a release for this fix so it can be pulled in for GCM?

novak commented 6 years ago

@olivierdagenais is it possible to generate a release for this fix? thanks!

yacaovsnc commented 6 years ago

@novak I am going to try to do a release of this tomorrow. I was out for the last few days.

novak commented 6 years ago

@yacaovsnc great, thanks!

yacaovsnc commented 6 years ago

@novak 0.11.3 has been released and uploaded to maven central: https://repo1.maven.org/maven2/com/microsoft/alm/oauth2-useragent/0.11.3/

You should be able to update your pom reference and pull down the change now.

novak commented 6 years ago

@yacaovsnc thanks so much for your help!