Skip to content

Commit 822f301

Browse files
committed
HHH-19425 fix missing '.class' when annotations copied to repo implementations
1 parent cc18eb8 commit 822f301

File tree

1 file changed

+6
-2
lines changed
  • tooling/metamodel-generator/src/main/java/org/hibernate/processor

1 file changed

+6
-2
lines changed

tooling/metamodel-generator/src/main/java/org/hibernate/processor/ClassWriter.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import javax.lang.model.element.PackageElement;
1818
import javax.lang.model.element.TypeElement;
1919
import javax.lang.model.element.VariableElement;
20+
import javax.lang.model.type.TypeMirror;
2021
import javax.tools.Diagnostic;
2122
import javax.tools.FileObject;
2223
import java.io.IOException;
@@ -190,9 +191,12 @@ private static void printAnnotationValue(PrintWriter pw, AnnotationValue value)
190191
else if (argument instanceof AnnotationMirror childAnnotation) {
191192
printAnnotation( childAnnotation, pw );
192193
}
194+
else if (argument instanceof TypeMirror) {
195+
pw.print(argument);
196+
pw.print(".class");
197+
}
193198
else if (argument instanceof List) {
194-
final List<? extends AnnotationValue> list =
195-
(List<? extends AnnotationValue>) argument;
199+
final var list = (List<? extends AnnotationValue>) argument;
196200
pw.print('{');
197201
boolean first = true;
198202
for (AnnotationValue listedValue : list) {

0 commit comments

Comments
 (0)