Skip to content

Commit f15fd2a

Browse files
committed
Remove punctuation in Exception messages.
Closes #4079.
1 parent 01656db commit f15fd2a

File tree

258 files changed

+1680
-1680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+1680
-1680
lines changed

spring-data-mongodb-benchmarks/src/main/java/org/springframework/data/mongodb/microbenchmark/AbstractMicrobenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private void publishResults(Collection<RunResult> results) {
322322
try {
323323
ResultsWriter.forUri(uri).write(results);
324324
} catch (Exception e) {
325-
System.err.println(String.format("Cannot save benchmark results to '%s'. Error was %s.", uri, e));
325+
System.err.println(String.format("Cannot save benchmark results to '%s'; Error was %s", uri, e));
326326
}
327327
}
328328
}

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/CodecRegistryProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ default boolean hasCodecFor(Class<?> type) {
6262
*/
6363
default <T> Optional<Codec<T>> getCodecFor(Class<T> type) {
6464

65-
Assert.notNull(type, "Type must not be null!");
65+
Assert.notNull(type, "Type must not be null");
6666

6767
try {
6868
return Optional.of(getCodecRegistry().get(type));

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoDatabaseUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public static MongoDatabase getDatabase(@Nullable String dbName, MongoDatabaseFa
102102
private static MongoDatabase doGetMongoDatabase(@Nullable String dbName, MongoDatabaseFactory factory,
103103
SessionSynchronization sessionSynchronization) {
104104

105-
Assert.notNull(factory, "Factory must not be null!");
105+
Assert.notNull(factory, "Factory must not be null");
106106

107107
if (sessionSynchronization == SessionSynchronization.NEVER
108108
|| !TransactionSynchronizationManager.isSynchronizationActive()) {

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoResourceHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ClientSession getRequiredSession() {
6868
ClientSession session = getSession();
6969

7070
if (session == null) {
71-
throw new IllegalStateException("No session available!");
71+
throw new IllegalStateException("No session available");
7272
}
7373

7474
return session;

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/MongoTransactionManager.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public MongoTransactionManager(MongoDatabaseFactory dbFactory) {
100100
*/
101101
public MongoTransactionManager(MongoDatabaseFactory dbFactory, @Nullable TransactionOptions options) {
102102

103-
Assert.notNull(dbFactory, "DbFactory must not be null!");
103+
Assert.notNull(dbFactory, "DbFactory must not be null");
104104

105105
this.dbFactory = dbFactory;
106106
this.options = options;
@@ -266,7 +266,7 @@ protected void doCleanupAfterCompletion(Object transaction) {
266266
*/
267267
public void setDbFactory(MongoDatabaseFactory dbFactory) {
268268

269-
Assert.notNull(dbFactory, "DbFactory must not be null!");
269+
Assert.notNull(dbFactory, "DbFactory must not be null");
270270
this.dbFactory = dbFactory;
271271
}
272272

@@ -315,7 +315,7 @@ private MongoResourceHolder newResourceHolder(TransactionDefinition definition,
315315
private MongoDatabaseFactory getRequiredDbFactory() {
316316

317317
Assert.state(dbFactory != null,
318-
"MongoTransactionManager operates upon a MongoDbFactory. Did you forget to provide one? It's required.");
318+
"MongoTransactionManager operates upon a MongoDbFactory; Did you forget to provide one; It's required");
319319

320320
return dbFactory;
321321
}
@@ -450,14 +450,14 @@ public ClientSession getSession() {
450450

451451
private MongoResourceHolder getRequiredResourceHolder() {
452452

453-
Assert.state(resourceHolder != null, "MongoResourceHolder is required but not present. o_O");
453+
Assert.state(resourceHolder != null, "MongoResourceHolder is required but not present; o_O");
454454
return resourceHolder;
455455
}
456456

457457
private ClientSession getRequiredSession() {
458458

459459
ClientSession session = getSession();
460-
Assert.state(session != null, "A Session is required but it turned out to be null.");
460+
Assert.state(session != null, "A Session is required but it turned out to be null");
461461
return session;
462462
}
463463

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoDatabaseUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static Mono<MongoDatabase> getDatabase(String dbName, ReactiveMongoDataba
136136
private static Mono<MongoDatabase> doGetMongoDatabase(@Nullable String dbName, ReactiveMongoDatabaseFactory factory,
137137
SessionSynchronization sessionSynchronization) {
138138

139-
Assert.notNull(factory, "DatabaseFactory must not be null!");
139+
Assert.notNull(factory, "DatabaseFactory must not be null");
140140

141141
if (sessionSynchronization == SessionSynchronization.NEVER) {
142142
return getMongoDatabaseOrDefault(dbName, factory);

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/ReactiveMongoTransactionManager.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public ReactiveMongoTransactionManager(ReactiveMongoDatabaseFactory databaseFact
104104
public ReactiveMongoTransactionManager(ReactiveMongoDatabaseFactory databaseFactory,
105105
@Nullable TransactionOptions options) {
106106

107-
Assert.notNull(databaseFactory, "DatabaseFactory must not be null!");
107+
Assert.notNull(databaseFactory, "DatabaseFactory must not be null");
108108

109109
this.databaseFactory = databaseFactory;
110110
this.options = options;
@@ -281,7 +281,7 @@ protected Mono<Void> doCleanupAfterCompletion(TransactionSynchronizationManager
281281
*/
282282
public void setDatabaseFactory(ReactiveMongoDatabaseFactory databaseFactory) {
283283

284-
Assert.notNull(databaseFactory, "DatabaseFactory must not be null!");
284+
Assert.notNull(databaseFactory, "DatabaseFactory must not be null");
285285
this.databaseFactory = databaseFactory;
286286
}
287287

@@ -323,7 +323,7 @@ private Mono<ReactiveMongoResourceHolder> newResourceHolder(TransactionDefinitio
323323
private ReactiveMongoDatabaseFactory getRequiredDatabaseFactory() {
324324

325325
Assert.state(databaseFactory != null,
326-
"ReactiveMongoTransactionManager operates upon a ReactiveMongoDatabaseFactory. Did you forget to provide one? It's required.");
326+
"ReactiveMongoTransactionManager operates upon a ReactiveMongoDatabaseFactory; Did you forget to provide one; It's required");
327327

328328
return databaseFactory;
329329
}
@@ -458,14 +458,14 @@ public ClientSession getSession() {
458458

459459
private ReactiveMongoResourceHolder getRequiredResourceHolder() {
460460

461-
Assert.state(resourceHolder != null, "ReactiveMongoResourceHolder is required but not present. o_O");
461+
Assert.state(resourceHolder != null, "ReactiveMongoResourceHolder is required but not present; o_O");
462462
return resourceHolder;
463463
}
464464

465465
private ClientSession getRequiredSession() {
466466

467467
ClientSession session = getSession();
468-
Assert.state(session != null, "A Session is required but it turned out to be null.");
468+
Assert.state(session != null, "A Session is required but it turned out to be null");
469469
return session;
470470
}
471471

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/SessionAwareMethodInterceptor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ public <T> SessionAwareMethodInterceptor(ClientSession session, T target, Class<
7676
Class<D> databaseType, ClientSessionOperator<D> databaseDecorator, Class<C> collectionType,
7777
ClientSessionOperator<C> collectionDecorator) {
7878

79-
Assert.notNull(session, "ClientSession must not be null!");
80-
Assert.notNull(target, "Target must not be null!");
81-
Assert.notNull(sessionType, "SessionType must not be null!");
82-
Assert.notNull(databaseType, "Database type must not be null!");
83-
Assert.notNull(databaseDecorator, "Database ClientSessionOperator must not be null!");
84-
Assert.notNull(collectionType, "Collection type must not be null!");
85-
Assert.notNull(collectionDecorator, "Collection ClientSessionOperator must not be null!");
79+
Assert.notNull(session, "ClientSession must not be null");
80+
Assert.notNull(target, "Target must not be null");
81+
Assert.notNull(sessionType, "SessionType must not be null");
82+
Assert.notNull(databaseType, "Database type must not be null");
83+
Assert.notNull(databaseDecorator, "Database ClientSessionOperator must not be null");
84+
Assert.notNull(collectionType, "Collection type must not be null");
85+
Assert.notNull(collectionDecorator, "Collection ClientSessionOperator must not be null");
8686

8787
this.session = session;
8888
this.target = target;

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/MappingMongoConverterParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private static void parseFieldNamingStrategy(Element element, ReaderContext cont
255255
&& Boolean.parseBoolean(abbreviateFieldNames);
256256

257257
if (fieldNamingStrategyReferenced && abbreviationActivated) {
258-
context.error("Field name abbreviation cannot be activated if a field-naming-strategy-ref is configured!",
258+
context.error("Field name abbreviation cannot be activated if a field-naming-strategy-ref is configured",
259259
element);
260260
return;
261261
}

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/config/MongoAuditingRegistrar.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ protected String getAuditingHandlerBeanName() {
5555
@Override
5656
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) {
5757

58-
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null!");
59-
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
58+
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null");
59+
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
6060

6161
super.registerBeanDefinitions(annotationMetadata, registry);
6262
}
6363

6464
@Override
6565
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
6666

67-
Assert.notNull(configuration, "AuditingConfiguration must not be null!");
67+
Assert.notNull(configuration, "AuditingConfiguration must not be null");
6868

6969
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(IsNewAwareAuditingHandler.class);
7070

@@ -79,8 +79,8 @@ protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingCon
7979
protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
8080
BeanDefinitionRegistry registry) {
8181

82-
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null!");
83-
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
82+
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null");
83+
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
8484

8585
BeanDefinitionBuilder listenerBeanDefinitionBuilder = BeanDefinitionBuilder
8686
.rootBeanDefinition(AuditingEntityCallback.class);

0 commit comments

Comments
 (0)