Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit imports for Record classes past Java 14+ #630

Merged
merged 3 commits into from
Dec 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
No need to add unconditionally
timtebeek committed Dec 15, 2024
commit 9da51eb9c162f691483cb763a426085f1d46b55b
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu, ExecutionCon
if (type instanceof JavaType.FullyQualified) {
JavaType.FullyQualified ref = (JavaType.FullyQualified) type;
if ("Record".equals(ref.getClassName()) && !ref.getPackageName().startsWith("java.lang")) {
maybeAddImport(ref.getFullyQualifiedName(), false);
maybeAddImport(ref.getFullyQualifiedName());
}
}
}