Skip to content

Commit 81e9461

Browse files
committed
HHH-18920 Proper class name is JpaSelection.getJavaTypeName(), not JpaSelection.getJavaType().getName()
1 parent 0bf4f00 commit 81e9461

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -2686,12 +2686,11 @@ private static boolean constructorMatches(
26862686

26872687
private static boolean parameterMatches(VariableElement parameter, JpaSelection<?> item) {
26882688
final Class<?> javaType = item.getJavaType();
2689-
return javaType != null && parameterMatches( parameter.asType(), javaType );
2689+
return javaType != null && parameterMatches( parameter.asType(), javaType, item.getJavaTypeName() );
26902690
}
26912691

2692-
private static boolean parameterMatches(TypeMirror parameterType, Class<?> itemType) {
2692+
private static boolean parameterMatches(TypeMirror parameterType, Class<?> itemType, String itemTypeName) {
26932693
final TypeKind kind = parameterType.getKind();
2694-
final String itemTypeName = itemType.getName();
26952694
if ( kind == TypeKind.DECLARED ) {
26962695
final DeclaredType declaredType = (DeclaredType) parameterType;
26972696
final TypeElement paramTypeElement = (TypeElement) declaredType.asElement();
@@ -2703,7 +2702,7 @@ else if ( kind.isPrimitive() ) {
27032702
else if ( kind == TypeKind.ARRAY ) {
27042703
final ArrayType arrayType = (ArrayType) parameterType;
27052704
return itemType.isArray()
2706-
&& parameterMatches( arrayType.getComponentType(), itemType.getComponentType() );
2705+
&& parameterMatches( arrayType.getComponentType(), itemType.getComponentType(), itemType.getComponentType().getTypeName() );
27072706
}
27082707
else {
27092708
return false;

0 commit comments

Comments
 (0)