Skip to content

Commit d900a6d

Browse files
committed
HHH-18500 If superclass is null, class should not be enhanced, simply return empty collection
1 parent 5af1856 commit d900a6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/bytebuddy/PersistentAttributeTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private static Collection<AnnotatedFieldDescription> collectInheritPersistentFie
148148
}
149149
TypeDefinition managedCtSuperclass = managedCtClass.getSuperClass();
150150

151-
if ( enhancementContext.isEntityClass( managedCtSuperclass.asErasure() ) ) {
151+
if ( managedCtSuperclass == null || enhancementContext.isEntityClass( managedCtSuperclass.asErasure() ) ) {
152152
return Collections.emptyList();
153153
}
154154
else if ( !enhancementContext.isMappedSuperclassClass( managedCtSuperclass.asErasure() ) ) {

0 commit comments

Comments
 (0)