Remove punctuation in Exception messages.

Closes #335.
This commit is contained in:
John Blum
2022-06-08 16:53:55 -07:00
parent c4e10ddd97
commit 48d7abbcfa
9 changed files with 41 additions and 41 deletions

View File

@@ -54,7 +54,7 @@ public class LdapRepositoryBean<T> extends CdiRepositoryBean<T> {
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;
}

View File

@@ -50,7 +50,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport {
private final Map<Set<Annotation>, Bean<LdapOperations>> 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> 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));
}

View File

@@ -58,9 +58,9 @@ public abstract class AbstractLdapRepositoryQuery implements RepositoryQuery {
MappingContext<? extends PersistentEntity<?, ?>, ? 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;

View File

@@ -60,8 +60,8 @@ class LdapQueryCreator extends AbstractQueryCreator<LdapQuery, ContainerCriteria
super(tree, parameterAccessor);
Assert.notNull(entityType, "Entity type must not be null!");
Assert.notNull(mapper, "ObjectDirectoryMapper must not be null!");
Assert.notNull(entityType, "Entity type must not be null");
Assert.notNull(mapper, "ObjectDirectoryMapper must not be null");
this.entityType = entityType;
this.mapper = mapper;

View File

@@ -83,6 +83,6 @@ public class LdapQueryMethod extends QueryMethod {
return queryAnnotation;
}
throw new IllegalStateException("Required @Query annotation is not present!");
throw new IllegalStateException("Required @Query annotation is not present");
}
}

View File

@@ -68,7 +68,7 @@ public class LdapRepositoryFactory extends RepositoryFactorySupport {
*/
public LdapRepositoryFactory(LdapOperations ldapOperations) {
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
Assert.notNull(ldapOperations, "LdapOperations must not be null");
this.ldapOperations = ldapOperations;
this.mappingContext = new LdapMappingContext();
@@ -84,8 +84,8 @@ public class LdapRepositoryFactory extends RepositoryFactorySupport {
LdapRepositoryFactory(LdapOperations ldapOperations,
MappingContext<? extends PersistentEntity<?, ?>, ? 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;

View File

@@ -77,10 +77,10 @@ public class QuerydslLdapPredicateExecutor<T> implements ListQuerydslPredicateEx
LdapOperations ldapOperations,
MappingContext<? extends PersistentEntity<?, ?>, ? 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<T> implements ListQuerydslPredicateEx
LdapOperations ldapOperations,
MappingContext<? extends PersistentEntity<?, ?>, ? 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<T> implements ListQuerydslPredicateEx
public List<T> 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<T> implements ListQuerydslPredicateEx
@Override
public Page<T> 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<T> implements ListQuerydslPredicateEx
public <S extends T, R> R findBy(Predicate predicate,
Function<FluentQuery.FetchableFluentQuery<S>, 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<S>) entityInformation.getJavaType()));
}
@@ -196,7 +196,7 @@ public class QuerydslLdapPredicateExecutor<T> implements ListQuerydslPredicateEx
private QuerydslLdapQuery<T> queryFor(Predicate predicate, Consumer<LdapQueryBuilder> 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<T> implements ListQuerydslPredicateEx
@Override
public <R1> FetchableFluentQuery<R1> as(Class<R1> 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<T> implements ListQuerydslPredicateEx
@Override
public FetchableFluentQuery<R> project(Collection<String> 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<T> implements ListQuerydslPredicateEx
@Override
public Page<R> 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);

View File

@@ -82,9 +82,9 @@ public class QuerydslLdapQuery<K> implements FilteredClause<QuerydslLdapQuery<K>
public QuerydslLdapQuery(LdapOperations ldapOperations, Class<K> entityType,
Consumer<LdapQueryBuilder> 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;

View File

@@ -64,9 +64,9 @@ public class SimpleLdapRepository<T> implements LdapRepository<T> {
*/
public SimpleLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class<T> 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<T> implements LdapRepository<T> {
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> context,
ObjectDirectoryMapper odm, Class<T> 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<T> implements LdapRepository<T> {
@Override
public void deleteAllById(Iterable<? extends Name> 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<T> implements LdapRepository<T> {
@Override
public void deleteAll(Iterable<? extends T> entities) {
Assert.notNull(entities, "Entities must not be null.");
Assert.notNull(entities, "Entities must not be null");
entities.forEach(this::delete);
}