diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java index 9882f713b0..5d23c03bb7 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java @@ -381,9 +381,9 @@ public class EntityBinder { } private void applyTypeBinder(AnnotationUsage metaAnnotated, PersistentClass persistentClass) { - final AnnotationUsage metaAnnotation = metaAnnotated.getAnnotationDescriptor().getAnnotationUsage( TypeBinderType.class ); - final ClassDetails binderClassDetails = metaAnnotation.getClassDetails( "binder" ); - final Class> binderClass = binderClassDetails.toJavaClass(); + final Class> binderClass = metaAnnotated.getAnnotationType() + .getAnnotation( TypeBinderType.class ) + .binder(); final Annotation containingAnnotation = metaAnnotated.toAnnotation();