diff --git a/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryBean.java b/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryBean.java index 9ddf639..1c65b88 100644 --- a/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryBean.java +++ b/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryBean.java @@ -54,7 +54,7 @@ public class LdapRepositoryBean extends CdiRepositoryBean { super(qualifiers, repositoryType, beanManager, detector); - Assert.notNull(operations, "LdapOperations bean must not be null!"); + Assert.notNull(operations, "LdapOperations bean must not be null"); this.operations = operations; } diff --git a/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryExtension.java b/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryExtension.java index d0e9b9a..97de2e2 100644 --- a/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryExtension.java +++ b/src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryExtension.java @@ -50,7 +50,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport { private final Map, Bean> ldapOperations = new HashMap<>(); public LdapRepositoryExtension() { - LOG.info("Activating CDI extension for Spring Data LDAP repositories."); + LOG.info("Activating CDI extension for Spring Data LDAP repositories"); } @SuppressWarnings("unchecked") @@ -62,7 +62,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport { if (type instanceof Class && LdapOperations.class.isAssignableFrom((Class) type)) { if (LOG.isDebugEnabled()) { LOG.debug( - String.format("Discovered %s with qualifiers %s.", LdapOperations.class.getName(), bean.getQualifiers())); + String.format("Discovered %s with qualifiers %s", LdapOperations.class.getName(), bean.getQualifiers())); } // Store the EntityManager bean using its qualifiers. @@ -82,7 +82,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport { CdiRepositoryBean repositoryBean = createRepositoryBean(repositoryType, qualifiers, beanManager); if (LOG.isInfoEnabled()) { - LOG.info(String.format("Registering bean for %s with qualifiers %s.", repositoryType.getName(), qualifiers)); + LOG.info(String.format("Registering bean for %s with qualifiers %s", repositoryType.getName(), qualifiers)); } // Register the bean to the container. @@ -107,7 +107,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport { Bean LdapOperations = this.ldapOperations.get(qualifiers); if (LdapOperations == null) { - throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.", + throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s", LdapOperations.class.getName(), qualifiers)); } diff --git a/src/main/java/org/springframework/data/ldap/repository/query/AbstractLdapRepositoryQuery.java b/src/main/java/org/springframework/data/ldap/repository/query/AbstractLdapRepositoryQuery.java index 9065994..b93e596 100644 --- a/src/main/java/org/springframework/data/ldap/repository/query/AbstractLdapRepositoryQuery.java +++ b/src/main/java/org/springframework/data/ldap/repository/query/AbstractLdapRepositoryQuery.java @@ -58,9 +58,9 @@ public abstract class AbstractLdapRepositoryQuery implements RepositoryQuery { MappingContext, ? extends PersistentProperty> mappingContext, EntityInstantiators instantiators) { - Assert.notNull(queryMethod, "LdapQueryMethod must not be null!"); - Assert.notNull(entityType, "Entity type must not be null!"); - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); + Assert.notNull(queryMethod, "LdapQueryMethod must not be null"); + Assert.notNull(entityType, "Entity type must not be null"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); this.queryMethod = queryMethod; this.entityType = entityType; diff --git a/src/main/java/org/springframework/data/ldap/repository/query/LdapQueryCreator.java b/src/main/java/org/springframework/data/ldap/repository/query/LdapQueryCreator.java index bca2b8b..6cdbd80 100644 --- a/src/main/java/org/springframework/data/ldap/repository/query/LdapQueryCreator.java +++ b/src/main/java/org/springframework/data/ldap/repository/query/LdapQueryCreator.java @@ -60,8 +60,8 @@ class LdapQueryCreator extends AbstractQueryCreator, ? extends PersistentProperty> mappingContext) { - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(mappingContext, "LdapMappingContext must not be null!"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(mappingContext, "LdapMappingContext must not be null"); this.queryLookupStrategy = new LdapQueryLookupStrategy(ldapOperations, instantiators, mappingContext); this.ldapOperations = ldapOperations; diff --git a/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapPredicateExecutor.java b/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapPredicateExecutor.java index c5e6799..a8b8841 100644 --- a/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapPredicateExecutor.java +++ b/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapPredicateExecutor.java @@ -77,10 +77,10 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx LdapOperations ldapOperations, MappingContext, ? extends PersistentProperty> mappingContext) { - Assert.notNull(entityType, "Entity type must not be null!"); - Assert.notNull(projectionFactory, "ProjectionFactory must not be null!"); - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(mappingContext, "MappingContext must not be null!"); + Assert.notNull(entityType, "Entity type must not be null"); + Assert.notNull(projectionFactory, "ProjectionFactory must not be null"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(mappingContext, "MappingContext must not be null"); this.entityInformation = new LdapEntityInformation<>(entityType, ldapOperations.getObjectDirectoryMapper()); this.ldapOperations = ldapOperations; @@ -100,10 +100,10 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx LdapOperations ldapOperations, MappingContext, ? extends PersistentProperty> mappingContext) { - Assert.notNull(entityInformation, "EntityInformation must not be null!"); - Assert.notNull(projectionFactory, "ProjectionFactory must not be null!"); - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(mappingContext, "MappingContext must not be null!"); + Assert.notNull(entityInformation, "EntityInformation must not be null"); + Assert.notNull(projectionFactory, "ProjectionFactory must not be null"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(mappingContext, "MappingContext must not be null"); this.entityInformation = entityInformation; this.ldapOperations = ldapOperations; @@ -132,7 +132,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx public List findAll(Predicate predicate, Sort sort) { - Assert.notNull(sort, "Pageable must not be null!"); + Assert.notNull(sort, "Pageable must not be null"); if (sort.isUnsorted()) { return findAll(predicate); @@ -163,7 +163,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx @Override public Page findAll(Predicate predicate, Pageable pageable) { - Assert.notNull(pageable, "Pageable must not be null!"); + Assert.notNull(pageable, "Pageable must not be null"); if (pageable.isUnpaged()) { return PageableExecutionUtils.getPage(findAll(predicate), pageable, () -> count(predicate)); @@ -183,7 +183,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx public R findBy(Predicate predicate, Function, R> queryFunction) { - Assert.notNull(queryFunction, "Query function must not be null!"); + Assert.notNull(queryFunction, "Query function must not be null"); return queryFunction.apply(new FluentQuerydsl<>(predicate, (Class) entityInformation.getJavaType())); } @@ -196,7 +196,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx private QuerydslLdapQuery queryFor(Predicate predicate, Consumer queryBuilderConsumer) { - Assert.notNull(predicate, "Predicate must not be null!"); + Assert.notNull(predicate, "Predicate must not be null"); return new QuerydslLdapQuery<>(ldapOperations, entityInformation.getJavaType(), queryBuilderConsumer) .where(predicate); @@ -234,7 +234,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx @Override public FetchableFluentQuery as(Class resultType) { - Assert.notNull(projection, "Projection target type must not be null!"); + Assert.notNull(projection, "Projection target type must not be null"); return new FluentQuerydsl<>(predicate, sort, resultType, projection); } @@ -242,7 +242,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx @Override public FetchableFluentQuery project(Collection properties) { - Assert.notNull(properties, "Projection properties must not be null!"); + Assert.notNull(properties, "Projection properties must not be null"); return new FluentQuerydsl<>(predicate, sort, resultType, new ArrayList<>(properties)); } @@ -287,7 +287,7 @@ public class QuerydslLdapPredicateExecutor implements ListQuerydslPredicateEx @Override public Page page(Pageable pageable) { - Assert.notNull(pageable, "Pageable must not be null!"); + Assert.notNull(pageable, "Pageable must not be null"); if (pageable.isUnpaged()) { return PageableExecutionUtils.getPage(all(), pageable, this::count); diff --git a/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapQuery.java b/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapQuery.java index e75c358..c673938 100644 --- a/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapQuery.java +++ b/src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapQuery.java @@ -82,9 +82,9 @@ public class QuerydslLdapQuery implements FilteredClause public QuerydslLdapQuery(LdapOperations ldapOperations, Class entityType, Consumer queryCustomizer) { - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(entityType, "Type must not be null!"); - Assert.notNull(queryCustomizer, "Query customizer must not be null!"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(entityType, "Type must not be null"); + Assert.notNull(queryCustomizer, "Query customizer must not be null"); this.ldapOperations = ldapOperations; this.entityType = entityType; diff --git a/src/main/java/org/springframework/data/ldap/repository/support/SimpleLdapRepository.java b/src/main/java/org/springframework/data/ldap/repository/support/SimpleLdapRepository.java index 1e8d383..7db022b 100644 --- a/src/main/java/org/springframework/data/ldap/repository/support/SimpleLdapRepository.java +++ b/src/main/java/org/springframework/data/ldap/repository/support/SimpleLdapRepository.java @@ -64,9 +64,9 @@ public class SimpleLdapRepository implements LdapRepository { */ public SimpleLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class entityType) { - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(odm, "ObjectDirectoryMapper must not be null!"); - Assert.notNull(entityType, "Entity type must not be null!"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(odm, "ObjectDirectoryMapper must not be null"); + Assert.notNull(entityType, "Entity type must not be null"); this.ldapOperations = ldapOperations; this.odm = odm; @@ -84,10 +84,10 @@ public class SimpleLdapRepository implements LdapRepository { MappingContext, ? extends PersistentProperty> context, ObjectDirectoryMapper odm, Class entityType) { - Assert.notNull(ldapOperations, "LdapOperations must not be null!"); - Assert.notNull(context, "MappingContext must not be null!"); - Assert.notNull(odm, "ObjectDirectoryMapper must not be null!"); - Assert.notNull(entityType, "Entity type must not be null!"); + Assert.notNull(ldapOperations, "LdapOperations must not be null"); + Assert.notNull(context, "MappingContext must not be null"); + Assert.notNull(odm, "ObjectDirectoryMapper must not be null"); + Assert.notNull(entityType, "Entity type must not be null"); this.ldapOperations = ldapOperations; this.odm = odm; @@ -186,7 +186,7 @@ public class SimpleLdapRepository implements LdapRepository { @Override public void deleteAllById(Iterable names) { - Assert.notNull(names, "Names must not be null."); + Assert.notNull(names, "Names must not be null"); names.forEach(this::deleteById); } @@ -194,7 +194,7 @@ public class SimpleLdapRepository implements LdapRepository { @Override public void deleteAll(Iterable entities) { - Assert.notNull(entities, "Entities must not be null."); + Assert.notNull(entities, "Entities must not be null"); entities.forEach(this::delete); }