diff --git a/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/EgTest.java b/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/EgTest.java index e781d02985..e5fb855b27 100644 --- a/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/EgTest.java +++ b/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/EgTest.java @@ -18,7 +18,7 @@ import static org.hibernate.processor.test.util.TestUtil.getMetaModelSourceAsStr */ public class EgTest extends CompilationTest { @Test - @WithClasses({ Publisher.class, Author.class, Address.class, Book.class, Library.class, Bookshop.class }) + @WithClasses({ Publisher.class, Author.class, Address.class, Book.class, Library.class, Bookshop.class, Publishers.class }) public void test() { System.out.println( getMetaModelSourceAsString( Author.class ) ); System.out.println( getMetaModelSourceAsString( Book.class ) ); @@ -26,6 +26,7 @@ public class EgTest extends CompilationTest { System.out.println( getMetaModelSourceAsString( Book.class, true ) ); System.out.println( getMetaModelSourceAsString( Library.class ) ); System.out.println( getMetaModelSourceAsString( Bookshop.class ) ); + System.out.println( getMetaModelSourceAsString( Publishers.class ) ); assertMetamodelClassGeneratedFor( Author.class, true ); assertMetamodelClassGeneratedFor( Book.class, true ); assertMetamodelClassGeneratedFor( Publisher.class, true ); @@ -34,5 +35,6 @@ public class EgTest extends CompilationTest { assertMetamodelClassGeneratedFor( Publisher.class ); assertMetamodelClassGeneratedFor( Library.class ); assertMetamodelClassGeneratedFor( Bookshop.class ); + assertMetamodelClassGeneratedFor( Publishers.class ); } } diff --git a/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Publishers.java b/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Publishers.java new file mode 100644 index 0000000000..9b49542291 --- /dev/null +++ b/tooling/metamodel-generator/src/jakartaData/java/org/hibernate/processor/test/data/eg/Publishers.java @@ -0,0 +1,8 @@ +package org.hibernate.processor.test.data.eg; + +import jakarta.data.repository.BasicRepository; +import jakarta.data.repository.Repository; + +@Repository +public interface Publishers extends BasicRepository { +} diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java index 727fc21896..1dc93c445d 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java @@ -1875,13 +1875,18 @@ public class AnnotationMetaEntity extends AnnotationMeta { parameterType = typeVariable.getUpperBound(); // INTENTIONAL FALL-THROUGH case DECLARED: - final TypeElement list = context.getTypeElementForFullyQualifiedName(LIST); - if ( types.isSameType( parameterType, types.getDeclaredType( list, attributeType) ) ) { + if ( types.isSameType( parameterType, attributeType) ) { return true; } else { - parameterTypeError( entityType, param, attributeType ); - return false; + final TypeElement list = context.getTypeElementForFullyQualifiedName(LIST); + if ( types.isSameType( parameterType, types.getDeclaredType( list, attributeType) ) ) { + return true; + } + else { + parameterTypeError( entityType, param, attributeType ); + return false; + } } case ARRAY: if ( !types.isSameType( parameterType, types.getArrayType(attributeType) ) ) {