Skip to content

Fix shortening java.lang annotations#8009

Open
sakshichitnis27 wants to merge 1 commit into
openrewrite:mainfrom
sakshichitnis27:fix/6066-java-lang-importservice
Open

Fix shortening java.lang annotations#8009
sakshichitnis27 wants to merge 1 commit into
openrewrite:mainfrom
sakshichitnis27:fix/6066-java-lang-importservice

Conversation

@sakshichitnis27

@sakshichitnis27 sakshichitnis27 commented Jun 14, 2026

Copy link
Copy Markdown

Added regression coverage for ImportService.shortenFullyQualifiedTypeReferencesIn shortening java.lang annotation references such as @java.lang.Deprecated to @deprecated.

Also added a same-package conflict case to ensure java.lang annotations remain fully qualified when shortening would change resolution.

Tested with:
./gradlew :rewrite-java-test:test --tests "org.openrewrite.java.ShortenFullyQualifiedTypeReferencesTest" --rerun-tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

ImportService: shortenFullyQualifiedTypeReferencesIn does not work for java.lang

1 participant