openrewrite / openrewrite/rewrite
ChangePackage/ChangeType do not apply to package-info.java Javadoc
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 570
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 261
Description
What version of OpenRewrite are you using?
v8.91.3 (latest)
What is the smallest, simplest way to reproduce the problem?
ChangePackage fails to rewrite {@link} references in a package-info.java file's Javadoc.
Recipe:
new ChangePackage("org.openrewrite", "org.openrewrite.test", true)
Before (package-info.java):
/**
* See {@link org.openrewrite.Existing}
*/
package com.example;
What did you expect to see?
/**
* See {@link org.openrewrite.test.Existing}
*/
package com.example;
What did you see instead?
No change — the recipe silently no-ops on the file. The same Javadoc on a class instead of a package declaration is rewritten correctly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ChangePackage recipe and reproduce the issue using the package-info.java Javadoc example from the report. Trace how package declarations and their Javadoc are visited, then ensure the {@link} reference is rewritten as shown and verify that class-level Javadoc behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100