test(java): reproduce package-info.java Javadoc {@link} not rewritten by ChangePackage (#8731) - #8732
Draft
SamBarker wants to merge 2 commits into
Draft
test(java): reproduce package-info.java Javadoc {@link} not rewritten by ChangePackage (#8731)#8732SamBarker wants to merge 2 commits into
SamBarker wants to merge 2 commits into
Conversation
ChangePackage does not rewrite {@link} type references in Javadoc
attached to a package declaration in package-info.java, even though
the same Javadoc on a class works correctly.
Fixes openrewrite#8731
Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Sam Barker <sam@quadrocket.co.uk>
SamBarker
marked this pull request as draft
September 1, 2026 21:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
What's your motivation?
Fix: ChangePackage/ChangeType do not apply to package-info.java Javadoc #8731
Found while testing the fix in fix(java): correctly parse named attribute assignment in annotations (#8723) #8724 against a real-world migration (kroxylicious).
ChangePackagesilently makes no change to Javadoc{@link}references when the Javadoc is attached to a package declaration inpackage-info.java, even though the identical reference on a class Javadoc is rewritten correctly.Anything in particular you'd like reviewers to focus on?
ChangePackageitself — see my comment on ChangePackage/ChangeType do not apply to package-info.java Javadoc #8731 for what I found. It spiraled in scope beyond what felt appropriate for me to attempt solo, so I'm opening this with just the failing test and would welcome input from someone with more experience in this part of the parser.Checklist
./gradlew buildlocally, and committed any resulting changes torecipes.csv