Skip to content

Commit 6e06d99

Browse files
committed
HHH-19326 Resolve as type.toString() as default
1 parent 7c87801 commit 6e06d99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import javax.lang.model.element.VariableElement;
1111
import javax.lang.model.type.ArrayType;
1212
import javax.lang.model.type.DeclaredType;
13+
import javax.lang.model.type.IntersectionType;
1314
import javax.lang.model.type.TypeKind;
1415
import javax.lang.model.type.TypeMirror;
1516
import javax.lang.model.type.TypeVariable;
@@ -411,9 +412,11 @@ else if ( type instanceof WildcardType wildcardType ) {
411412
else if ( type instanceof ArrayType arrayType ) {
412413
return resolveAsString( arrayType.getComponentType() ) + "[]";
413414
}
415+
else if ( type instanceof IntersectionType intersectionType ) {
416+
return intersectionType.getBounds().stream().map( this::resolveAsString ).collect( joining( "&" ) );
417+
}
414418
else {
415-
System.err.printf( "Type kind %s - %s%n", type.getKind(), type );
416-
throw new UnsupportedOperationException();
419+
return type.toString();
417420
}
418421
}
419422

0 commit comments

Comments
 (0)