Polishing

This commit is contained in:
Sam Brannen
2022-11-04 16:03:47 +01:00
parent 638d91f5f4
commit a281d8c3fd
12 changed files with 27 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -273,7 +273,7 @@ class DefaultDatabaseClient implements DatabaseClient {
public DefaultGenericExecuteSpec bind(String name, Object value) {
assertNotPreparedOperation();
Assert.hasText(name, "Parameter name must not be null or empty!");
Assert.hasText(name, "Parameter name must not be null or empty");
Assert.notNull(value, () -> String.format(
"Value for parameter %s must not be null. Use bindNull(…) instead.", name));
@@ -291,7 +291,7 @@ class DefaultDatabaseClient implements DatabaseClient {
@Override
public DefaultGenericExecuteSpec bindNull(String name, Class<?> type) {
assertNotPreparedOperation();
Assert.hasText(name, "Parameter name must not be null or empty!");
Assert.hasText(name, "Parameter name must not be null or empty");
Map<String, Parameter> byName = new LinkedHashMap<>(this.byName);
byName.put(name, Parameter.empty(type));
@@ -301,7 +301,7 @@ class DefaultDatabaseClient implements DatabaseClient {
@Override
public DefaultGenericExecuteSpec filter(StatementFilterFunction filter) {
Assert.notNull(filter, "Statement FilterFunction must not be null");
Assert.notNull(filter, "StatementFilterFunction must not be null");
return new DefaultGenericExecuteSpec(
this.byIndex, this.byName, this.sqlSupplier, this.filterFunction.andThen(filter));
}
@@ -449,7 +449,7 @@ class DefaultDatabaseClient implements DatabaseClient {
private String getRequiredSql(Supplier<String> sqlSupplier) {
String sql = sqlSupplier.get();
Assert.state(StringUtils.hasText(sql), "SQL returned by SQL supplier must not be empty!");
Assert.state(StringUtils.hasText(sql), "SQL returned by supplier must not be empty");
return sql;
}
}