DATAGEODE-306 - Re-implement resolveGemfireMappingContext() in terms of SpringUtils.requireObject(..).

This commit is contained in:
John Blum
2020-09-24 12:05:58 -07:00
parent 18d73052ef
commit 23633141fc

View File

@@ -42,6 +42,7 @@ import org.springframework.data.gemfire.mapping.GemfirePersistentProperty;
import org.springframework.data.gemfire.repository.query.GemfireRepositoryQuery;
import org.springframework.data.gemfire.repository.query.QueryPostProcessor;
import org.springframework.data.gemfire.util.CollectionUtils;
import org.springframework.data.gemfire.util.SpringUtils;
import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.RepositoryDefinition;
@@ -256,13 +257,7 @@ public class GemfireRepositoryFactoryBean<T extends Repository<S, ID>, S, ID>
* @see org.springframework.data.mapping.context.MappingContext
*/
protected MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> resolveGemfireMappingContext() {
MappingContext<? extends GemfirePersistentEntity<?>, GemfirePersistentProperty> mappingContext =
getGemfireMappingContext();
Assert.state(mappingContext != null, "GemfireMappingContext must not be null");
return mappingContext;
return SpringUtils.requireObject(this::getGemfireMappingContext, "GemfireMappingContext must not be null");
}
protected class QueryPostProcessorRegistrationOnQueryCreationListener