diff --git a/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java b/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java index b26e28a5d..a9e2c1874 100644 --- a/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java +++ b/src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java @@ -38,10 +38,10 @@ import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.data.convert.CustomConversions; import org.springframework.data.mapping.AssociationHandler; +import org.springframework.data.mapping.InstanceCreatorMetadata; import org.springframework.data.mapping.MappingException; import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.PersistentPropertyPath; -import org.springframework.data.mapping.PreferredConstructor; import org.springframework.data.mapping.PropertyHandler; import org.springframework.data.mapping.model.EntityInstantiator; import org.springframework.data.mapping.model.EntityInstantiators; @@ -55,7 +55,6 @@ import org.springframework.data.redis.core.mapping.RedisMappingContext; import org.springframework.data.redis.core.mapping.RedisPersistentEntity; import org.springframework.data.redis.core.mapping.RedisPersistentProperty; import org.springframework.data.redis.util.ByteUtils; -import org.springframework.data.util.ClassTypeInformation; import org.springframework.data.util.ProxyUtils; import org.springframework.data.util.TypeInformation; import org.springframework.lang.Nullable; @@ -177,7 +176,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { @SuppressWarnings("unchecked") public R read(Class type, RedisData source) { - TypeInformation readType = typeMapper.readType(source.getBucket().getPath(), ClassTypeInformation.from(type)); + TypeInformation readType = typeMapper.readType(source.getBucket().getPath(), TypeInformation.of(type)); return readType.isCollectionLike() ? (R) readCollectionOrArray("", ArrayList.class, Object.class, source.getBucket()) @@ -193,7 +192,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { @SuppressWarnings("unchecked") private R doReadInternal(String path, Class type, RedisData source) { - TypeInformation readType = typeMapper.readType(source.getBucket().getPath(), ClassTypeInformation.from(type)); + TypeInformation readType = typeMapper.readType(source.getBucket().getPath(), TypeInformation.of(type)); if (customConversions.hasCustomReadTarget(Map.class, readType.getType())) { @@ -237,9 +236,9 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { entity.doWithProperties((PropertyHandler) persistentProperty -> { - PreferredConstructor constructor = entity.getPersistenceConstructor(); + InstanceCreatorMetadata creator = entity.getInstanceCreatorMetadata(); - if (constructor != null && constructor.isConstructorParameter(persistentProperty)) { + if (creator != null && creator.isCreatorParameter(persistentProperty)) { return; } @@ -490,10 +489,10 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { targetProperty = getTargetPropertyOrNullForPath(path.replaceAll("\\.\\[.*\\]", ""), update.getTarget()); - TypeInformation ti = targetProperty == null ? ClassTypeInformation.OBJECT + TypeInformation ti = targetProperty == null ? TypeInformation.OBJECT : (targetProperty.isMap() ? (targetProperty.getTypeInformation().getMapValueType() != null ? targetProperty.getTypeInformation().getRequiredMapValueType() - : ClassTypeInformation.OBJECT) : targetProperty.getTypeInformation().getActualType()); + : TypeInformation.OBJECT) : targetProperty.getTypeInformation().getActualType()); writeInternal(entity.getKeySpace(), pUpdate.getPropertyPath(), pUpdate.getValue(), ti, sink); return; @@ -820,7 +819,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { Bucket elementData = bucket.extract(key); TypeInformation typeInformation = typeMapper.readType(elementData.getPropertyPath(key), - ClassTypeInformation.from(valueType)); + TypeInformation.of(valueType)); Class typeToUse = typeInformation.getType(); if (conversionService.canConvert(byte[].class, typeToUse)) { @@ -863,7 +862,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { if (customConversions.hasCustomWriteTarget(entry.getValue().getClass())) { writeToBucket(currentPath, entry.getValue(), sink, mapValueType); } else { - writeInternal(keyspace, currentPath, entry.getValue(), ClassTypeInformation.from(mapValueType), sink); + writeInternal(keyspace, currentPath, entry.getValue(), TypeInformation.of(mapValueType), sink); } } } @@ -930,7 +929,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { Object mapKey = extractMapKeyForPath(path, key, keyType); TypeInformation typeInformation = typeMapper.readType(source.getBucket().getPropertyPath(key), - ClassTypeInformation.from(valueType)); + TypeInformation.of(valueType)); Object o = readInternal(key, typeInformation.getType(), new RedisData(partial)); target.put(mapKey, o); @@ -963,7 +962,7 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean { private Class getTypeHint(String path, Bucket bucket, Class fallback) { TypeInformation typeInformation = typeMapper.readType(bucket.getPropertyPath(path), - ClassTypeInformation.from(fallback)); + TypeInformation.of(fallback)); return typeInformation.getType(); } diff --git a/src/main/java/org/springframework/data/redis/core/convert/PathIndexResolver.java b/src/main/java/org/springframework/data/redis/core/convert/PathIndexResolver.java index f18a0bcad..4d0a5dd43 100644 --- a/src/main/java/org/springframework/data/redis/core/convert/PathIndexResolver.java +++ b/src/main/java/org/springframework/data/redis/core/convert/PathIndexResolver.java @@ -39,7 +39,6 @@ import org.springframework.data.redis.core.index.SimpleIndexDefinition; import org.springframework.data.redis.core.mapping.RedisMappingContext; import org.springframework.data.redis.core.mapping.RedisPersistentEntity; import org.springframework.data.redis.core.mapping.RedisPersistentProperty; -import org.springframework.data.util.ClassTypeInformation; import org.springframework.data.util.TypeInformation; import org.springframework.lang.Nullable; import org.springframework.util.Assert; @@ -162,7 +161,7 @@ public class PathIndexResolver implements IndexResolver { } else if (persistentProperty.isEntity() - || persistentProperty.getTypeInformation().getActualType().equals(ClassTypeInformation.OBJECT)) { + || persistentProperty.getTypeInformation().getActualType().equals(TypeInformation.OBJECT)) { typeHint = updateTypeHintForActualValue(typeHint, propertyValue); indexes.addAll( @@ -175,7 +174,7 @@ public class PathIndexResolver implements IndexResolver { private TypeInformation updateTypeHintForActualValue(TypeInformation typeHint, Object propertyValue) { - if (typeHint.equals(ClassTypeInformation.OBJECT) || typeHint.getClass().isInterface()) { + if (typeHint.equals(TypeInformation.OBJECT) || typeHint.getClass().isInterface()) { try { typeHint = mappingContext.getRequiredPersistentEntity(propertyValue.getClass()).getTypeInformation(); } catch (Exception e) { @@ -201,7 +200,7 @@ public class PathIndexResolver implements IndexResolver { if (indexConfiguration.hasIndexFor(keyspace, path)) { IndexingContext context = new IndexingContext(keyspace, path, - property != null ? property.getTypeInformation() : ClassTypeInformation.OBJECT); + property != null ? property.getTypeInformation() : TypeInformation.OBJECT); for (IndexDefinition indexDefinition : indexConfiguration.getIndexDefinitionsFor(keyspace, path)) { diff --git a/src/main/java/org/springframework/data/redis/core/mapping/RedisMappingContext.java b/src/main/java/org/springframework/data/redis/core/mapping/RedisMappingContext.java index 30fd73704..3d526defa 100644 --- a/src/main/java/org/springframework/data/redis/core/mapping/RedisMappingContext.java +++ b/src/main/java/org/springframework/data/redis/core/mapping/RedisMappingContext.java @@ -215,9 +215,7 @@ public class RedisMappingContext extends KeyValueMappingContext update = (PartialUpdate) source; + if (source instanceof PartialUpdate update) { if (ttlProperty != null && !update.getPropertyUpdates().isEmpty()) { for (PropertyUpdate pUpdate : update.getPropertyUpdates()) { @@ -232,7 +230,7 @@ public class RedisMappingContext extends KeyValueMappingContext entity = mappingContext.getRequiredPersistentEntity(type); Object ttlPropertyValue = entity.getPropertyAccessor(source).getProperty(ttlProperty); if (ttlPropertyValue != null) { @@ -245,9 +243,7 @@ public class RedisMappingContext extends KeyValueMappingContext resolveTtlProperty(Class type) { @@ -317,7 +312,7 @@ public class RedisMappingContext extends KeyValueMappingContext entity = mappingContext.getRequiredPersistentEntity(type); PersistentProperty ttlProperty = entity.getPersistentProperty(TimeToLive.class); if (ttlProperty != null) { diff --git a/src/main/java/org/springframework/data/redis/repository/support/RedisRepositoryFactory.java b/src/main/java/org/springframework/data/redis/repository/support/RedisRepositoryFactory.java index cd9f3cec3..1a07938c9 100644 --- a/src/main/java/org/springframework/data/redis/repository/support/RedisRepositoryFactory.java +++ b/src/main/java/org/springframework/data/redis/repository/support/RedisRepositoryFactory.java @@ -87,7 +87,7 @@ public class RedisRepositoryFactory extends KeyValueRepositoryFactory { MappingRedisEntityInformation entityInformation = new MappingRedisEntityInformation<>(persistentEntity); fragments = fragments.append(RepositoryFragment.implemented(QueryByExampleExecutor.class, - getTargetRepositoryViaReflection(QueryByExampleRedisExecutor.class, entityInformation, operations))); + instantiateClass(QueryByExampleRedisExecutor.class, entityInformation, operations))); } return fragments; diff --git a/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java index 01a909b7e..083287c58 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/MappingRedisConverterUnitTests.java @@ -198,7 +198,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void writeDoesNotAddClassTypeInformationCorrectlyForMatchingTypes() { + void writeDoesNotAddTypeInformationCorrectlyForMatchingTypes() { Address address = new Address(); address.city = "two rivers"; @@ -211,7 +211,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425, DATAREDIS-543 - void writeAddsClassTypeInformationCorrectlyForNonMatchingTypes() { + void writeAddsTypeInformationCorrectlyForNonMatchingTypes() { AddressWithPostcode address = new AddressWithPostcode(); address.city = "two rivers"; @@ -225,7 +225,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void readConsidersClassTypeInformationCorrectlyForNonMatchingTypes() { + void readConsidersTypeInformationCorrectlyForNonMatchingTypes() { Map map = new HashMap<>(); map.put("address._class", AddressWithPostcode.class.getName()); @@ -262,7 +262,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void writeAddsClassTypeInformationCorrectlyForNonMatchingTypesInCollections() { + void writeAddsTypeInformationCorrectlyForNonMatchingTypesInCollections() { Person mat = new TaVeren(); mat.firstname = "mat"; @@ -381,7 +381,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void readListComplexPropertyCorrectlyAndConsidersClassTypeInformation() { + void readListComplexPropertyCorrectlyAndConsidersTypeInformation() { Map map = new LinkedHashMap<>(); map.put("coworkers.[0]._class", TaVeren.class.getName()); @@ -569,7 +569,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void writeAppendsClassTypeInformationCorrectlyForMapWithComplexObjects() { + void writeAppendsTypeInformationCorrectlyForMapWithComplexObjects() { Map map = new LinkedHashMap<>(); Person lews = new TaVeren(); @@ -584,7 +584,7 @@ class MappingRedisConverterUnitTests { } @Test // DATAREDIS-425 - void readConsidersClassTypeInformationCorrectlyForMapWithComplexObjects() { + void readConsidersTypeInformationCorrectlyForMapWithComplexObjects() { Map map = new LinkedHashMap<>(); map.put("relatives.[previous-incarnation]._class", TaVeren.class.getName()); diff --git a/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java index 68a8f798e..2b2346ae1 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/PathIndexResolverUnitTests.java @@ -36,13 +36,12 @@ import org.mockito.quality.Strictness; import org.springframework.data.geo.Point; import org.springframework.data.mapping.PersistentProperty; -import org.springframework.data.redis.core.convert.ConversionTestEntities.*; import org.springframework.data.redis.core.index.GeoIndexed; import org.springframework.data.redis.core.index.IndexConfiguration; import org.springframework.data.redis.core.index.Indexed; import org.springframework.data.redis.core.index.SimpleIndexDefinition; import org.springframework.data.redis.core.mapping.RedisMappingContext; -import org.springframework.data.util.ClassTypeInformation; +import org.springframework.data.util.TypeInformation; /** * @author Christoph Strobl @@ -76,7 +75,7 @@ class PathIndexResolverUnitTests { Address address = new Address(); address.country = "andor"; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Address.class), address); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Address.class), address); assertThat(indexes).hasSize(1); assertThat(indexes).contains(new SimpleIndexedPropertyValue(Address.class.getName(), "country", "andor")); @@ -88,7 +87,7 @@ class PathIndexResolverUnitTests { Address address = new Address(); address.country = null; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Address.class), address); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Address.class), address); assertThat(indexes).isEmpty(); } @@ -100,7 +99,7 @@ class PathIndexResolverUnitTests { person.address = new Address(); person.address.country = "andor"; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Person.class), person); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Person.class), person); assertThat(indexes).hasSize(1); assertThat(indexes).contains(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "address.country", "andor")); @@ -123,7 +122,7 @@ class PathIndexResolverUnitTests { twot.mainCharacters.add(rand); twot.mainCharacters.add(zarine); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TheWheelOfTime.class), twot); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TheWheelOfTime.class), twot); assertThat(indexes).hasSize(2); assertThat(indexes).contains( @@ -145,7 +144,7 @@ class PathIndexResolverUnitTests { twot.places.put("stone-of-tear", stoneOfTear); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TheWheelOfTime.class), twot); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TheWheelOfTime.class), twot); assertThat(indexes).hasSize(1); assertThat(indexes) @@ -161,7 +160,7 @@ class PathIndexResolverUnitTests { rand.physicalAttributes = new LinkedHashMap<>(); rand.physicalAttributes.put("eye-color", "grey"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Person.class), rand); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Person.class), rand); assertThat(indexes).hasSize(1); assertThat(indexes) @@ -181,7 +180,7 @@ class PathIndexResolverUnitTests { rand.relatives.put("father", janduin); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Person.class), rand); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Person.class), rand); assertThat(indexes).hasSize(1); assertThat(indexes) @@ -197,7 +196,7 @@ class PathIndexResolverUnitTests { rand.physicalAttributes = new LinkedHashMap<>(); rand.physicalAttributes.put("eye-color", null); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Person.class), rand); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Person.class), rand); assertThat(indexes).hasSize(1); assertThat(indexes.iterator().next()).isInstanceOf(RemoveIndexedData.class); @@ -212,7 +211,7 @@ class PathIndexResolverUnitTests { rand.addressRef.country = "andor"; Set indexes = indexResolver - .resolveIndexesFor(ClassTypeInformation.from(PersonWithAddressReference.class), rand); + .resolveIndexesFor(TypeInformation.of(PersonWithAddressReference.class), rand); assertThat(indexes).isEmpty(); } @@ -287,7 +286,7 @@ class PathIndexResolverUnitTests { TaVeren mat = new TaVeren(); mat.feature = hat; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TaVeren.class), mat); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TaVeren.class), mat); assertThat(indexes).hasSize(1); assertThat(indexes).contains(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "feature.type", "hat")); @@ -302,7 +301,7 @@ class PathIndexResolverUnitTests { TaVeren mat = new TaVeren(); mat.feature = hat; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TaVeren.class), mat); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TaVeren.class), mat); assertThat(indexes).isEmpty(); } @@ -318,7 +317,7 @@ class PathIndexResolverUnitTests { mat.characteristics.put("clothing", hat); mat.characteristics.put("gambling", "owns the dark one's luck"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TaVeren.class), mat); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TaVeren.class), mat); assertThat(indexes).hasSize(1); assertThat(indexes) @@ -336,7 +335,7 @@ class PathIndexResolverUnitTests { mat.items.add(hat); mat.items.add("foxhead medallion"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TaVeren.class), mat); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TaVeren.class), mat); assertThat(indexes).hasSize(1); assertThat(indexes).contains(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "items.type", "hat")); @@ -355,7 +354,7 @@ class PathIndexResolverUnitTests { mat.items.add(hat); mat.items.add("foxhead medallion"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(TaVeren.class), mat); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(TaVeren.class), mat); assertThat(indexes).hasSize(1); assertThat(indexes).contains(new SimpleIndexedPropertyValue(KEYSPACE_PERSON, "itemsType", "hat")); @@ -369,7 +368,7 @@ class PathIndexResolverUnitTests { size.length = 20; size.width = 30; - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(Size.class), size); + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(Size.class), size); assertThat(indexes).isEmpty(); } @@ -382,7 +381,7 @@ class PathIndexResolverUnitTests { source.values.put("jon", "snow"); source.values.put("arya", "stark"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(IndexedOnMapField.class), + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(IndexedOnMapField.class), source); assertThat(indexes).hasSize(2); @@ -400,7 +399,7 @@ class PathIndexResolverUnitTests { source.values.add("jon"); source.values.add("arya"); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(IndexedOnListField.class), + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(IndexedOnListField.class), source); assertThat(indexes).hasSize(2); @@ -415,7 +414,7 @@ class PathIndexResolverUnitTests { source.values = new int[] { 1, 2, 3 }; Set indexes = indexResolver - .resolveIndexesFor(ClassTypeInformation.from(IndexedOnPrimitiveArrayField.class), source); + .resolveIndexesFor(TypeInformation.of(IndexedOnPrimitiveArrayField.class), source); assertThat(indexes).hasSize(3); assertThat(indexes).contains( @@ -454,7 +453,7 @@ class PathIndexResolverUnitTests { GeoIndexedOnPoint source = new GeoIndexedOnPoint(); source.location = new Point(1D, 2D); - Set indexes = indexResolver.resolveIndexesFor(ClassTypeInformation.from(GeoIndexedOnPoint.class), + Set indexes = indexResolver.resolveIndexesFor(TypeInformation.of(GeoIndexedOnPoint.class), source); assertThat(indexes).hasSize(1); @@ -469,7 +468,7 @@ class PathIndexResolverUnitTests { source.location = new double[] { 10D, 20D }; assertThatIllegalArgumentException() - .isThrownBy(() -> indexResolver.resolveIndexesFor(ClassTypeInformation.from(GeoIndexedOnArray.class), source)) + .isThrownBy(() -> indexResolver.resolveIndexesFor(TypeInformation.of(GeoIndexedOnArray.class), source)) .withMessageContaining("GeoIndexed property needs to be of type Point or GeoLocation"); } diff --git a/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java b/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java index e375d7b8b..884447e44 100644 --- a/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java +++ b/src/test/java/org/springframework/data/redis/core/convert/SpelIndexResolverUnitTests.java @@ -29,7 +29,7 @@ import org.springframework.data.redis.core.index.IndexConfiguration; import org.springframework.data.redis.core.index.SpelIndexDefinition; import org.springframework.data.redis.core.mapping.RedisMappingContext; import org.springframework.data.redis.core.mapping.RedisPersistentEntity; -import org.springframework.data.util.ClassTypeInformation; +import org.springframework.data.util.TypeInformation; import org.springframework.expression.spel.SpelEvaluationException; /** @@ -48,7 +48,7 @@ public class SpelIndexResolverUnitTests { private Session session; - private ClassTypeInformation typeInformation; + private TypeInformation typeInformation; private String securityContextAttrName; @@ -64,7 +64,7 @@ public class SpelIndexResolverUnitTests { indexName = "principalName"; securityContextAttrName = "SPRING_SECURITY_CONTEXT"; - typeInformation = ClassTypeInformation.from(Session.class); + typeInformation = TypeInformation.of(Session.class); session = createSession(); resolver = createWithExpression("getAttribute('" + securityContextAttrName + "')?.authentication?.name"); @@ -93,7 +93,7 @@ public class SpelIndexResolverUnitTests { @Test // DATAREDIS-425 void wrongKeyspace() { - typeInformation = ClassTypeInformation.from(String.class); + typeInformation = TypeInformation.of(String.class); Set indexes = resolver.resolveIndexesFor(typeInformation, ""); assertThat(indexes.size()).isEqualTo(0);