Bytecode enhancement with Generics on @MappedSuperclass crashes bootstrapping while using Bytebuddy

Description

It seems that bytecode enhancement has changed from 5.2 to 5.3:

Using bytecode enhancement and bootstrapping Hibernate results in:

This is because bytecode enhancement creates:

In 5.2.17, it looked like

Removing the generic return type from the field and casting to the generic in getEntity() does not work in the test case, but solved the issues in our code stack.

Test case:
https://github.com/nikowitt/hibernate-test-case-templates/tree/HHH-12579

Environment

None

Assignee

Guillaume Smet

Reporter

Niko Wittenbeck

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure