Skip to content

Commit d779125

Browse files
committed
HHH-7803 Refactored the attribute type discovery and moved into ReflectHelper
1 parent 037f081 commit d779125

File tree

1 file changed

+4
-5
lines changed
  • hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/entity

1 file changed

+4
-5
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/annotations/entity/ConfiguredClass.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
import org.hibernate.metamodel.internal.source.annotations.util.JandexHelper;
5858
import org.hibernate.metamodel.spi.binding.SingularAttributeBinding;
5959
import org.hibernate.metamodel.spi.source.MappingException;
60-
import org.hibernate.validator.util.ReflectionHelper;
6160
import org.jboss.jandex.AnnotationInstance;
6261
import org.jboss.jandex.AnnotationTarget;
6362
import org.jboss.jandex.ClassInfo;
@@ -323,7 +322,7 @@ private boolean isPersistentMember(Set<String> transientNames, Set<String> expli
323322
return false;
324323
}
325324

326-
if ( explicitlyConfiguredMemberNames.contains( ReflectionHelper.getPropertyName( member ) ) ) {
325+
if ( explicitlyConfiguredMemberNames.contains( ReflectHelper.getPropertyName( member ) ) ) {
327326
return false;
328327
}
329328

@@ -396,7 +395,7 @@ private Set<String> createExplicitlyConfiguredAccessProperties(ResolvedTypeWithM
396395
}
397396
if ( ReflectHelper.isProperty( member ) ) {
398397
createMappedAttribute( member, resolvedMembers, accessType );
399-
explicitAccessPropertyNames.add( ReflectionHelper.getPropertyName( member ) );
398+
explicitAccessPropertyNames.add( ReflectHelper.getPropertyName( member ) );
400399
}
401400
}
402401
return explicitAccessPropertyNames;
@@ -437,7 +436,7 @@ private void checkExplicitJpaAttributeAccessAnnotationPlacedCorrectly(Annotation
437436
}
438437

439438
private void createMappedAttribute(Member member, ResolvedTypeWithMembers resolvedType, AccessType accessType) {
440-
final String attributeName = ReflectionHelper.getPropertyName( member );
439+
final String attributeName = ReflectHelper.getPropertyName( member );
441440
final ResolvedMember[] resolvedMembers = Field.class.isInstance( member ) ? resolvedType.getMemberFields() : resolvedType
442441
.getMemberMethods();
443442
ResolvedMember resolvedMember = findResolvedMember( member.getName(), resolvedMembers );
@@ -581,7 +580,7 @@ private EmbeddableClass resolveEmbeddable(String attributeName, Class<?> type, M
581580
* Given the annotations defined on a persistent attribute this methods determines the attribute type.
582581
*
583582
* @param annotations the annotations defined on the persistent attribute
584-
* @param type the attribute's type
583+
* @param attributeType the attribute's type
585584
* @param referencedCollectionType the type of the collection element in case the attribute is collection valued
586585
*
587586
* @return an instance of the {@code AttributeType} enum

0 commit comments

Comments
 (0)