@@ -874,9 +874,8 @@ private <J> BasicDomainType<J> basicDomainType(Class<J> javaType) {
874
874
: new BasicTypeImpl <>( javaTypeDescriptor , jdbcType );
875
875
}
876
876
877
- @ SuppressWarnings ("unchecked" )
878
- public <J > EmbeddableDomainType <J > locateEmbeddable (Class <J > embeddableClass , Component component ) {
879
- final var domainType = (EmbeddableDomainType <J >) embeddables .get ( embeddableClass );
877
+ public EmbeddableDomainType <?> locateEmbeddable (Class <?> embeddableClass , Component component ) {
878
+ final var domainType = embeddables .get ( embeddableClass );
880
879
if ( domainType != null ) {
881
880
return domainType ;
882
881
}
@@ -886,7 +885,7 @@ public <J> EmbeddableDomainType<J> locateEmbeddable(Class<J> embeddableClass, Co
886
885
for ( var embeddableDomainType : embeddableDomainTypes ) {
887
886
final Component cachedComponent = componentByEmbeddable .get ( embeddableDomainType );
888
887
if ( cachedComponent .isSame ( component ) ) {
889
- return ( EmbeddableDomainType < J >) embeddableDomainType ;
888
+ return embeddableDomainType ;
890
889
}
891
890
else if ( cachedComponent .getComponentClass ().equals ( component .getComponentClass () ) ) {
892
891
final int cachedComponentPropertySpan = cachedComponent .getPropertySpan ();
@@ -905,7 +904,7 @@ else if ( cachedComponent.getComponentClass().equals( component.getComponentClas
905
904
}
906
905
}
907
906
}
908
- return ( EmbeddableDomainType < J >) embeddableDomainType ;
907
+ return embeddableDomainType ;
909
908
}
910
909
else {
911
910
throw new MappingException ( "Encountered multiple component mappings for the same java class "
0 commit comments