Currently both Hibernate ORM and Hibernate OGM require to apply similar strategy loader to handle full compatibility between different Byte Buddy and JDK versions, for JDK 9+.
We would like to allow Hibernate OGM, or others frameworks, to use the same method as SPI.
See issue OGM-1488.
To handle this we could move the method org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState#resolveClassLoadingStrategy under the package org.hibernate.bytecode.spi.
Let's apply this to 5.4 only for now. We can backport later if there's strong need for it, but we should default to being conservative.