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

Improve version comparison when number of version segments is different #547

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

sleberknight
Copy link
Member

  • Make entire version comparison case-insensitive
  • Update Versions#versionCompare to handle cases in which versions
    contain things like SNAPSHOT, alpha1, beta3, M1 etc.
  • Extract some methods to keep versionCompare relatively clean
  • Revise javadocs for Versions#versionCompare
  • Add a bunch of additional test expectations with versions from
    libraries we use such as Guava, Spring (w/ RELEASE naming convention),
    Jetty (old convention with yyyymmdd), JUnit with M1, M2, etc. as well
    as a bunch of other commonly seen situations that ought to cover the
    majority of real-world situations.

Closes #45

* Make entire version comparison case-insensitive
* Update Versions#versionCompare to handle cases in which versions
  contain things like SNAPSHOT, alpha1, beta3, M1 etc.
* Extract some methods to keep versionCompare relatively clean
* Revise javadocs for Versions#versionCompare
* Add a bunch of additional test expectations with versions from
  libraries we use such as Guava, Spring (w/ RELEASE naming convention),
  Jetty (old convention with yyyymmdd), JUnit with M1, M2, etc. as well
  as a bunch of other commonly seen situations that ought to cover the
  majority of real-world situations.

Closes #45
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@sleberknight sleberknight merged commit 7629d58 into master Apr 14, 2021
@sleberknight sleberknight deleted the 45-improve-version-comparison branch April 14, 2021 01:25
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.

Improve version comparison when number of version "segments" are different
2 participants