Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Nov 4, 2024
1 parent 63e0cc6 commit 381c73b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ private void emitClass(TypeElement annotatedClass) {
try (PrintWriter out =
new PrintWriter(
processingEnv.getFiler().createSourceFile(generatedClassName).openWriter())) {
out.printf("package %s;\n", generatedClassPackage);
if (!generatedClassPackage.isEmpty()) {
// This annotation may exist on a class which is at the root package
out.printf("package %s;\n", generatedClassPackage);
}
out.printf("\n");
out.printf("class %s {\n", generatedClassSimpleName);
out.printf(" /**\n");
Expand Down

0 comments on commit 381c73b

Please sign in to comment.