3838import org .springframework .core .convert .support .GenericConversionService ;
3939import org .springframework .data .convert .CustomConversions ;
4040import org .springframework .data .mapping .AssociationHandler ;
41+ import org .springframework .data .mapping .InstanceCreatorMetadata ;
4142import org .springframework .data .mapping .MappingException ;
4243import org .springframework .data .mapping .PersistentPropertyAccessor ;
4344import org .springframework .data .mapping .PersistentPropertyPath ;
44- import org .springframework .data .mapping .PreferredConstructor ;
4545import org .springframework .data .mapping .PropertyHandler ;
4646import org .springframework .data .mapping .model .EntityInstantiator ;
4747import org .springframework .data .mapping .model .EntityInstantiators ;
5555import org .springframework .data .redis .core .mapping .RedisPersistentEntity ;
5656import org .springframework .data .redis .core .mapping .RedisPersistentProperty ;
5757import org .springframework .data .redis .util .ByteUtils ;
58- import org .springframework .data .util .ClassTypeInformation ;
5958import org .springframework .data .util .ProxyUtils ;
6059import org .springframework .data .util .TypeInformation ;
6160import org .springframework .lang .Nullable ;
@@ -177,7 +176,7 @@ public MappingRedisConverter(@Nullable RedisMappingContext mappingContext, @Null
177176 @ SuppressWarnings ("unchecked" )
178177 public <R > R read (Class <R > type , RedisData source ) {
179178
180- TypeInformation <?> readType = typeMapper .readType (source .getBucket ().getPath (), ClassTypeInformation . from (type ));
179+ TypeInformation <?> readType = typeMapper .readType (source .getBucket ().getPath (), TypeInformation . of (type ));
181180
182181 return readType .isCollectionLike ()
183182 ? (R ) readCollectionOrArray ("" , ArrayList .class , Object .class , source .getBucket ())
@@ -193,7 +192,7 @@ private <R> R readInternal(String path, Class<R> type, RedisData source) {
193192 @ SuppressWarnings ("unchecked" )
194193 private <R > R doReadInternal (String path , Class <R > type , RedisData source ) {
195194
196- TypeInformation <?> readType = typeMapper .readType (source .getBucket ().getPath (), ClassTypeInformation . from (type ));
195+ TypeInformation <?> readType = typeMapper .readType (source .getBucket ().getPath (), TypeInformation . of (type ));
197196
198197 if (customConversions .hasCustomReadTarget (Map .class , readType .getType ())) {
199198
@@ -237,9 +236,9 @@ private <R> R doReadInternal(String path, Class<R> type, RedisData source) {
237236
238237 entity .doWithProperties ((PropertyHandler <RedisPersistentProperty >) persistentProperty -> {
239238
240- PreferredConstructor <?, RedisPersistentProperty > constructor = entity .getPersistenceConstructor ();
239+ InstanceCreatorMetadata < RedisPersistentProperty > creator = entity .getInstanceCreatorMetadata ();
241240
242- if (constructor != null && constructor . isConstructorParameter (persistentProperty )) {
241+ if (creator != null && creator . isCreatorParameter (persistentProperty )) {
243242 return ;
244243 }
245244
@@ -490,10 +489,10 @@ private void writePartialPropertyUpdate(PartialUpdate<?> update, PropertyUpdate
490489
491490 targetProperty = getTargetPropertyOrNullForPath (path .replaceAll ("\\ .\\ [.*\\ ]" , "" ), update .getTarget ());
492491
493- TypeInformation <?> ti = targetProperty == null ? ClassTypeInformation .OBJECT
492+ TypeInformation <?> ti = targetProperty == null ? TypeInformation .OBJECT
494493 : (targetProperty .isMap () ? (targetProperty .getTypeInformation ().getMapValueType () != null
495494 ? targetProperty .getTypeInformation ().getRequiredMapValueType ()
496- : ClassTypeInformation .OBJECT ) : targetProperty .getTypeInformation ().getActualType ());
495+ : TypeInformation .OBJECT ) : targetProperty .getTypeInformation ().getActualType ());
497496
498497 writeInternal (entity .getKeySpace (), pUpdate .getPropertyPath (), pUpdate .getValue (), ti , sink );
499498 return ;
@@ -820,7 +819,7 @@ private Object readCollectionOrArray(String path, Class<?> collectionType, Class
820819 Bucket elementData = bucket .extract (key );
821820
822821 TypeInformation <?> typeInformation = typeMapper .readType (elementData .getPropertyPath (key ),
823- ClassTypeInformation . from (valueType ));
822+ TypeInformation . of (valueType ));
824823
825824 Class <?> typeToUse = typeInformation .getType ();
826825 if (conversionService .canConvert (byte [].class , typeToUse )) {
@@ -863,7 +862,7 @@ private void writeMap(@Nullable String keyspace, String path, Class<?> mapValueT
863862 if (customConversions .hasCustomWriteTarget (entry .getValue ().getClass ())) {
864863 writeToBucket (currentPath , entry .getValue (), sink , mapValueType );
865864 } else {
866- writeInternal (keyspace , currentPath , entry .getValue (), ClassTypeInformation . from (mapValueType ), sink );
865+ writeInternal (keyspace , currentPath , entry .getValue (), TypeInformation . of (mapValueType ), sink );
867866 }
868867 }
869868 }
@@ -930,7 +929,7 @@ private String mapMapKey(Object key) {
930929 Object mapKey = extractMapKeyForPath (path , key , keyType );
931930
932931 TypeInformation <?> typeInformation = typeMapper .readType (source .getBucket ().getPropertyPath (key ),
933- ClassTypeInformation . from (valueType ));
932+ TypeInformation . of (valueType ));
934933
935934 Object o = readInternal (key , typeInformation .getType (), new RedisData (partial ));
936935 target .put (mapKey , o );
@@ -963,7 +962,7 @@ private Object extractMapKeyForPath(String path, String key, Class<?> targetType
963962 private Class <?> getTypeHint (String path , Bucket bucket , Class <?> fallback ) {
964963
965964 TypeInformation <?> typeInformation = typeMapper .readType (bucket .getPropertyPath (path ),
966- ClassTypeInformation . from (fallback ));
965+ TypeInformation . of (fallback ));
967966 return typeInformation .getType ();
968967 }
969968
0 commit comments