Skip to content

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Jan 19, 2026

Summary

  • Replace raw version strings (e.g., "1.8", "11.0.15+10") with normalized major versions ("8", "11") in FindJavaVersion's data table

  • Use getMajorVersion() and getMajorReleaseVersion() from the JavaVersion marker instead of raw fields

  • Update column descriptions in JavaVersionTable to clarify they contain major versions

  • Closes FindJavaVersion (et al) -- normalize version numbers #968

Test plan

  • Existing FindJavaVersionTest passes
  • Full build passes

🤖 Generated with Claude Code

Replace raw version strings with normalized major versions in the
`JavaVersionTable` data table. This addresses issue #968 where users
expect normalized values like "8" instead of "1.8".

- Use `getMajorVersion()` and `getMajorReleaseVersion()` instead of
  raw `getSourceCompatibility()` and `getTargetCompatibility()` fields
- Update column descriptions to clarify they contain major versions

Closes #968

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@timtebeek
Copy link
Member Author

We already have two recipes that report in more detail

Figured good enough then to have this singular recipe only use major versions;

@timtebeek timtebeek added the recipe Recipe requested label Jan 19, 2026
@timtebeek timtebeek marked this pull request as ready for review January 19, 2026 14:36
@timtebeek timtebeek merged commit 4beeb8a into main Jan 19, 2026
2 checks passed
@timtebeek timtebeek deleted the normalize-java-version-numbers branch January 19, 2026 15:00
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

recipe Recipe requested

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

FindJavaVersion (et al) -- normalize version numbers

2 participants