Skip to content

Commit

Permalink
Make org.jboss.logging.tools.addGeneratedAnnotation actually ignore…
Browse files Browse the repository at this point in the history
… the rendering of the `@Generated` annotation
  • Loading branch information
marko-bekhta committed Jun 11, 2024
1 parent 6a8bdf9 commit 814acc9
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,15 @@ private AptMessageInterface(final TypeElement interfaceElement, final Processing
} else {
validIdRanges = Collections.emptyList();
}
// Determine the type for the generated annotation
final ModuleElement moduleElement = processingEnv.getElementUtils()
.getModuleElement(Generated.class.getModule().getName());
this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement, Generated.class.getName());
if (addGeneratedAnnotation) {
// Determine the type for the generated annotation
final ModuleElement moduleElement = processingEnv.getElementUtils()
.getModuleElement(Generated.class.getModule().getName());
this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement,
Generated.class.getName());
} else {
this.generatedAnnotation = null;
}
}

@Override
Expand Down

0 comments on commit 814acc9

Please sign in to comment.