Skip to content

Commit 9e47ba9

Browse files
authored
Merge pull request #112 from marko-bekhta/fix/generated-timestamp
[LOGTOOL-160] Fix skiping of rendering a Generated annotation
2 parents 8c0c59d + 814acc9 commit 9e47ba9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

processor/src/main/java/org/jboss/logging/processor/apt/MessageInterfaceFactory.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,15 @@ private AptMessageInterface(final TypeElement interfaceElement, final Processing
139139
} else {
140140
validIdRanges = Collections.emptyList();
141141
}
142-
// Determine the type for the generated annotation
143-
final ModuleElement moduleElement = processingEnv.getElementUtils()
144-
.getModuleElement(Generated.class.getModule().getName());
145-
this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement, Generated.class.getName());
142+
if (addGeneratedAnnotation) {
143+
// Determine the type for the generated annotation
144+
final ModuleElement moduleElement = processingEnv.getElementUtils()
145+
.getModuleElement(Generated.class.getModule().getName());
146+
this.generatedAnnotation = processingEnv.getElementUtils().getTypeElement(moduleElement,
147+
Generated.class.getName());
148+
} else {
149+
this.generatedAnnotation = null;
150+
}
146151
}
147152

148153
@Override

0 commit comments

Comments
 (0)