Skip to content

Use long in Semver.max() for large version segments#6952

Merged
timtebeek merged 1 commit intomainfrom
semver-use-long
Mar 12, 2026
Merged

Use long in Semver.max() for large version segments#6952
timtebeek merged 1 commit intomainfrom
semver-use-long

Conversation

@Jenson3210
Copy link
Contributor

@Jenson3210 Jenson3210 commented Mar 12, 2026

TildeRange, CaretRange, and LatestRelease.compare() already use long; Semver.max() was the last method using Integer.parseInt, which would throw NumberFormatException for date-based version segments like 202302104298.

Completes the int-to-long migration in the semver package. TildeRange,
CaretRange, and LatestRelease already use long; Semver.max() was the
last holdout using Integer.parseInt, which would still throw for
date-based version segments like 202302104298.
@Jenson3210
Copy link
Contributor Author

@timtebeek this was not covered by (as it was not needed for that particular recipe failure)

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Mar 12, 2026
@timtebeek timtebeek merged commit 80cb628 into main Mar 12, 2026
1 check passed
@timtebeek timtebeek deleted the semver-use-long branch March 12, 2026 10:11
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants