@@ -874,9 +874,8 @@ private <J> BasicDomainType<J> basicDomainType(Class<J> javaType) {
874874 : new BasicTypeImpl <>( javaTypeDescriptor , jdbcType );
875875 }
876876
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 );
880879 if ( domainType != null ) {
881880 return domainType ;
882881 }
@@ -886,7 +885,7 @@ public <J> EmbeddableDomainType<J> locateEmbeddable(Class<J> embeddableClass, Co
886885 for ( var embeddableDomainType : embeddableDomainTypes ) {
887886 final Component cachedComponent = componentByEmbeddable .get ( embeddableDomainType );
888887 if ( cachedComponent .isSame ( component ) ) {
889- return ( EmbeddableDomainType < J >) embeddableDomainType ;
888+ return embeddableDomainType ;
890889 }
891890 else if ( cachedComponent .getComponentClass ().equals ( component .getComponentClass () ) ) {
892891 final int cachedComponentPropertySpan = cachedComponent .getPropertySpan ();
@@ -905,7 +904,7 @@ else if ( cachedComponent.getComponentClass().equals( component.getComponentClas
905904 }
906905 }
907906 }
908- return ( EmbeddableDomainType < J >) embeddableDomainType ;
907+ return embeddableDomainType ;
909908 }
910909 else {
911910 throw new MappingException ( "Encountered multiple component mappings for the same java class "
0 commit comments