mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-07 18:29:29 +00:00
HHH-18500 If superclass is null, class should not be enhanced, simply return empty collection
This commit is contained in:
parent
b25dc774ea
commit
df16ea9694
@ -145,7 +145,10 @@ private static Collection<AnnotatedFieldDescription> collectInheritPersistentFie
|
|||||||
}
|
}
|
||||||
TypeDefinition managedCtSuperclass = managedCtClass.getSuperClass();
|
TypeDefinition managedCtSuperclass = managedCtClass.getSuperClass();
|
||||||
|
|
||||||
if ( enhancementContext.isEntityClass( managedCtSuperclass.asErasure() ) ) {
|
// If managedCtSuperclass is null, managedCtClass can be either interface or module-info.
|
||||||
|
// Interfaces are already filtered-out, and module-info does not have any fields to enhance
|
||||||
|
// so we can safely return empty list.
|
||||||
|
if ( managedCtSuperclass == null || enhancementContext.isEntityClass( managedCtSuperclass.asErasure() ) ) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
else if ( !enhancementContext.isMappedSuperclassClass( managedCtSuperclass.asErasure() ) ) {
|
else if ( !enhancementContext.isMappedSuperclassClass( managedCtSuperclass.asErasure() ) ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user