Skip to content

Commit

Permalink
Merge pull request #112 from marko-bekhta/fix/generated-timestamp
Browse files Browse the repository at this point in the history
[LOGTOOL-160] Fix skiping of rendering a Generated annotation
  • Loading branch information
jamezp authored Jul 1, 2024
2 parents 8c0c59d + 814acc9 commit 9e47ba9
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 9e47ba9

Please sign in to comment.