Skip to content

Commit 48d7abb

Browse files
committed
Remove punctuation in Exception messages.
Closes #335.
1 parent c4e10dd commit 48d7abb

9 files changed

+41
-41
lines changed

src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class LdapRepositoryBean<T> extends CdiRepositoryBean<T> {
5454

5555
super(qualifiers, repositoryType, beanManager, detector);
5656

57-
Assert.notNull(operations, "LdapOperations bean must not be null!");
57+
Assert.notNull(operations, "LdapOperations bean must not be null");
5858
this.operations = operations;
5959
}
6060

src/main/java/org/springframework/data/ldap/repository/cdi/LdapRepositoryExtension.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class LdapRepositoryExtension extends CdiRepositoryExtensionSupport {
5050
private final Map<Set<Annotation>, Bean<LdapOperations>> ldapOperations = new HashMap<>();
5151

5252
public LdapRepositoryExtension() {
53-
LOG.info("Activating CDI extension for Spring Data LDAP repositories.");
53+
LOG.info("Activating CDI extension for Spring Data LDAP repositories");
5454
}
5555

5656
@SuppressWarnings("unchecked")
@@ -62,7 +62,7 @@ <X> void processBean(@Observes ProcessBean<X> processBean) {
6262
if (type instanceof Class<?> && LdapOperations.class.isAssignableFrom((Class<?>) type)) {
6363
if (LOG.isDebugEnabled()) {
6464
LOG.debug(
65-
String.format("Discovered %s with qualifiers %s.", LdapOperations.class.getName(), bean.getQualifiers()));
65+
String.format("Discovered %s with qualifiers %s", LdapOperations.class.getName(), bean.getQualifiers()));
6666
}
6767

6868
// Store the EntityManager bean using its qualifiers.
@@ -82,7 +82,7 @@ void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanMan
8282
CdiRepositoryBean<?> repositoryBean = createRepositoryBean(repositoryType, qualifiers, beanManager);
8383

8484
if (LOG.isInfoEnabled()) {
85-
LOG.info(String.format("Registering bean for %s with qualifiers %s.", repositoryType.getName(), qualifiers));
85+
LOG.info(String.format("Registering bean for %s with qualifiers %s", repositoryType.getName(), qualifiers));
8686
}
8787

8888
// Register the bean to the container.
@@ -107,7 +107,7 @@ private <T> CdiRepositoryBean<T> createRepositoryBean(Class<T> repositoryType, S
107107
Bean<LdapOperations> LdapOperations = this.ldapOperations.get(qualifiers);
108108

109109
if (LdapOperations == null) {
110-
throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s.",
110+
throw new UnsatisfiedResolutionException(String.format("Unable to resolve a bean for '%s' with qualifiers %s",
111111
LdapOperations.class.getName(), qualifiers));
112112
}
113113

src/main/java/org/springframework/data/ldap/repository/query/AbstractLdapRepositoryQuery.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public AbstractLdapRepositoryQuery(LdapQueryMethod queryMethod, Class<?> entityT
5858
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext,
5959
EntityInstantiators instantiators) {
6060

61-
Assert.notNull(queryMethod, "LdapQueryMethod must not be null!");
62-
Assert.notNull(entityType, "Entity type must not be null!");
63-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
61+
Assert.notNull(queryMethod, "LdapQueryMethod must not be null");
62+
Assert.notNull(entityType, "Entity type must not be null");
63+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
6464

6565
this.queryMethod = queryMethod;
6666
this.entityType = entityType;

src/main/java/org/springframework/data/ldap/repository/query/LdapQueryCreator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class LdapQueryCreator extends AbstractQueryCreator<LdapQuery, ContainerCriteria
6060

6161
super(tree, parameterAccessor);
6262

63-
Assert.notNull(entityType, "Entity type must not be null!");
64-
Assert.notNull(mapper, "ObjectDirectoryMapper must not be null!");
63+
Assert.notNull(entityType, "Entity type must not be null");
64+
Assert.notNull(mapper, "ObjectDirectoryMapper must not be null");
6565

6666
this.entityType = entityType;
6767
this.mapper = mapper;

src/main/java/org/springframework/data/ldap/repository/query/LdapQueryMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ Query getRequiredQueryAnnotation() {
8383
return queryAnnotation;
8484
}
8585

86-
throw new IllegalStateException("Required @Query annotation is not present!");
86+
throw new IllegalStateException("Required @Query annotation is not present");
8787
}
8888
}

src/main/java/org/springframework/data/ldap/repository/support/LdapRepositoryFactory.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class LdapRepositoryFactory extends RepositoryFactorySupport {
6868
*/
6969
public LdapRepositoryFactory(LdapOperations ldapOperations) {
7070

71-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
71+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
7272

7373
this.ldapOperations = ldapOperations;
7474
this.mappingContext = new LdapMappingContext();
@@ -84,8 +84,8 @@ public LdapRepositoryFactory(LdapOperations ldapOperations) {
8484
LdapRepositoryFactory(LdapOperations ldapOperations,
8585
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext) {
8686

87-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
88-
Assert.notNull(mappingContext, "LdapMappingContext must not be null!");
87+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
88+
Assert.notNull(mappingContext, "LdapMappingContext must not be null");
8989

9090
this.queryLookupStrategy = new LdapQueryLookupStrategy(ldapOperations, instantiators, mappingContext);
9191
this.ldapOperations = ldapOperations;

src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapPredicateExecutor.java

+15-15
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public QuerydslLdapPredicateExecutor(Class<T> entityType, ProjectionFactory proj
7777
LdapOperations ldapOperations,
7878
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext) {
7979

80-
Assert.notNull(entityType, "Entity type must not be null!");
81-
Assert.notNull(projectionFactory, "ProjectionFactory must not be null!");
82-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
83-
Assert.notNull(mappingContext, "MappingContext must not be null!");
80+
Assert.notNull(entityType, "Entity type must not be null");
81+
Assert.notNull(projectionFactory, "ProjectionFactory must not be null");
82+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
83+
Assert.notNull(mappingContext, "MappingContext must not be null");
8484

8585
this.entityInformation = new LdapEntityInformation<>(entityType, ldapOperations.getObjectDirectoryMapper());
8686
this.ldapOperations = ldapOperations;
@@ -100,10 +100,10 @@ public QuerydslLdapPredicateExecutor(EntityInformation<T, ?> entityInformation,
100100
LdapOperations ldapOperations,
101101
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> mappingContext) {
102102

103-
Assert.notNull(entityInformation, "EntityInformation must not be null!");
104-
Assert.notNull(projectionFactory, "ProjectionFactory must not be null!");
105-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
106-
Assert.notNull(mappingContext, "MappingContext must not be null!");
103+
Assert.notNull(entityInformation, "EntityInformation must not be null");
104+
Assert.notNull(projectionFactory, "ProjectionFactory must not be null");
105+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
106+
Assert.notNull(mappingContext, "MappingContext must not be null");
107107

108108
this.entityInformation = entityInformation;
109109
this.ldapOperations = ldapOperations;
@@ -132,7 +132,7 @@ public boolean exists(Predicate predicate) {
132132

133133
public List<T> findAll(Predicate predicate, Sort sort) {
134134

135-
Assert.notNull(sort, "Pageable must not be null!");
135+
Assert.notNull(sort, "Pageable must not be null");
136136

137137
if (sort.isUnsorted()) {
138138
return findAll(predicate);
@@ -163,7 +163,7 @@ public List<T> findAll(Predicate predicate, OrderSpecifier<?>... orders) {
163163
@Override
164164
public Page<T> findAll(Predicate predicate, Pageable pageable) {
165165

166-
Assert.notNull(pageable, "Pageable must not be null!");
166+
Assert.notNull(pageable, "Pageable must not be null");
167167

168168
if (pageable.isUnpaged()) {
169169
return PageableExecutionUtils.getPage(findAll(predicate), pageable, () -> count(predicate));
@@ -183,7 +183,7 @@ public Page<T> findAll(Predicate predicate, Pageable pageable) {
183183
public <S extends T, R> R findBy(Predicate predicate,
184184
Function<FluentQuery.FetchableFluentQuery<S>, R> queryFunction) {
185185

186-
Assert.notNull(queryFunction, "Query function must not be null!");
186+
Assert.notNull(queryFunction, "Query function must not be null");
187187

188188
return queryFunction.apply(new FluentQuerydsl<>(predicate, (Class<S>) entityInformation.getJavaType()));
189189
}
@@ -196,7 +196,7 @@ private QuerydslLdapQuery<T> queryFor(Predicate predicate) {
196196

197197
private QuerydslLdapQuery<T> queryFor(Predicate predicate, Consumer<LdapQueryBuilder> queryBuilderConsumer) {
198198

199-
Assert.notNull(predicate, "Predicate must not be null!");
199+
Assert.notNull(predicate, "Predicate must not be null");
200200

201201
return new QuerydslLdapQuery<>(ldapOperations, entityInformation.getJavaType(), queryBuilderConsumer)
202202
.where(predicate);
@@ -234,15 +234,15 @@ public FetchableFluentQuery<R> sortBy(Sort sort) {
234234
@Override
235235
public <R1> FetchableFluentQuery<R1> as(Class<R1> resultType) {
236236

237-
Assert.notNull(projection, "Projection target type must not be null!");
237+
Assert.notNull(projection, "Projection target type must not be null");
238238

239239
return new FluentQuerydsl<>(predicate, sort, resultType, projection);
240240
}
241241

242242
@Override
243243
public FetchableFluentQuery<R> project(Collection<String> properties) {
244244

245-
Assert.notNull(properties, "Projection properties must not be null!");
245+
Assert.notNull(properties, "Projection properties must not be null");
246246

247247
return new FluentQuerydsl<>(predicate, sort, resultType, new ArrayList<>(properties));
248248
}
@@ -287,7 +287,7 @@ public List<R> all() {
287287
@Override
288288
public Page<R> page(Pageable pageable) {
289289

290-
Assert.notNull(pageable, "Pageable must not be null!");
290+
Assert.notNull(pageable, "Pageable must not be null");
291291

292292
if (pageable.isUnpaged()) {
293293
return PageableExecutionUtils.getPage(all(), pageable, this::count);

src/main/java/org/springframework/data/ldap/repository/support/QuerydslLdapQuery.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public QuerydslLdapQuery(LdapOperations ldapOperations, Class<K> entityType) {
8282
public QuerydslLdapQuery(LdapOperations ldapOperations, Class<K> entityType,
8383
Consumer<LdapQueryBuilder> queryCustomizer) {
8484

85-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
86-
Assert.notNull(entityType, "Type must not be null!");
87-
Assert.notNull(queryCustomizer, "Query customizer must not be null!");
85+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
86+
Assert.notNull(entityType, "Type must not be null");
87+
Assert.notNull(queryCustomizer, "Query customizer must not be null");
8888

8989
this.ldapOperations = ldapOperations;
9090
this.entityType = entityType;

src/main/java/org/springframework/data/ldap/repository/support/SimpleLdapRepository.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public class SimpleLdapRepository<T> implements LdapRepository<T> {
6464
*/
6565
public SimpleLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper odm, Class<T> entityType) {
6666

67-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
68-
Assert.notNull(odm, "ObjectDirectoryMapper must not be null!");
69-
Assert.notNull(entityType, "Entity type must not be null!");
67+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
68+
Assert.notNull(odm, "ObjectDirectoryMapper must not be null");
69+
Assert.notNull(entityType, "Entity type must not be null");
7070

7171
this.ldapOperations = ldapOperations;
7272
this.odm = odm;
@@ -84,10 +84,10 @@ public SimpleLdapRepository(LdapOperations ldapOperations, ObjectDirectoryMapper
8484
MappingContext<? extends PersistentEntity<?, ?>, ? extends PersistentProperty<?>> context,
8585
ObjectDirectoryMapper odm, Class<T> entityType) {
8686

87-
Assert.notNull(ldapOperations, "LdapOperations must not be null!");
88-
Assert.notNull(context, "MappingContext must not be null!");
89-
Assert.notNull(odm, "ObjectDirectoryMapper must not be null!");
90-
Assert.notNull(entityType, "Entity type must not be null!");
87+
Assert.notNull(ldapOperations, "LdapOperations must not be null");
88+
Assert.notNull(context, "MappingContext must not be null");
89+
Assert.notNull(odm, "ObjectDirectoryMapper must not be null");
90+
Assert.notNull(entityType, "Entity type must not be null");
9191

9292
this.ldapOperations = ldapOperations;
9393
this.odm = odm;
@@ -186,15 +186,15 @@ public void delete(T entity) {
186186
@Override
187187
public void deleteAllById(Iterable<? extends Name> names) {
188188

189-
Assert.notNull(names, "Names must not be null.");
189+
Assert.notNull(names, "Names must not be null");
190190

191191
names.forEach(this::deleteById);
192192
}
193193

194194
@Override
195195
public void deleteAll(Iterable<? extends T> entities) {
196196

197-
Assert.notNull(entities, "Entities must not be null.");
197+
Assert.notNull(entities, "Entities must not be null");
198198

199199
entities.forEach(this::delete);
200200
}

0 commit comments

Comments
 (0)