Skip to content

Commit 16772ea

Browse files
GH-2552 - Align punctuation in Exception messages with Spring Data Commons.
Closes #2552
1 parent 51aebc6 commit 16772ea

File tree

74 files changed

+209
-202
lines changed

Some content is hidden

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

74 files changed

+209
-202
lines changed

src/main/java/org/springframework/data/neo4j/config/Neo4jAuditingRegistrar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ protected String getAuditingHandlerBeanName() {
6464
protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
6565
BeanDefinitionRegistry registry) {
6666

67-
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null!");
68-
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
67+
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null");
68+
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
6969

7070
BeanDefinitionBuilder listenerBeanDefinitionBuilder = BeanDefinitionBuilder
7171
.rootBeanDefinition(AuditingBeforeBindCallback.class);
@@ -82,7 +82,7 @@ protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandle
8282
@Override
8383
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
8484

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

8787
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(IsNewAwareAuditingHandler.class);
8888

src/main/java/org/springframework/data/neo4j/config/ReactiveNeo4jAuditingRegistrar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ protected String getAuditingHandlerBeanName() {
6464
protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
6565
BeanDefinitionRegistry registry) {
6666

67-
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null!");
68-
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
67+
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null");
68+
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
6969

7070
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(ReactiveAuditingBeforeBindCallback.class);
7171

@@ -82,7 +82,7 @@ protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandle
8282
@Override
8383
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
8484

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

8787
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(ReactiveIsNewAwareAuditingHandler.class);
8888

src/main/java/org/springframework/data/neo4j/core/DatabaseSelectionProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public interface DatabaseSelectionProvider {
5454
*/
5555
static DatabaseSelectionProvider createStaticDatabaseSelectionProvider(String databaseName) {
5656

57-
Assert.notNull(databaseName, "The database name must not be null.");
58-
Assert.hasText(databaseName, "The database name must not be empty.");
57+
Assert.notNull(databaseName, "The database name must not be null");
58+
Assert.hasText(databaseName, "The database name must not be empty");
5959

6060
return () -> DatabaseSelection.byName(databaseName);
6161
}

src/main/java/org/springframework/data/neo4j/core/DefaultNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public RunnableSpec to(String name) {
340340
@Override
341341
public RunnableSpec with(Function<T, Map<String, Object>> binder) {
342342

343-
Assert.notNull(binder, "Binder is required.");
343+
Assert.notNull(binder, "Binder is required");
344344

345345
return bindAll(binder.apply(value));
346346
}

src/main/java/org/springframework/data/neo4j/core/DefaultReactiveNeo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public RunnableSpec to(String name) {
297297
@Override
298298
public RunnableSpec with(Function<T, Map<String, Object>> binder) {
299299

300-
Assert.notNull(binder, "Binder is required.");
300+
Assert.notNull(binder, "Binder is required");
301301

302302
return bindAll(binder.apply(value));
303303
}

src/main/java/org/springframework/data/neo4j/core/FluentOperationSupport.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class FluentOperationSupport implements FluentFindOperation, FluentSaveOpe
3939
@Override
4040
public <T> ExecutableFind<T> find(Class<T> domainType) {
4141

42-
Assert.notNull(domainType, "DomainType must not be null!");
42+
Assert.notNull(domainType, "DomainType must not be null");
4343

4444
return new ExecutableFindSupport<>(template, domainType, domainType, null, Collections.emptyMap());
4545
}
@@ -77,7 +77,7 @@ private static class ExecutableFindSupport<T>
7777
@SuppressWarnings("HiddenField")
7878
public <T1> FindWithQuery<T1> as(Class<T1> returnType) {
7979

80-
Assert.notNull(returnType, "ReturnType must not be null!");
80+
Assert.notNull(returnType, "ReturnType must not be null");
8181

8282
return new ExecutableFindSupport<>(template, domainType, returnType, query, parameters);
8383
}
@@ -86,7 +86,7 @@ public <T1> FindWithQuery<T1> as(Class<T1> returnType) {
8686
@SuppressWarnings("HiddenField")
8787
public TerminatingFind<T> matching(String query, Map<String, Object> parameters) {
8888

89-
Assert.notNull(query, "Query must not be null!");
89+
Assert.notNull(query, "Query must not be null");
9090

9191
return new ExecutableFindSupport<>(template, domainType, returnType, query, parameters);
9292
}
@@ -95,7 +95,7 @@ public TerminatingFind<T> matching(String query, Map<String, Object> parameters)
9595
@SuppressWarnings("HiddenField")
9696
public TerminatingFind<T> matching(QueryFragmentsAndParameters queryFragmentsAndParameters) {
9797

98-
Assert.notNull(queryFragmentsAndParameters, "Query fragments must not be null!");
98+
Assert.notNull(queryFragmentsAndParameters, "Query fragments must not be null");
9999

100100
return new ExecutableFindSupport<>(template, domainType, returnType, queryFragmentsAndParameters);
101101
}
@@ -123,7 +123,7 @@ private List<T> doFind(TemplateSupport.FetchType fetchType) {
123123
@Override
124124
public <T> ExecutableSave<T> save(Class<T> domainType) {
125125

126-
Assert.notNull(domainType, "DomainType must not be null!");
126+
Assert.notNull(domainType, "DomainType must not be null");
127127

128128
return new ExecutableSaveSupport<>(this.template, domainType);
129129
}

src/main/java/org/springframework/data/neo4j/core/Neo4jClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class IllegalDatabaseNameException extends IllegalArgumentException {
412412
private final String illegalDatabaseName;
413413

414414
private IllegalDatabaseNameException(String illegalDatabaseName) {
415-
super("Either use null to indicate the default database or a valid database name. The empty string is not permitted.");
415+
super("Either use null to indicate the default database or a valid database name, the empty string is not permitted");
416416
this.illegalDatabaseName = illegalDatabaseName;
417417
}
418418

src/main/java/org/springframework/data/neo4j/core/Neo4jTemplate.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public <T> T saveAs(T instance, BiPredicate<PropertyPath, Neo4jPersistentPropert
330330
@Override
331331
public <T, R> R saveAs(T instance, Class<R> resultType) {
332332

333-
Assert.notNull(resultType, "ResultType must not be null!");
333+
Assert.notNull(resultType, "ResultType must not be null");
334334

335335
if (instance == null) {
336336
return null;
@@ -386,7 +386,7 @@ private <T> T saveImpl(T instance, @Nullable Collection<PropertyFilter.Projected
386386
throw new OptimisticLockingFailureException(OPTIMISTIC_LOCKING_ERROR_MESSAGE);
387387
}
388388
// defensive exception throwing
389-
throw new IllegalStateException("Could not retrieve an internal id while saving.");
389+
throw new IllegalStateException("Could not retrieve an internal id while saving");
390390
}
391391

392392
Long internalId = newOrUpdatedNode.get().id();
@@ -518,12 +518,12 @@ public <T> List<T> saveAllAs(Iterable<T> instances, BiPredicate<PropertyPath, Ne
518518
@Override
519519
public <T, R> List<R> saveAllAs(Iterable<T> instances, Class<R> resultType) {
520520

521-
Assert.notNull(resultType, "ResultType must not be null!");
521+
Assert.notNull(resultType, "ResultType must not be null");
522522

523523
Class<?> commonElementType = TemplateSupport.findCommonElementType(instances);
524524

525525
if (commonElementType == null) {
526-
throw new IllegalArgumentException("Could not determine a common element of an heterogeneous collection.");
526+
throw new IllegalArgumentException("Could not determine a common element of an heterogeneous collection");
527527
}
528528

529529
if (commonElementType == TemplateSupport.EmptyIterable.class) {

src/main/java/org/springframework/data/neo4j/core/ReactiveDatabaseSelectionProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public interface ReactiveDatabaseSelectionProvider {
4646
*/
4747
static ReactiveDatabaseSelectionProvider createStaticDatabaseSelectionProvider(String databaseName) {
4848

49-
Assert.notNull(databaseName, "The database name must not be null.");
50-
Assert.hasText(databaseName, "The database name must not be empty.");
49+
Assert.notNull(databaseName, "The database name must not be null");
50+
Assert.hasText(databaseName, "The database name must not be empty");
5151

5252
return () -> Mono.just(DatabaseSelection.byName(databaseName));
5353
}

src/main/java/org/springframework/data/neo4j/core/ReactiveFluentOperationSupport.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class ReactiveFluentOperationSupport implements ReactiveFluentFindOperatio
4242
@Override
4343
public <T> ExecutableFind<T> find(Class<T> domainType) {
4444

45-
Assert.notNull(domainType, "DomainType must not be null!");
45+
Assert.notNull(domainType, "DomainType must not be null");
4646

4747
return new ExecutableFindSupport<>(template, domainType, domainType, null, Collections.emptyMap());
4848
}
@@ -80,7 +80,7 @@ private static class ExecutableFindSupport<T>
8080
@SuppressWarnings("HiddenField")
8181
public <T1> FindWithQuery<T1> as(Class<T1> returnType) {
8282

83-
Assert.notNull(returnType, "ReturnType must not be null!");
83+
Assert.notNull(returnType, "ReturnType must not be null");
8484

8585
return new ExecutableFindSupport<>(template, domainType, returnType, query, parameters);
8686
}
@@ -89,7 +89,7 @@ public <T1> FindWithQuery<T1> as(Class<T1> returnType) {
8989
@SuppressWarnings("HiddenField")
9090
public TerminatingFind<T> matching(String query, Map<String, Object> parameters) {
9191

92-
Assert.notNull(query, "Query must not be null!");
92+
Assert.notNull(query, "Query must not be null");
9393

9494
return new ExecutableFindSupport<>(template, domainType, returnType, query, parameters);
9595
}
@@ -118,7 +118,7 @@ private Flux<T> doFind(TemplateSupport.FetchType fetchType) {
118118

119119
@Override
120120
public <T> ExecutableSave<T> save(Class<T> domainType) {
121-
Assert.notNull(domainType, "DomainType must not be null!");
121+
Assert.notNull(domainType, "DomainType must not be null");
122122

123123
return new ExecutableSaveSupport<>(this.template, domainType);
124124
}

0 commit comments

Comments
 (0)