Remove punctuation in Exception messages.

Closes #1259.
This commit is contained in:
John Blum
2022-06-08 11:58:32 -07:00
parent 6911bfba98
commit 483b30e8c2
103 changed files with 338 additions and 338 deletions

View File

@@ -53,8 +53,8 @@ import org.springframework.util.Assert;
@SuppressWarnings("rawtypes")
class JdbcAggregateChangeExecutionContext {
private static final String UPDATE_FAILED = "Failed to update entity [%s]. Id [%s] not found in database.";
private static final String UPDATE_FAILED_OPTIMISTIC_LOCKING = "Failed to update entity [%s]. The entity was updated since it was rea or it isn't in the database at all.";
private static final String UPDATE_FAILED = "Failed to update entity [%s]; Id [%s] not found in database";
private static final String UPDATE_FAILED_OPTIMISTIC_LOCKING = "Failed to update entity [%s]; The entity was updated since it was rea or it isn't in the database at all";
private final MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context;
private final JdbcConverter converter;
@@ -268,7 +268,7 @@ class JdbcAggregateChangeExecutionContext {
if (roots.isEmpty()) {
throw new IllegalStateException(
String.format("Cannot retrieve the resulting instance(s) unless a %s or %s action was successfully executed.",
String.format("Cannot retrieve the resulting instance(s) unless a %s or %s action was successfully executed",
DbAction.InsertRoot.class.getName(), DbAction.UpdateRoot.class.getName()));
}
@@ -312,7 +312,7 @@ class JdbcAggregateChangeExecutionContext {
return pathToValue;
}
throw new IllegalArgumentException(String.format("DbAction of type %s is not supported.", action.getClass()));
throw new IllegalArgumentException(String.format("DbAction of type %s is not supported", action.getClass()));
}
private <T> RelationalPersistentEntity<T> getRequiredPersistentEntity(Class<T> type) {
@@ -331,7 +331,7 @@ class JdbcAggregateChangeExecutionContext {
private <T> void updateWithVersion(DbAction.UpdateRoot<T> update) {
Number previousVersion = update.getPreviousVersion();
Assert.notNull(previousVersion, "The root aggregate cannot be updated because the version property is null.");
Assert.notNull(previousVersion, "The root aggregate cannot be updated because the version property is null");
if (!accessStrategy.updateWithVersion(update.getEntity(), update.getEntityType(), previousVersion)) {
@@ -460,8 +460,8 @@ class JdbcAggregateChangeExecutionContext {
@Override
public List add(@Nullable List list, @Nullable Object qualifier, Object value) {
Assert.notNull(list, "List must not be null.");
Assert.notNull(qualifier, "ListAggregator can't handle a null qualifier.");
Assert.notNull(list, "List must not be null");
Assert.notNull(qualifier, "ListAggregator can't handle a null qualifier");
int index = (int) qualifier;
if (index >= list.size()) {
@@ -492,7 +492,7 @@ class JdbcAggregateChangeExecutionContext {
@Override
public Map add(@Nullable Map map, @Nullable Object qualifier, Object value) {
Assert.notNull(map, "Map must not be null.");
Assert.notNull(map, "Map must not be null");
map.put(qualifier, value);
return map;

View File

@@ -87,10 +87,10 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
public JdbcAggregateTemplate(ApplicationContext publisher, RelationalMappingContext context, JdbcConverter converter,
DataAccessStrategy dataAccessStrategy) {
Assert.notNull(publisher, "ApplicationContext must not be null!");
Assert.notNull(context, "RelationalMappingContext must not be null!");
Assert.notNull(converter, "RelationalConverter must not be null!");
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null!");
Assert.notNull(publisher, "ApplicationContext must not be null");
Assert.notNull(context, "RelationalMappingContext must not be null");
Assert.notNull(converter, "RelationalConverter must not be null");
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null");
this.publisher = publisher;
this.context = context;
@@ -115,10 +115,10 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
public JdbcAggregateTemplate(ApplicationEventPublisher publisher, RelationalMappingContext context,
JdbcConverter converter, DataAccessStrategy dataAccessStrategy) {
Assert.notNull(publisher, "ApplicationEventPublisher must not be null!");
Assert.notNull(context, "RelationalMappingContext must not be null!");
Assert.notNull(converter, "RelationalConverter must not be null!");
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null!");
Assert.notNull(publisher, "ApplicationEventPublisher must not be null");
Assert.notNull(context, "RelationalMappingContext must not be null");
Assert.notNull(converter, "RelationalConverter must not be null");
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null");
this.publisher = publisher;
this.context = context;
@@ -137,7 +137,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
*/
public void setEntityCallbacks(EntityCallbacks entityCallbacks) {
Assert.notNull(entityCallbacks, "Callbacks must not be null.");
Assert.notNull(entityCallbacks, "Callbacks must not be null");
this.entityCallbacks = entityCallbacks;
}
@@ -145,7 +145,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> T save(T instance) {
Assert.notNull(instance, "Aggregate instance must not be null!");
Assert.notNull(instance, "Aggregate instance must not be null");
return performSave(instance, changeCreatorSelectorForSave(instance));
}
@@ -153,7 +153,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> Iterable<T> saveAll(Iterable<T> instances) {
Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty!");
Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty");
return performSaveAll(instances);
}
@@ -168,7 +168,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> T insert(T instance) {
Assert.notNull(instance, "Aggregate instance must not be null!");
Assert.notNull(instance, "Aggregate instance must not be null");
return performSave(instance, entity -> createInsertChange(prepareVersionForInsert(entity)));
}
@@ -183,7 +183,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> T update(T instance) {
Assert.notNull(instance, "Aggregate instance must not be null!");
Assert.notNull(instance, "Aggregate instance must not be null");
return performSave(instance, entity -> createUpdateChange(prepareVersionForUpdate(entity)));
}
@@ -199,8 +199,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> T findById(Object id, Class<T> domainType) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(id, "Id must not be null");
Assert.notNull(domainType, "Domain type must not be null");
T entity = accessStrategy.findById(id, domainType);
if (entity == null) {
@@ -212,8 +212,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> boolean existsById(Object id, Class<T> domainType) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(id, "Id must not be null");
Assert.notNull(domainType, "Domain type must not be null");
return accessStrategy.existsById(id, domainType);
}
@@ -221,7 +221,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(domainType, "Domain type must not be null");
Iterable<T> all = accessStrategy.findAll(domainType, sort);
return triggerAfterConvert(all);
@@ -230,7 +230,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> Page<T> findAll(Class<T> domainType, Pageable pageable) {
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(domainType, "Domain type must not be null");
Iterable<T> items = triggerAfterConvert(accessStrategy.findAll(domainType, pageable));
List<T> content = StreamSupport.stream(items.spliterator(), false).collect(Collectors.toList());
@@ -241,7 +241,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> Iterable<T> findAll(Class<T> domainType) {
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(domainType, "Domain type must not be null");
Iterable<T> all = accessStrategy.findAll(domainType);
return triggerAfterConvert(all);
@@ -250,8 +250,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
Assert.notNull(ids, "Ids must not be null!");
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(ids, "Ids must not be null");
Assert.notNull(domainType, "Domain type must not be null");
Iterable<T> allById = accessStrategy.findAllById(ids, domainType);
return triggerAfterConvert(allById);
@@ -260,8 +260,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <S> void delete(S aggregateRoot, Class<S> domainType) {
Assert.notNull(aggregateRoot, "Aggregate root must not be null!");
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(aggregateRoot, "Aggregate root must not be null");
Assert.notNull(domainType, "Domain type must not be null");
IdentifierAccessor identifierAccessor = context.getRequiredPersistentEntity(domainType)
.getIdentifierAccessor(aggregateRoot);
@@ -272,8 +272,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <S> void deleteById(Object id, Class<S> domainType) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(id, "Id must not be null");
Assert.notNull(domainType, "Domain type must not be null");
deleteTree(id, null, domainType);
}
@@ -281,7 +281,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> void deleteAllById(Iterable<?> ids, Class<T> domainType) {
Assert.isTrue(ids.iterator().hasNext(), "Ids must not be empty!");
Assert.isTrue(ids.iterator().hasNext(), "Ids must not be empty");
BatchingAggregateChange<T, DeleteAggregateChange<T>> batchingAggregateChange = BatchingAggregateChange
.forDelete(domainType);
@@ -301,7 +301,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public void deleteAll(Class<?> domainType) {
Assert.notNull(domainType, "Domain type must not be null!");
Assert.notNull(domainType, "Domain type must not be null");
MutableAggregateChange<?> change = createDeletingChange(domainType);
executor.executeDelete(change);
@@ -310,7 +310,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
@Override
public <T> void deleteAll(Iterable<? extends T> instances, Class<T> domainType) {
Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty!");
Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty");
BatchingAggregateChange<T, DeleteAggregateChange<T>> batchingAggregateChange = BatchingAggregateChange
.forDelete(domainType);
@@ -335,14 +335,14 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
Object identifier = context.getRequiredPersistentEntity(change.getEntityType())
.getIdentifierAccessor(entityAfterExecution).getIdentifier();
Assert.notNull(identifier, "After saving the identifier must not be null!");
Assert.notNull(identifier, "After saving the identifier must not be null");
return triggerAfterSave(entityAfterExecution, change);
}
private <T> RootAggregateChange<T> beforeExecute(T aggregateRoot, Function<T, RootAggregateChange<T>> changeCreator) {
Assert.notNull(aggregateRoot, "Aggregate instance must not be null!");
Assert.notNull(aggregateRoot, "Aggregate instance must not be null");
aggregateRoot = triggerBeforeConvert(aggregateRoot);
@@ -375,7 +375,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
Iterator<T> afterExecutionIterator = executor.executeSave(batchingAggregateChange).iterator();
Assert.isTrue(afterExecutionIterator.hasNext(), "Instances after execution must not be empty!");
Assert.isTrue(afterExecutionIterator.hasNext(), "Instances after execution must not be empty");
return afterExecute(batchingAggregateChange, afterExecutionIterator.next());
}

View File

@@ -217,7 +217,7 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
try {
return super.readValue(((Array) value).getArray(), type);
} catch (SQLException | ConverterNotFoundException e) {
LOG.info("Failed to extract a value of type %s from an Array. Attempting to use standard conversions.", e);
LOG.info("Failed to extract a value of type %s from an Array; Attempting to use standard conversions", e);
}
}
@@ -380,7 +380,7 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
Object key) {
RelationalPersistentEntity<T> entity = (RelationalPersistentEntity<T>) rootPath.getLeafEntity();
Assert.notNull(entity, "The rootPath must point to an entity.");
Assert.notNull(entity, "The rootPath must point to an entity");
this.entity = entity;
this.rootPath = rootPath;

View File

@@ -148,7 +148,7 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
if (affectedRows == 0) {
throw new OptimisticLockingFailureException(
String.format("Optimistic lock exception on saving entity of type %s.", persistentEntity.getName()));
String.format("Optimistic lock exception on saving entity of type %s", persistentEntity.getName()));
}
return true;
@@ -166,7 +166,7 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
@Override
public <T> void deleteWithVersion(Object id, Class<T> domainType, Number previousVersion) {
Assert.notNull(id, "Id must not be null.");
Assert.notNull(id, "Id must not be null");
RelationalPersistentEntity<T> persistentEntity = getRequiredPersistentEntity(domainType);
@@ -176,7 +176,7 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
if (affectedRows == 0) {
throw new OptimisticLockingFailureException(
String.format("Optimistic lock exception deleting entity of type %s.", persistentEntity.getName()));
String.format("Optimistic lock exception deleting entity of type %s", persistentEntity.getName()));
}
}
@@ -242,7 +242,7 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
Long result = operations.getJdbcOperations().queryForObject(sql(domainType).getCount(), Long.class);
Assert.notNull(result, "The result of a count query must not be null.");
Assert.notNull(result, "The result of a count query must not be null");
return result;
}
@@ -287,8 +287,8 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
public Iterable<Object> findAllByPath(Identifier identifier,
PersistentPropertyPath<? extends RelationalPersistentProperty> propertyPath) {
Assert.notNull(identifier, "identifier must not be null.");
Assert.notNull(propertyPath, "propertyPath must not be null.");
Assert.notNull(identifier, "identifier must not be null");
Assert.notNull(propertyPath, "propertyPath must not be null");
PersistentPropertyPathExtension path = new PersistentPropertyPathExtension(context, propertyPath);

View File

@@ -63,7 +63,7 @@ public class DefaultJdbcTypeFactory implements JdbcTypeFactory {
@Override
public Array createArray(Object[] value) {
Assert.notNull(value, "Value must not be null.");
Assert.notNull(value, "Value must not be null");
Class<?> componentType = arrayColumns.getArrayType(value.getClass());

View File

@@ -84,7 +84,7 @@ class IdGeneratingBatchInsertStrategy implements BatchInsertStrategy {
} else {
ids[i] = keys.entrySet().stream().findFirst() //
.map(Map.Entry::getValue) //
.orElseThrow(() -> new IllegalStateException("KeyHolder contains an empty key list."));
.orElseThrow(() -> new IllegalStateException("KeyHolder contains an empty key list"));
}
}
return ids;

View File

@@ -66,8 +66,8 @@ public final class Identifier {
*/
public static Identifier of(SqlIdentifier name, Object value, Class<?> targetType) {
Assert.notNull(name, "Name must not be empty!");
Assert.notNull(targetType, "Target type must not be null!");
Assert.notNull(name, "Name must not be empty");
Assert.notNull(targetType, "Target type must not be null");
return new Identifier(Collections.singletonList(new SingleIdentifierValue(name, value, targetType)));
}
@@ -80,7 +80,7 @@ public final class Identifier {
*/
public static Identifier from(Map<SqlIdentifier, Object> map) {
Assert.notNull(map, "Map must not be null!");
Assert.notNull(map, "Map must not be null");
if (map.isEmpty()) {
return empty();
@@ -108,8 +108,8 @@ public final class Identifier {
*/
public Identifier withPart(SqlIdentifier name, Object value, Class<?> targetType) {
Assert.notNull(name, "Name must not be null!");
Assert.notNull(targetType, "Target type must not be null!");
Assert.notNull(name, "Name must not be null");
Assert.notNull(targetType, "Target type must not be null");
boolean overwritten = false;
List<SingleIdentifierValue> keys = new ArrayList<>(this.parts.size() + 1);
@@ -187,8 +187,8 @@ public final class Identifier {
private SingleIdentifierValue(SqlIdentifier name, @Nullable Object value, Class<?> targetType) {
Assert.notNull(name, "Name must not be null.");
Assert.notNull(targetType, "TargetType must not be null.");
Assert.notNull(name, "Name must not be null");
Assert.notNull(targetType, "TargetType must not be null");
this.name = name;
this.value = value;

View File

@@ -63,8 +63,8 @@ class IterableOfEntryToMapConverter implements ConditionalConverter, Converter<I
@Override
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
Assert.notNull(sourceType, "Source type must not be null.");
Assert.notNull(targetType, "Target type must not be null.");
Assert.notNull(sourceType, "Source type must not be null");
Assert.notNull(targetType, "Target type must not be null");
if (!sourceType.isAssignableTo(TypeDescriptor.valueOf(Iterable.class)))
return false;

View File

@@ -92,7 +92,7 @@ class ResultSetAccessor {
int index = findColumnIndex(columnName);
return index > 0 ? JdbcUtils.getResultSetValue(resultSet, index) : null;
} catch (SQLException o_O) {
throw new MappingException(String.format("Could not read value %s from result set!", columnName), o_O);
throw new MappingException(String.format("Could not read value %s from result set", columnName), o_O);
}
}

View File

@@ -205,7 +205,7 @@ class SqlGenerator {
String getFindAllByProperty(Identifier parentIdentifier, @Nullable SqlIdentifier keyColumn, boolean ordered) {
Assert.isTrue(keyColumn != null || !ordered,
"If the SQL statement should be ordered a keyColumn to order by must be provided.");
"If the SQL statement should be ordered a keyColumn to order by must be provided");
Table table = getTable();
@@ -487,7 +487,7 @@ class SqlGenerator {
SelectBuilder.SelectLimitOffset limitResult = limitable.limitOffset(pageable.getPageSize(), pageable.getOffset());
Assert.state(limitResult instanceof SelectBuilder.SelectOrdered, String.format(
"The result of applying the limit-clause must be of type SelectOrdered in order to apply the order-by-clause but is of type %s.",
"The result of applying the limit-clause must be of type SelectOrdered in order to apply the order-by-clause but is of type %s",
select.getClass()));
return (SelectBuilder.SelectOrdered) limitResult;
@@ -747,9 +747,9 @@ class SqlGenerator {
Join(Table joinTable, Column joinColumn, Column parentId) {
Assert.notNull(joinTable, "JoinTable must not be null.");
Assert.notNull(joinColumn, "JoinColumn must not be null.");
Assert.notNull(parentId, "ParentId must not be null.");
Assert.notNull(joinTable, "JoinTable must not be null");
Assert.notNull(joinColumn, "JoinColumn must not be null");
Assert.notNull(parentId, "ParentId must not be null");
this.joinTable = joinTable;
this.joinColumn = joinColumn;

View File

@@ -39,9 +39,9 @@ public class SqlGeneratorSource {
public SqlGeneratorSource(RelationalMappingContext context, JdbcConverter converter, Dialect dialect) {
Assert.notNull(context, "Context must not be null.");
Assert.notNull(converter, "Converter must not be null.");
Assert.notNull(dialect, "Dialect must not be null.");
Assert.notNull(context, "Context must not be null");
Assert.notNull(converter, "Converter must not be null");
Assert.notNull(dialect, "Dialect must not be null");
this.context = context;
this.converter = converter;

View File

@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
/**
* Creates the {@link SqlIdentifierParameterSource} for various SQL operations, dialect identifier processing rules and
* applicable converters.
*
*
* @author Jens Schauder
* @author Chirag Tailor
* @since 2.4
@@ -213,7 +213,7 @@ public class SqlParametersFactory {
convertedIds.add(jdbcValue.getValue());
}
Assert.state(jdbcValue != null, "JdbcValue must be not null at this point. Please report this as a bug.");
Assert.state(jdbcValue != null, "JdbcValue must be not null at this point; Please report this as a bug");
SQLType jdbcType = jdbcValue.getJdbcType();
int typeNumber = jdbcType == null ? JdbcUtils.TYPE_UNKNOWN : jdbcType.getVendorTypeNumber();
@@ -279,7 +279,7 @@ public class SqlParametersFactory {
@Override
public void setProperty(PersistentProperty<?> property, @Nullable Object value) {
throw new UnsupportedOperationException("Cannot set value on 'null' target object.");
throw new UnsupportedOperationException("Cannot set value on 'null' target object");
}
@Override

View File

@@ -54,7 +54,7 @@ public interface AggregateReference<T, ID> {
public IdOnlyAggregateReference(ID id) {
Assert.notNull(id, "Id must not be null.");
Assert.notNull(id, "Id must not be null");
this.id = id;
}

View File

@@ -39,7 +39,7 @@ import org.springframework.util.StringUtils;
*/
public class JdbcMappingContext extends RelationalMappingContext {
private static final String MISSING_PARAMETER_NAME = "A constructor parameter name must not be null to be used with Spring Data JDBC! Offending parameter: %s";
private static final String MISSING_PARAMETER_NAME = "A constructor parameter name must not be null to be used with Spring Data JDBC; Offending parameter: %s";
/**
* Creates a new {@link JdbcMappingContext}.

View File

@@ -244,7 +244,7 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
long result = sqlSession().selectOne(statement, parameter);
if (result < 1) {
String message = String.format("The lock target does not exist. id: %s, statement: %s", id, statement);
String message = String.format("The lock target does not exist; id: %s, statement: %s", id, statement);
throw new EmptyResultDataAccessException(message, 1);
}
}
@@ -346,7 +346,7 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
RelationalPersistentProperty baseProperty = propertyPath.getBaseProperty();
Assert.notNull(baseProperty, "BaseProperty must not be null.");
Assert.notNull(baseProperty, "BaseProperty must not be null");
return baseProperty.getOwner().getType();
}

View File

@@ -123,7 +123,7 @@ public class AbstractJdbcConfiguration implements ApplicationContextAware {
} catch (NoSuchBeanDefinitionException exception) {
LOG.warn("No dialect found. CustomConversions will be configured without dialect specific conversions.");
LOG.warn("No dialect found; CustomConversions will be configured without dialect specific conversions");
return new JdbcCustomConversions();
}

View File

@@ -79,7 +79,7 @@ public class DialectResolver {
.flatMap(Optionals::toStream) //
.findFirst() //
.orElseThrow(() -> new NoDialectException(
String.format("Cannot determine a dialect for %s. Please provide a Dialect.", operations)));
String.format("Cannot determine a dialect for %s; Please provide a Dialect", operations)));
}
/**

View File

@@ -66,7 +66,7 @@ class JdbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
@Override
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
Assert.notNull(configuration, "AuditingConfiguration must not be null!");
Assert.notNull(configuration, "AuditingConfiguration must not be null");
BeanDefinitionBuilder builder = configureDefaultAuditHandlerAttributes(configuration,
BeanDefinitionBuilder.rootBeanDefinition(IsNewAwareAuditingHandler.class));

View File

@@ -58,8 +58,8 @@ public abstract class AbstractJdbcQuery implements RepositoryQuery {
*/
AbstractJdbcQuery(JdbcQueryMethod queryMethod, NamedParameterJdbcOperations operations) {
Assert.notNull(queryMethod, "Query method must not be null!");
Assert.notNull(operations, "NamedParameterJdbcOperations must not be null!");
Assert.notNull(queryMethod, "Query method must not be null");
Assert.notNull(operations, "NamedParameterJdbcOperations must not be null");
this.queryMethod = queryMethod;
this.operations = operations;

View File

@@ -341,9 +341,9 @@ class JdbcQueryCreator extends RelationalQueryCreator<ParametrizedQuery> {
Join(Table joinTable, Column joinColumn, Column parentId) {
Assert.notNull(joinTable, "JoinTable must not be null.");
Assert.notNull(joinColumn, "JoinColumn must not be null.");
Assert.notNull(parentId, "ParentId must not be null.");
Assert.notNull(joinTable, "JoinTable must not be null");
Assert.notNull(joinColumn, "JoinColumn must not be null");
Assert.notNull(parentId, "ParentId must not be null");
this.joinTable = joinTable;
this.joinColumn = joinColumn;

View File

@@ -73,8 +73,8 @@ class QueryMapper {
@SuppressWarnings({ "unchecked", "rawtypes" })
QueryMapper(Dialect dialect, JdbcConverter converter) {
Assert.notNull(dialect, "Dialect must not be null!");
Assert.notNull(converter, "JdbcConverter must not be null!");
Assert.notNull(dialect, "Dialect must not be null");
Assert.notNull(converter, "JdbcConverter must not be null");
this.converter = converter;
this.dialect = dialect;
@@ -123,7 +123,7 @@ class QueryMapper {
Field field = createPropertyField(entity, column.getName());
TableLike table = column.getTable();
Assert.state(table != null, String.format("The column %s must have a table set.", column));
Assert.state(table != null, String.format("The column %s must have a table set", column));
Column columnFromTable = table.column(field.getMappedColumnName());
return column instanceof Aliased ? columnFromTable.as(((Aliased) column).getAlias()) : columnFromTable;
@@ -160,9 +160,9 @@ class QueryMapper {
Condition getMappedObject(MapSqlParameterSource parameterSource, CriteriaDefinition criteria, Table table,
@Nullable RelationalPersistentEntity<?> entity) {
Assert.notNull(parameterSource, "MapSqlParameterSource must not be null!");
Assert.notNull(criteria, "CriteriaDefinition must not be null!");
Assert.notNull(table, "Table must not be null!");
Assert.notNull(parameterSource, "MapSqlParameterSource must not be null");
Assert.notNull(criteria, "CriteriaDefinition must not be null");
Assert.notNull(table, "Table must not be null");
if (criteria.isEmpty()) {
throw new IllegalArgumentException("Cannot map empty Criteria");
@@ -667,7 +667,7 @@ class QueryMapper {
*/
Field(SqlIdentifier name) {
Assert.notNull(name, "Name must not be null!");
Assert.notNull(name, "Name must not be null");
this.name = name;
}
@@ -736,7 +736,7 @@ class QueryMapper {
super(name);
Assert.notNull(entity, "MongoPersistentEntity must not be null!");
Assert.notNull(entity, "MongoPersistentEntity must not be null");
this.entity = entity;
this.mappingContext = context;

View File

@@ -62,7 +62,7 @@ import org.springframework.util.StringUtils;
*/
public class StringBasedJdbcQuery extends AbstractJdbcQuery {
private static final String PARAMETER_NEEDS_TO_BE_NAMED = "For queries with named parameters you need to provide names for method parameters. Use @Param for query method parameters, or when on Java 8+ use the javac flag -parameters.";
private static final String PARAMETER_NEEDS_TO_BE_NAMED = "For queries with named parameters you need to provide names for method parameters; Use @Param for query method parameters, or when on Java 8+ use the javac flag -parameters";
private final JdbcQueryMethod queryMethod;
private final JdbcConverter converter;
@@ -104,12 +104,12 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
if (queryMethod.isSliceQuery()) {
throw new UnsupportedOperationException(
"Slice queries are not supported using string-based queries. Offending method: " + queryMethod);
"Slice queries are not supported using string-based queries; Offending method: " + queryMethod);
}
if (queryMethod.isPageQuery()) {
throw new UnsupportedOperationException(
"Page queries are not supported using string-based queries. Offending method: " + queryMethod);
"Page queries are not supported using string-based queries; Offending method: " + queryMethod);
}
}
@@ -157,7 +157,7 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
RelationalParameters.RelationalParameter parameter = queryMethod.getParameters().getParameter(p.getIndex());
ResolvableType resolvableType = parameter.getResolvableType();
Class<?> type = resolvableType.resolve();
Assert.notNull(type, "@Query parameter type could not be resolved!");
Assert.notNull(type, "@Query parameter type could not be resolved");
JdbcValue jdbcValue;
if (value instanceof Iterable) {
@@ -167,7 +167,7 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
Class<?> elementType = resolvableType.getGeneric(0).resolve();
Assert.notNull(elementType, "@Query Iterable parameter generic type could not be resolved!");
Assert.notNull(elementType, "@Query Iterable parameter generic type could not be resolved");
for (Object o : (Iterable<?>) value) {
JdbcValue elementJdbcValue = converter.writeJdbcValue(o, elementType,

View File

@@ -145,7 +145,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy {
if (queryMethod.hasAnnotatedQuery() && queryMethod.hasAnnotatedQueryName()) {
LOG.warn(String.format(
"Query method %s is annotated with both, a query and a query name. Using the declared query.", method));
"Query method %s is annotated with both, a query and a query name; Using the declared query", method));
}
StringBasedJdbcQuery query = new StringBasedJdbcQuery(queryMethod, getOperations(), this::createMapper,
@@ -155,7 +155,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy {
}
throw new IllegalStateException(
String.format("Did neither find a NamedQuery nor an annotated query for method %s!", method));
String.format("Did neither find a NamedQuery nor an annotated query for method %s", method));
}
}
@@ -186,8 +186,8 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy {
super(publisher, callbacks, context, converter, dialect, queryMappingConfiguration, operations, beanfactory);
Assert.notNull(createStrategy, "CreateQueryLookupStrategy must not be null!");
Assert.notNull(lookupStrategy, "DeclaredQueryLookupStrategy must not be null!");
Assert.notNull(createStrategy, "CreateQueryLookupStrategy must not be null");
Assert.notNull(lookupStrategy, "DeclaredQueryLookupStrategy must not be null");
this.createStrategy = createStrategy;
this.lookupStrategy = lookupStrategy;
@@ -258,7 +258,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy {
return new CreateIfNotFoundQueryLookupStrategy(publisher, callbacks, context, converter, dialect,
queryMappingConfiguration, operations, beanFactory, createQueryLookupStrategy, declaredQueryLookupStrategy);
default:
throw new IllegalArgumentException(String.format("Unsupported query lookup strategy %s!", key));
throw new IllegalArgumentException(String.format("Unsupported query lookup strategy %s", key));
}
}

View File

@@ -76,11 +76,11 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport {
JdbcConverter converter, Dialect dialect, ApplicationEventPublisher publisher,
NamedParameterJdbcOperations operations) {
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null!");
Assert.notNull(context, "RelationalMappingContext must not be null!");
Assert.notNull(converter, "RelationalConverter must not be null!");
Assert.notNull(dialect, "Dialect must not be null!");
Assert.notNull(publisher, "ApplicationEventPublisher must not be null!");
Assert.notNull(dataAccessStrategy, "DataAccessStrategy must not be null");
Assert.notNull(context, "RelationalMappingContext must not be null");
Assert.notNull(converter, "RelationalConverter must not be null");
Assert.notNull(dialect, "Dialect must not be null");
Assert.notNull(publisher, "ApplicationEventPublisher must not be null");
this.publisher = publisher;
this.context = context;
@@ -96,7 +96,7 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport {
*/
public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingConfiguration) {
Assert.notNull(queryMappingConfiguration, "QueryMappingConfiguration must not be null!");
Assert.notNull(queryMappingConfiguration, "QueryMappingConfiguration must not be null");
this.queryMappingConfiguration = queryMappingConfiguration;
}

View File

@@ -160,24 +160,24 @@ public class JdbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extend
@Override
public void afterPropertiesSet() {
Assert.state(this.mappingContext != null, "MappingContext is required and must not be null!");
Assert.state(this.converter != null, "RelationalConverter is required and must not be null!");
Assert.state(this.mappingContext != null, "MappingContext is required and must not be null");
Assert.state(this.converter != null, "RelationalConverter is required and must not be null");
if (this.operations == null) {
Assert.state(beanFactory != null, "If no JdbcOperations are set a BeanFactory must be available.");
Assert.state(beanFactory != null, "If no JdbcOperations are set a BeanFactory must be available");
this.operations = beanFactory.getBean(NamedParameterJdbcOperations.class);
}
if (this.dataAccessStrategy == null) {
Assert.state(beanFactory != null, "If no DataAccessStrategy is set a BeanFactory must be available.");
Assert.state(beanFactory != null, "If no DataAccessStrategy is set a BeanFactory must be available");
this.dataAccessStrategy = this.beanFactory.getBeanProvider(DataAccessStrategy.class) //
.getIfAvailable(() -> {
Assert.state(this.dialect != null, "Dialect is required and must not be null!");
Assert.state(this.dialect != null, "Dialect is required and must not be null");
SqlGeneratorSource sqlGeneratorSource = new SqlGeneratorSource(this.mappingContext, this.converter,
this.dialect);

View File

@@ -43,8 +43,8 @@ public class SimpleJdbcRepository<T, ID> implements CrudRepository<T,ID>, Paging
public SimpleJdbcRepository(JdbcAggregateOperations entityOperations,PersistentEntity<T, ?> entity) {
Assert.notNull(entityOperations, "EntityOperations must not be null.");
Assert.notNull(entity, "Entity must not be null.");
Assert.notNull(entityOperations, "EntityOperations must not be null");
Assert.notNull(entity, "Entity must not be null");
this.entityOperations = entityOperations;
this.entity = entity;

View File

@@ -98,7 +98,7 @@ public final class JdbcUtil {
@Deprecated
public static int sqlTypeFor(Class<?> type) {
Assert.notNull(type, "Type must not be null.");
Assert.notNull(type, "Type must not be null");
return sqlTypeMappings.keySet().stream() //
.filter(k -> k.isAssignableFrom(type)) //
@@ -116,7 +116,7 @@ public final class JdbcUtil {
*/
public static SQLType targetSqlTypeFor(Class<?> type) {
Assert.notNull(type, "Type must not be null.");
Assert.notNull(type, "Type must not be null");
return sqlTypeMappings.keySet().stream() //
.filter(k -> k.isAssignableFrom(type)) //

View File

@@ -187,7 +187,7 @@ class JdbcAggregateTemplateIntegrationTests {
entity.setName(name);
Manual manual = new Manual();
manual.setContent("Accelerates to 99% of light speed. Destroys almost everything. See https://what-if.xkcd.com/1/");
manual.setContent("Accelerates to 99% of light speed; Destroys almost everything. See https://what-if.xkcd.com/1/");
entity.setManual(manual);
return entity;

View File

@@ -36,7 +36,7 @@ import org.springframework.data.relational.core.sql.SqlIdentifier;
public class CascadingDataAccessStrategyUnitTests {
int errorIndex = 1;
String[] errorMessages = { "Sorry I don't support this method. Please try again later", "Still no luck" };
String[] errorMessages = { "Sorry I don't support this method; Please try again later", "Still no luck" };
DataAccessStrategy alwaysFails = mock(DataAccessStrategy.class, i -> {
errorIndex++;

View File

@@ -34,8 +34,8 @@ public interface TestUtils {
*/
public static String createScriptName(Class<?> testClass, String databaseType) {
Assert.notNull(testClass, "Test class must not be null!");
Assert.hasText(databaseType, "Database type must not be null or empty!");
Assert.notNull(testClass, "Test class must not be null");
Assert.hasText(databaseType, "Database type must not be null or empty");
String path = String.format("%s/%s-%s.sql", testClass.getPackage().getName(), testClass.getSimpleName(),
databaseType.toLowerCase());

View File

@@ -120,8 +120,8 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
public R2dbcEntityTemplate r2dbcEntityTemplate(DatabaseClient databaseClient,
ReactiveDataAccessStrategy dataAccessStrategy) {
Assert.notNull(databaseClient, "DatabaseClient must not be null!");
Assert.notNull(dataAccessStrategy, "ReactiveDataAccessStrategy must not be null!");
Assert.notNull(databaseClient, "DatabaseClient must not be null");
Assert.notNull(dataAccessStrategy, "ReactiveDataAccessStrategy must not be null");
return new R2dbcEntityTemplate(databaseClient, dataAccessStrategy);
}
@@ -138,7 +138,7 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
public R2dbcMappingContext r2dbcMappingContext(Optional<NamingStrategy> namingStrategy,
R2dbcCustomConversions r2dbcCustomConversions) {
Assert.notNull(namingStrategy, "NamingStrategy must not be null!");
Assert.notNull(namingStrategy, "NamingStrategy must not be null");
R2dbcMappingContext context = new R2dbcMappingContext(namingStrategy.orElse(NamingStrategy.INSTANCE));
context.setSimpleTypeHolder(r2dbcCustomConversions.getSimpleTypeHolder());
@@ -159,7 +159,7 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
@Bean
public ReactiveDataAccessStrategy reactiveDataAccessStrategy(R2dbcConverter converter) {
Assert.notNull(converter, "MappingContext must not be null!");
Assert.notNull(converter, "MappingContext must not be null");
return new DefaultReactiveDataAccessStrategy(getDialect(lookupConnectionFactory()), converter);
}
@@ -180,7 +180,7 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
public MappingR2dbcConverter r2dbcConverter(R2dbcMappingContext mappingContext,
R2dbcCustomConversions r2dbcCustomConversions) {
Assert.notNull(mappingContext, "MappingContext must not be null!");
Assert.notNull(mappingContext, "MappingContext must not be null");
return new MappingR2dbcConverter(mappingContext, r2dbcCustomConversions);
}

View File

@@ -62,7 +62,7 @@ class R2dbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
@Override
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
Assert.notNull(configuration, "AuditingConfiguration must not be null!");
Assert.notNull(configuration, "AuditingConfiguration must not be null");
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(ReactiveIsNewAwareAuditingHandler.class);
@@ -81,8 +81,8 @@ class R2dbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
BeanDefinitionRegistry registry) {
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null!");
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
Assert.notNull(auditingHandlerDefinition, "BeanDefinition must not be null");
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(ReactiveAuditingEntityCallback.class);

View File

@@ -185,7 +185,7 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
return readValue(value, property.getTypeInformation());
} catch (Exception o_O) {
throw new MappingException(String.format("Could not read property %s from column %s!", property, identifier),
throw new MappingException(String.format("Could not read property %s from column %s", property, identifier),
o_O);
}
}
@@ -216,7 +216,7 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
@SuppressWarnings("unchecked")
private Object readCollectionOrArray(Collection<?> source, TypeInformation<?> targetType) {
Assert.notNull(targetType, "Target type must not be null!");
Assert.notNull(targetType, "Target type must not be null");
Class<?> collectionType = targetType.isSubTypeOf(Collection.class) //
? targetType.getType() //
@@ -240,7 +240,7 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
if (!Object.class.equals(rawComponentType) && element instanceof Collection) {
if (!rawComponentType.isArray() && !ClassUtils.isAssignable(Iterable.class, rawComponentType)) {
throw new MappingException(String.format(
"Cannot convert %1$s of type %2$s into an instance of %3$s! Implement a custom Converter<%2$s, %3$s> and register it with the CustomConversions",
"Cannot convert %1$s of type %2$s into an instance of %3$s; Implement a custom Converter<%2$s, %3$s> and register it with the CustomConversions",
element, element.getClass(), rawComponentType));
}
}
@@ -603,7 +603,7 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
@SuppressWarnings("unchecked")
public <T> BiFunction<Row, RowMetadata, T> populateIdIfNecessary(T object) {
Assert.notNull(object, "Entity object must not be null!");
Assert.notNull(object, "Entity object must not be null");
Class<?> userClass = ClassUtils.getUserClass(object);
RelationalPersistentEntity<?> entity = getMappingContext().getRequiredPersistentEntity(userClass);
@@ -744,7 +744,7 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
try {
return this.converter.getConversionService().convert(value, type);
} catch (Exception o_O) {
throw new MappingException(String.format("Couldn't read parameter %s.", parameter.getName()), o_O);
throw new MappingException(String.format("Couldn't read parameter %s", parameter.getName()), o_O);
}
}
}

View File

@@ -179,7 +179,7 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
*/
public OutboundRow getOutboundRow(Object object) {
Assert.notNull(object, "Entity object must not be null!");
Assert.notNull(object, "Entity object must not be null");
OutboundRow row = new OutboundRow();

View File

@@ -80,7 +80,7 @@ class DefaultStatementMapper implements StatementMapper {
@SuppressWarnings("unchecked")
public <T> TypedStatementMapper<T> forType(Class<T> type) {
Assert.notNull(type, "Type must not be null!");
Assert.notNull(type, "Type must not be null");
return new DefaultTypedStatementMapper<>(
(RelationalPersistentEntity<T>) this.mappingContext.getRequiredPersistentEntity(type));

View File

@@ -64,8 +64,8 @@ class MapBindParameterSource implements BindParameterSource {
*/
MapBindParameterSource addValue(String paramName, Object value) {
Assert.notNull(paramName, "Parameter name must not be null!");
Assert.notNull(value, "Value must not be null!");
Assert.notNull(paramName, "Parameter name must not be null");
Assert.notNull(value, "Value must not be null");
this.values.put(paramName, Parameter.fromOrEmpty(value, value.getClass()));
return this;
@@ -78,7 +78,7 @@ class MapBindParameterSource implements BindParameterSource {
@Override
public boolean hasValue(String paramName) {
Assert.notNull(paramName, "Parameter name must not be null!");
Assert.notNull(paramName, "Parameter name must not be null");
return values.containsKey(paramName);
}
@@ -90,7 +90,7 @@ class MapBindParameterSource implements BindParameterSource {
@Override
public Class<?> getType(String paramName) {
Assert.notNull(paramName, "Parameter name must not be null!");
Assert.notNull(paramName, "Parameter name must not be null");
Parameter settableValue = this.values.get(paramName);
if (settableValue != null) {

View File

@@ -538,7 +538,7 @@ abstract class NamedParameterUtils {
Assert.isTrue(markers.hasNext(),
() -> String.format(
"No bind marker for value [%s] in SQL [%s]. Check that the query was expanded using the same arguments.",
"No bind marker for value [%s] in SQL [%s]; Check that the query was expanded using the same arguments",
valueToBind, toQuery()));
markers.next().bind(target, valueToBind);

View File

@@ -226,7 +226,7 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
*/
public void setEntityCallbacks(ReactiveEntityCallbacks entityCallbacks) {
Assert.notNull(entityCallbacks, "EntityCallbacks must not be null!");
Assert.notNull(entityCallbacks, "EntityCallbacks must not be null");
this.entityCallbacks = entityCallbacks;
}
@@ -717,13 +717,13 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
private <T> String formatOptimisticLockingExceptionMessage(T entity, RelationalPersistentEntity<T> persistentEntity) {
return String.format("Failed to update table [%s]. Version does not match for row with Id [%s].",
return String.format("Failed to update table [%s]; Version does not match for row with Id [%s]",
persistentEntity.getTableName(), persistentEntity.getIdentifierAccessor(entity).getIdentifier());
}
private <T> String formatTransientEntityExceptionMessage(T entity, RelationalPersistentEntity<T> persistentEntity) {
return String.format("Failed to update table [%s]. Row with Id [%s] does not exist.",
return String.format("Failed to update table [%s]; Row with Id [%s] does not exist",
persistentEntity.getTableName(), persistentEntity.getIdentifierAccessor(entity).getIdentifier());
}
@@ -812,7 +812,7 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
private <T> Query getByIdQuery(T entity, RelationalPersistentEntity<?> persistentEntity) {
if (!persistentEntity.hasIdProperty()) {
throw new MappingException("No id property found for object of type " + persistentEntity.getType() + "!");
throw new MappingException("No id property found for object of type " + persistentEntity.getType());
}
IdentifierAccessor identifierAccessor = persistentEntity.getIdentifierAccessor(entity);

View File

@@ -135,7 +135,7 @@ public interface ReactiveDataAccessStrategy {
*/
default String renderForGeneratedValues(SqlIdentifier identifier) {
Assert.notNull(identifier, "SqlIdentifier must not be null.");
Assert.notNull(identifier, "SqlIdentifier must not be null");
return identifier.toSql(IdentifierProcessing.NONE);
}

View File

@@ -60,7 +60,7 @@ public class DialectResolver {
.findFirst() //
.orElseThrow(() -> {
return new NoDialectException(
String.format("Cannot determine a dialect for %s using %s. Please provide a Dialect.",
String.format("Cannot determine a dialect for %s using %s; Please provide a Dialect",
connectionFactory.getMetadata().getName(), connectionFactory));
});
}

View File

@@ -44,7 +44,7 @@ public class ReactiveAuditingEntityCallback implements BeforeConvertCallback<Obj
*/
public ReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) {
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null!");
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null");
this.auditingHandlerFactory = auditingHandlerFactory;
}

View File

@@ -34,8 +34,8 @@ public class BoundAssignments {
public BoundAssignments(Bindings bindings, List<Assignment> assignments) {
Assert.notNull(bindings, "Bindings must not be null!");
Assert.notNull(assignments, "Assignments must not be null!");
Assert.notNull(bindings, "Bindings must not be null");
Assert.notNull(assignments, "Assignments must not be null");
this.bindings = bindings;
this.assignments = assignments;

View File

@@ -32,8 +32,8 @@ public class BoundCondition {
public BoundCondition(Bindings bindings, Condition condition) {
Assert.notNull(bindings, "Bindings must not be null!");
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(bindings, "Bindings must not be null");
Assert.notNull(condition, "Condition must not be null");
this.bindings = bindings;
this.condition = condition;

View File

@@ -73,8 +73,8 @@ public class QueryMapper {
@SuppressWarnings({ "unchecked", "rawtypes" })
public QueryMapper(R2dbcDialect dialect, R2dbcConverter converter) {
Assert.notNull(converter, "R2dbcConverter must not be null!");
Assert.notNull(dialect, "R2dbcDialect must not be null!");
Assert.notNull(converter, "R2dbcConverter must not be null");
Assert.notNull(dialect, "R2dbcDialect must not be null");
this.converter = converter;
this.dialect = dialect;
@@ -199,9 +199,9 @@ public class QueryMapper {
public BoundCondition getMappedObject(BindMarkers markers, CriteriaDefinition criteria, Table table,
@Nullable RelationalPersistentEntity<?> entity) {
Assert.notNull(markers, "BindMarkers must not be null!");
Assert.notNull(criteria, "CriteriaDefinition must not be null!");
Assert.notNull(table, "Table must not be null!");
Assert.notNull(markers, "BindMarkers must not be null");
Assert.notNull(criteria, "CriteriaDefinition must not be null");
Assert.notNull(table, "Table must not be null");
MutableBindings bindings = new MutableBindings(markers);
@@ -228,9 +228,9 @@ public class QueryMapper {
public BoundCondition getMappedObject(BindMarkers markers, Criteria criteria, Table table,
@Nullable RelationalPersistentEntity<?> entity) {
Assert.notNull(markers, "BindMarkers must not be null!");
Assert.notNull(criteria, "Criteria must not be null!");
Assert.notNull(table, "Table must not be null!");
Assert.notNull(markers, "BindMarkers must not be null");
Assert.notNull(criteria, "Criteria must not be null");
Assert.notNull(table, "Table must not be null");
MutableBindings bindings = new MutableBindings(markers);
@@ -618,7 +618,7 @@ public class QueryMapper {
*/
public Field(SqlIdentifier name) {
Assert.notNull(name, "Name must not be null!");
Assert.notNull(name, "Name must not be null");
this.name = name;
}
@@ -674,7 +674,7 @@ public class QueryMapper {
super(name);
Assert.notNull(entity, "RelationalPersistentEntity must not be null!");
Assert.notNull(entity, "RelationalPersistentEntity must not be null");
this.entity = entity;
this.mappingContext = context;

View File

@@ -86,9 +86,9 @@ public class UpdateMapper extends QueryMapper {
public BoundAssignments getMappedObject(BindMarkers markers, Map<SqlIdentifier, ? extends Object> assignments,
Table table, @Nullable RelationalPersistentEntity<?> entity) {
Assert.notNull(markers, "BindMarkers must not be null!");
Assert.notNull(assignments, "Assignments must not be null!");
Assert.notNull(table, "Table must not be null!");
Assert.notNull(markers, "BindMarkers must not be null");
Assert.notNull(assignments, "Assignments must not be null");
Assert.notNull(table, "Table must not be null");
MutableBindings bindings = new MutableBindings(markers);
List<Assignment> result = new ArrayList<>();

View File

@@ -59,9 +59,9 @@ public abstract class AbstractR2dbcQuery implements RepositoryQuery {
*/
public AbstractR2dbcQuery(R2dbcQueryMethod method, R2dbcEntityOperations entityOperations, R2dbcConverter converter) {
Assert.notNull(method, "R2dbcQueryMethod must not be null!");
Assert.notNull(entityOperations, "R2dbcEntityOperations must not be null!");
Assert.notNull(converter, "R2dbcConverter must not be null!");
Assert.notNull(method, "R2dbcQueryMethod must not be null");
Assert.notNull(entityOperations, "R2dbcEntityOperations must not be null");
Assert.notNull(converter, "R2dbcConverter must not be null");
this.method = method;
this.entityOperations = entityOperations;

View File

@@ -71,7 +71,7 @@ public class PartTreeR2dbcQuery extends AbstractR2dbcQuery {
R2dbcQueryCreator.validate(this.tree, this.parameters);
} catch (RuntimeException e) {
throw new IllegalArgumentException(
String.format("Failed to create query for method %s! %s", method, e.getMessage()), e);
String.format("Failed to create query for method %s; %s", method, e.getMessage()), e);
}
}

View File

@@ -38,7 +38,7 @@ class PreparedOperationBindableQuery implements BindableQuery {
*/
PreparedOperationBindableQuery(PreparedOperation<?> preparedQuery) {
Assert.notNull(preparedQuery, "Prepared query must not be null!");
Assert.notNull(preparedQuery, "Prepared query must not be null");
this.preparedQuery = preparedQuery;
}

View File

@@ -85,7 +85,7 @@ public class R2dbcQueryMethod extends QueryMethod {
super(method, metadata, projectionFactory);
Assert.notNull(mappingContext, "MappingContext must not be null!");
Assert.notNull(mappingContext, "MappingContext must not be null");
this.mappingContext = mappingContext;
@@ -100,19 +100,19 @@ public class R2dbcQueryMethod extends QueryMethod {
if (singleWrapperWithWrappedPageableResult) {
throw new InvalidDataAccessApiUsageException(
String.format("'%s.%s' must not use sliced or paged execution. Please use Flux.buffer(size, skip).",
String.format("'%s.%s' must not use sliced or paged execution; Please use Flux.buffer(size, skip)",
ClassUtils.getShortName(method.getDeclaringClass()), method.getName()));
}
if (!multiWrapper) {
throw new IllegalStateException(String.format(
"Method has to use a either multi-item reactive wrapper return type or a wrapped Page/Slice type. Offending method: %s",
"Method has to use a either multi-item reactive wrapper return type or a wrapped Page/Slice type; Offending method: %s",
method.toString()));
}
if (hasParameterOfType(method, Sort.class)) {
throw new IllegalStateException(String.format("Method must not have Pageable *and* Sort parameter. "
+ "Use sorting capabilities on Pageable instead! Offending method: %s", method.toString()));
throw new IllegalStateException(String.format("Method must not have Pageable *and* Sort parameter; "
+ "Use sorting capabilities on Pageable instead; Offending method: %s", method.toString()));
}
}

View File

@@ -70,8 +70,8 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
*/
public R2dbcRepositoryFactory(DatabaseClient databaseClient, ReactiveDataAccessStrategy dataAccessStrategy) {
Assert.notNull(databaseClient, "DatabaseClient must not be null!");
Assert.notNull(dataAccessStrategy, "ReactiveDataAccessStrategy must not be null!");
Assert.notNull(databaseClient, "DatabaseClient must not be null");
Assert.notNull(dataAccessStrategy, "ReactiveDataAccessStrategy must not be null");
this.databaseClient = databaseClient;
this.dataAccessStrategy = dataAccessStrategy;
@@ -89,7 +89,7 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
*/
public R2dbcRepositoryFactory(R2dbcEntityOperations operations) {
Assert.notNull(operations, "R2dbcEntityOperations must not be null!");
Assert.notNull(operations, "R2dbcEntityOperations must not be null");
this.databaseClient = operations.getDatabaseClient();
this.dataAccessStrategy = operations.getDataAccessStrategy();

View File

@@ -157,9 +157,9 @@ public class R2dbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
if (operations == null) {
Assert.state(client != null, "DatabaseClient must not be null when R2dbcEntityOperations is not configured!");
Assert.state(client != null, "DatabaseClient must not be null when R2dbcEntityOperations is not configured");
Assert.state(dataAccessStrategy != null,
"ReactiveDataAccessStrategy must not be null when R2dbcEntityOperations is not configured!");
"ReactiveDataAccessStrategy must not be null when R2dbcEntityOperations is not configured");
R2dbcEntityTemplate template = new R2dbcEntityTemplate(client, dataAccessStrategy);

View File

@@ -50,7 +50,7 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
@Override
public ReactiveFluentQuery<T> sortBy(Sort sort) {
Assert.notNull(sort, "Sort must not be null!");
Assert.notNull(sort, "Sort must not be null");
return create(predicate, sort, resultType, fieldsToInclude);
}
@@ -62,7 +62,7 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
@Override
public <R> ReactiveFluentQuery<R> as(Class<R> projection) {
Assert.notNull(projection, "Projection target type must not be null!");
Assert.notNull(projection, "Projection target type must not be null");
return create(predicate, sort, projection, fieldsToInclude);
}
@@ -74,7 +74,7 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
@Override
public ReactiveFluentQuery<T> project(Collection<String> properties) {
Assert.notNull(properties, "Projection properties must not be null!");
Assert.notNull(properties, "Projection properties must not be null");
return create(predicate, sort, resultType, new ArrayList<>(properties));
}

View File

@@ -47,9 +47,9 @@ abstract class ReactivePageableExecutionUtils {
*/
public static <T> Mono<Page<T>> getPage(List<T> content, Pageable pageable, Mono<Long> totalSupplier) {
Assert.notNull(content, "Content must not be null!");
Assert.notNull(pageable, "Pageable must not be null!");
Assert.notNull(totalSupplier, "TotalSupplier must not be null!");
Assert.notNull(content, "Content must not be null");
Assert.notNull(pageable, "Pageable must not be null");
Assert.notNull(totalSupplier, "TotalSupplier must not be null");
if (pageable.isUnpaged() || pageable.getOffset() == 0) {

View File

@@ -117,7 +117,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public <S extends T> Mono<S> save(S objectToSave) {
Assert.notNull(objectToSave, "Object to save must not be null!");
Assert.notNull(objectToSave, "Object to save must not be null");
if (this.entity.isNew(objectToSave)) {
return this.entityOperations.insert(objectToSave);
@@ -134,7 +134,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public <S extends T> Flux<S> saveAll(Iterable<S> objectsToSave) {
Assert.notNull(objectsToSave, "Objects to save must not be null!");
Assert.notNull(objectsToSave, "Objects to save must not be null");
return Flux.fromIterable(objectsToSave).concatMap(this::save);
}
@@ -147,7 +147,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public <S extends T> Flux<S> saveAll(Publisher<S> objectsToSave) {
Assert.notNull(objectsToSave, "Object publisher must not be null!");
Assert.notNull(objectsToSave, "Object publisher must not be null");
return Flux.from(objectsToSave).concatMap(this::save);
}
@@ -159,7 +159,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Mono<T> findById(ID id) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(id, "Id must not be null");
return this.entityOperations.selectOne(getIdQuery(id), this.entity.getJavaType());
}
@@ -180,7 +180,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Mono<Boolean> existsById(ID id) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(id, "Id must not be null");
return this.entityOperations.exists(getIdQuery(id), this.entity.getJavaType());
}
@@ -210,7 +210,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Flux<T> findAllById(Iterable<ID> iterable) {
Assert.notNull(iterable, "The iterable of Id's must not be null!");
Assert.notNull(iterable, "The iterable of Id's must not be null");
return findAllById(Flux.fromIterable(iterable));
}
@@ -222,7 +222,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Flux<T> findAllById(Publisher<ID> idPublisher) {
Assert.notNull(idPublisher, "The Id Publisher must not be null!");
Assert.notNull(idPublisher, "The Id Publisher must not be null");
return Flux.from(idPublisher).buffer().filter(ids -> !ids.isEmpty()).concatMap(ids -> {
@@ -253,7 +253,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public Mono<Void> deleteById(ID id) {
Assert.notNull(id, "Id must not be null!");
Assert.notNull(id, "Id must not be null");
return this.entityOperations.delete(getIdQuery(id), this.entity.getJavaType()).then();
}
@@ -266,7 +266,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public Mono<Void> deleteById(Publisher<ID> idPublisher) {
Assert.notNull(idPublisher, "The Id Publisher must not be null!");
Assert.notNull(idPublisher, "The Id Publisher must not be null");
return Flux.from(idPublisher).buffer().filter(ids -> !ids.isEmpty()).concatMap(ids -> {
@@ -288,7 +288,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public Mono<Void> delete(T objectToDelete) {
Assert.notNull(objectToDelete, "Object to delete must not be null!");
Assert.notNull(objectToDelete, "Object to delete must not be null");
return deleteById(this.entity.getRequiredId(objectToDelete));
}
@@ -300,7 +300,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Mono<Void> deleteAllById(Iterable<? extends ID> ids) {
Assert.notNull(ids, "The iterable of Id's must not be null!");
Assert.notNull(ids, "The iterable of Id's must not be null");
List<? extends ID> idsList = Streamable.of(ids).toList();
String idProperty = getIdProperty().getName();
@@ -316,7 +316,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public Mono<Void> deleteAll(Iterable<? extends T> iterable) {
Assert.notNull(iterable, "The iterable of Id's must not be null!");
Assert.notNull(iterable, "The iterable of Id's must not be null");
return deleteAll(Flux.fromIterable(iterable));
}
@@ -329,7 +329,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Transactional
public Mono<Void> deleteAll(Publisher<? extends T> objectPublisher) {
Assert.notNull(objectPublisher, "The Object Publisher must not be null!");
Assert.notNull(objectPublisher, "The Object Publisher must not be null");
Flux<ID> idPublisher = Flux.from(objectPublisher) //
.map(this.entity::getRequiredId);
@@ -358,7 +358,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Flux<T> findAll(Sort sort) {
Assert.notNull(sort, "Sort must not be null!");
Assert.notNull(sort, "Sort must not be null");
return this.entityOperations.select(Query.empty().sort(sort), this.entity.getJavaType());
}
@@ -370,7 +370,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public <S extends T> Mono<S> findOne(Example<S> example) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(example, "Example must not be null");
Query query = this.exampleMapper.getMappedExample(example);
@@ -380,7 +380,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public <S extends T> Flux<S> findAll(Example<S> example) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(example, "Example must not be null");
return findAll(example, Sort.unsorted());
}
@@ -388,8 +388,8 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public <S extends T> Flux<S> findAll(Example<S> example, Sort sort) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(sort, "Sort must not be null!");
Assert.notNull(example, "Example must not be null");
Assert.notNull(sort, "Sort must not be null");
Query query = this.exampleMapper.getMappedExample(example).sort(sort);
@@ -399,7 +399,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public <S extends T> Mono<Long> count(Example<S> example) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(example, "Example must not be null");
Query query = this.exampleMapper.getMappedExample(example);
@@ -409,7 +409,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public <S extends T> Mono<Boolean> exists(Example<S> example) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(example, "Example must not be null");
Query query = this.exampleMapper.getMappedExample(example);
@@ -420,8 +420,8 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
public <S extends T, R, P extends Publisher<R>> P findBy(Example<S> example,
Function<FluentQuery.ReactiveFluentQuery<S>, P> queryFunction) {
Assert.notNull(example, "Sample must not be null!");
Assert.notNull(queryFunction, "Query function must not be null!");
Assert.notNull(example, "Sample must not be null");
Assert.notNull(queryFunction, "Query function must not be null");
return queryFunction.apply(new ReactiveFluentQueryByExample<>(example, example.getProbeType()));
}
@@ -490,7 +490,7 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
@Override
public Mono<Page<T>> page(Pageable pageable) {
Assert.notNull(pageable, "Pageable must not be null!");
Assert.notNull(pageable, "Pageable must not be null");
Mono<List<T>> items = createQuery(q -> q.with(pageable)).all().collectList();

View File

@@ -117,7 +117,7 @@ public class H2SimpleR2dbcRepositoryIntegrationTests extends AbstractSimpleR2dbc
.verifyErrorSatisfies(actual -> {
assertThat(actual).isInstanceOf(TransientDataAccessException.class)
.hasMessage("Failed to update table [legoset]. Row with Id [9999] does not exist.");
.hasMessage("Failed to update table [legoset]; Row with Id [9999] does not exist");
});
}

View File

@@ -93,8 +93,8 @@ public class BasicRelationalConverter implements RelationalConverter {
CustomConversions conversions, ConfigurableConversionService conversionService,
EntityInstantiators entityInstantiators) {
Assert.notNull(context, "MappingContext must not be null!");
Assert.notNull(conversions, "CustomConversions must not be null!");
Assert.notNull(context, "MappingContext must not be null");
Assert.notNull(conversions, "CustomConversions must not be null");
this.context = (MappingContext) context;
this.conversionService = conversionService;
@@ -254,7 +254,7 @@ public class BasicRelationalConverter implements RelationalConverter {
ConvertingParameterValueProvider(Function<Parameter<?, P>, Object> delegate) {
Assert.notNull(delegate, "Delegate must not be null.");
Assert.notNull(delegate, "Delegate must not be null");
this.delegate = delegate;
}

View File

@@ -57,7 +57,7 @@ class DefaultRootAggregateChange<T> implements RootAggregateChange<T> {
@Override
public void addAction(DbAction<?> action) {
Assert.notNull(action, "Action must not be null.");
Assert.notNull(action, "Action must not be null");
actions.add(action);
}
@@ -119,8 +119,8 @@ class DefaultRootAggregateChange<T> implements RootAggregateChange<T> {
@Override
public void forEachAction(Consumer<? super DbAction<?>> consumer) {
Assert.notNull(consumer, "Consumer must not be null.");
Assert.notNull(rootAction, "DbAction.WithRoot must not be null.");
Assert.notNull(consumer, "Consumer must not be null");
Assert.notNull(rootAction, "DbAction.WithRoot must not be null");
consumer.accept(rootAction);
actions.forEach(consumer);

View File

@@ -53,7 +53,7 @@ public class DeleteAggregateChange<T> implements MutableAggregateChange<T> {
@Override
public void addAction(DbAction<?> action) {
Assert.notNull(action, "Action must not be null.");
Assert.notNull(action, "Action must not be null");
actions.add(action);
}
@@ -77,7 +77,7 @@ public class DeleteAggregateChange<T> implements MutableAggregateChange<T> {
@Override
public void forEachAction(Consumer<? super DbAction<?>> consumer) {
Assert.notNull(consumer, "Consumer must not be null.");
Assert.notNull(consumer, "Consumer must not be null");
actions.forEach(consumer);
}

View File

@@ -42,7 +42,7 @@ public class RenderContextFactory {
*/
public RenderContextFactory(Dialect dialect) {
Assert.notNull(dialect, "Dialect must not be null!");
Assert.notNull(dialect, "Dialect must not be null");
this.dialect = dialect;
}

View File

@@ -80,7 +80,7 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
super(property, owner, simpleTypeHolder);
this.namingStrategy = namingStrategy;
Assert.notNull(namingStrategy, "NamingStrategy must not be null.");
Assert.notNull(namingStrategy, "NamingStrategy must not be null");
this.isEmbedded = Lazy.of(() -> Optional.ofNullable(findAnnotation(Embedded.class)).isPresent());

View File

@@ -46,7 +46,7 @@ class CachingNamingStrategy implements NamingStrategy {
*/
CachingNamingStrategy(NamingStrategy delegate) {
Assert.notNull(delegate, "Delegate must not be null!");
Assert.notNull(delegate, "Delegate must not be null");
this.delegate = delegate;
this.schema = Lazy.of(delegate::getSchema);

View File

@@ -56,7 +56,7 @@ public interface NamingStrategy {
*/
default String getTableName(Class<?> type) {
Assert.notNull(type, "Type must not be null.");
Assert.notNull(type, "Type must not be null");
return ParsingUtils.reconcatenateCamelCase(type.getSimpleName(), "_");
}
@@ -67,7 +67,7 @@ public interface NamingStrategy {
*/
default String getColumnName(RelationalPersistentProperty property) {
Assert.notNull(property, "Property must not be null.");
Assert.notNull(property, "Property must not be null");
return ParsingUtils.reconcatenateCamelCase(property.getName(), "_");
}
@@ -91,7 +91,7 @@ public interface NamingStrategy {
*/
default String getReverseColumnName(RelationalPersistentProperty property) {
Assert.notNull(property, "Property must not be null.");
Assert.notNull(property, "Property must not be null");
return property.getOwner().getTableName().getReference(IdentifierProcessing.NONE);
}
@@ -109,7 +109,7 @@ public interface NamingStrategy {
*/
default String getKeyColumn(RelationalPersistentProperty property) {
Assert.notNull(property, "Property must not be null.");
Assert.notNull(property, "Property must not be null");
return getReverseColumnName(property) + "_key";
}

View File

@@ -53,8 +53,8 @@ public class PersistentPropertyPathExtension {
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context,
RelationalPersistentEntity<?> entity) {
Assert.notNull(context, "Context must not be null.");
Assert.notNull(entity, "Entity must not be null.");
Assert.notNull(context, "Context must not be null");
Assert.notNull(entity, "Entity must not be null");
this.context = context;
this.entity = entity;
@@ -71,8 +71,8 @@ public class PersistentPropertyPathExtension {
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context,
PersistentPropertyPath<? extends RelationalPersistentProperty> path) {
Assert.notNull(context, "Context must not be null.");
Assert.notNull(path, "Path must not be null.");
Assert.notNull(context, "Context must not be null");
Assert.notNull(path, "Path must not be null");
Assert.notNull(path.getBaseProperty(), "Path must not be empty.");
this.context = context;
@@ -406,7 +406,7 @@ public class PersistentPropertyPathExtension {
}
if (path.getLength() == 1) {
Assert.notNull(prefix, "Prefix mus not be null.");
Assert.notNull(prefix, "Prefix mus not be null");
return StringUtils.hasText(prefix) ? SqlIdentifier.quoted(prefix) : null;
}

View File

@@ -51,7 +51,7 @@ public class RelationalMappingContext
*/
public RelationalMappingContext(NamingStrategy namingStrategy) {
Assert.notNull(namingStrategy, "NamingStrategy must not be null!");
Assert.notNull(namingStrategy, "NamingStrategy must not be null");
this.namingStrategy = new CachingNamingStrategy(namingStrategy);

View File

@@ -30,7 +30,7 @@ public final class Identifier {
private Identifier(Object value) {
Assert.notNull(value, "Identifier must not be null!");
Assert.notNull(value, "Identifier must not be null");
this.value = value;
}

View File

@@ -44,8 +44,8 @@ public abstract class RelationalDeleteEvent<E> extends AbstractRelationalEvent<E
super(id);
Assert.notNull(id, "Id must not be null.");
Assert.notNull(change, "Change must not be null.");
Assert.notNull(id, "Id must not be null");
Assert.notNull(change, "Change must not be null");
this.id = id;
this.entity = entity;

View File

@@ -150,7 +150,7 @@ public class Criteria implements CriteriaDefinition {
*/
public static CriteriaStep where(String column) {
Assert.hasText(column, "Column name must not be null or empty!");
Assert.hasText(column, "Column name must not be null or empty");
return new DefaultCriteriaStep(SqlIdentifier.unquoted(column));
}
@@ -163,7 +163,7 @@ public class Criteria implements CriteriaDefinition {
*/
public CriteriaStep and(String column) {
Assert.hasText(column, "Column name must not be null or empty!");
Assert.hasText(column, "Column name must not be null or empty");
SqlIdentifier identifier = SqlIdentifier.unquoted(column);
return new DefaultCriteriaStep(identifier) {
@@ -183,7 +183,7 @@ public class Criteria implements CriteriaDefinition {
*/
public Criteria and(CriteriaDefinition criteria) {
Assert.notNull(criteria, "Criteria must not be null!");
Assert.notNull(criteria, "Criteria must not be null");
return and(Collections.singletonList(criteria));
}
@@ -197,7 +197,7 @@ public class Criteria implements CriteriaDefinition {
@SuppressWarnings("unchecked")
public Criteria and(List<? extends CriteriaDefinition> criteria) {
Assert.notNull(criteria, "Criteria must not be null!");
Assert.notNull(criteria, "Criteria must not be null");
return new Criteria(Criteria.this, Combinator.AND, (List<CriteriaDefinition>) criteria);
}
@@ -210,7 +210,7 @@ public class Criteria implements CriteriaDefinition {
*/
public CriteriaStep or(String column) {
Assert.hasText(column, "Column name must not be null or empty!");
Assert.hasText(column, "Column name must not be null or empty");
SqlIdentifier identifier = SqlIdentifier.unquoted(column);
return new DefaultCriteriaStep(identifier) {
@@ -230,7 +230,7 @@ public class Criteria implements CriteriaDefinition {
*/
public Criteria or(CriteriaDefinition criteria) {
Assert.notNull(criteria, "Criteria must not be null!");
Assert.notNull(criteria, "Criteria must not be null");
return or(Collections.singletonList(criteria));
}
@@ -245,7 +245,7 @@ public class Criteria implements CriteriaDefinition {
@SuppressWarnings("unchecked")
public Criteria or(List<? extends CriteriaDefinition> criteria) {
Assert.notNull(criteria, "Criteria must not be null!");
Assert.notNull(criteria, "Criteria must not be null");
return new Criteria(Criteria.this, Combinator.OR, (List<CriteriaDefinition>) criteria);
}
@@ -646,7 +646,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria is(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.EQ, value);
}
@@ -654,7 +654,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria not(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.NEQ, value);
}
@@ -662,8 +662,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria in(Object... values) {
Assert.notNull(values, "Values must not be null!");
Assert.noNullElements(values, "Values must not contain a null value!");
Assert.notNull(values, "Values must not be null");
Assert.noNullElements(values, "Values must not contain a null value");
if (values.length > 1 && values[1] instanceof Collection) {
throw new InvalidDataAccessApiUsageException(
@@ -676,8 +676,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria in(Collection<?> values) {
Assert.notNull(values, "Values must not be null!");
Assert.noNullElements(values.toArray(), "Values must not contain a null value!");
Assert.notNull(values, "Values must not be null");
Assert.noNullElements(values.toArray(), "Values must not contain a null value");
return createCriteria(Comparator.IN, values);
}
@@ -685,8 +685,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria notIn(Object... values) {
Assert.notNull(values, "Values must not be null!");
Assert.noNullElements(values, "Values must not contain a null value!");
Assert.notNull(values, "Values must not be null");
Assert.noNullElements(values, "Values must not contain a null value");
if (values.length > 1 && values[1] instanceof Collection) {
throw new InvalidDataAccessApiUsageException(
@@ -699,8 +699,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria notIn(Collection<?> values) {
Assert.notNull(values, "Values must not be null!");
Assert.noNullElements(values.toArray(), "Values must not contain a null value!");
Assert.notNull(values, "Values must not be null");
Assert.noNullElements(values.toArray(), "Values must not contain a null value");
return createCriteria(Comparator.NOT_IN, values);
}
@@ -708,8 +708,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria between(Object begin, Object end) {
Assert.notNull(begin, "Begin value must not be null!");
Assert.notNull(end, "End value must not be null!");
Assert.notNull(begin, "Begin value must not be null");
Assert.notNull(end, "End value must not be null");
return createCriteria(Comparator.BETWEEN, Pair.of(begin, end));
}
@@ -717,8 +717,8 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria notBetween(Object begin, Object end) {
Assert.notNull(begin, "Begin value must not be null!");
Assert.notNull(end, "End value must not be null!");
Assert.notNull(begin, "Begin value must not be null");
Assert.notNull(end, "End value must not be null");
return createCriteria(Comparator.NOT_BETWEEN, Pair.of(begin, end));
}
@@ -726,7 +726,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria lessThan(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.LT, value);
}
@@ -734,7 +734,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria lessThanOrEquals(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.LTE, value);
}
@@ -742,7 +742,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria greaterThan(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.GT, value);
}
@@ -750,7 +750,7 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria greaterThanOrEquals(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.GTE, value);
}
@@ -758,14 +758,14 @@ public class Criteria implements CriteriaDefinition {
@Override
public Criteria like(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.LIKE, value);
}
@Override
public Criteria notLike(Object value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
return createCriteria(Comparator.NOT_LIKE, value);
}

View File

@@ -189,7 +189,7 @@ public class Query {
*/
public Query sort(Sort sort) {
Assert.notNull(sort, "Sort must not be null!");
Assert.notNull(sort, "Sort must not be null");
if (sort.isUnsorted()) {
return this;

View File

@@ -35,7 +35,7 @@ abstract class AbstractSegment implements Segment {
@Override
public void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);
for (Segment child : children) {

View File

@@ -45,8 +45,8 @@ public class AssignValue extends AbstractSegment implements Assignment {
*/
public static AssignValue create(Column target, Expression value) {
Assert.notNull(target, "Target column must not be null!");
Assert.notNull(value, "Value must not be null!");
Assert.notNull(target, "Target column must not be null");
Assert.notNull(value, "Value must not be null");
return new AssignValue(target, value);
}

View File

@@ -54,9 +54,9 @@ public class Between extends AbstractSegment implements Condition {
*/
public static Between create(Expression columnOrExpression, Expression begin, Expression end) {
Assert.notNull(columnOrExpression, "Column or expression must not be null!");
Assert.notNull(begin, "Begin value must not be null!");
Assert.notNull(end, "end value must not be null!");
Assert.notNull(columnOrExpression, "Column or expression must not be null");
Assert.notNull(begin, "Begin value must not be null");
Assert.notNull(end, "end value must not be null");
return new Between(columnOrExpression, begin, end, false);
}

View File

@@ -32,7 +32,7 @@ public class Cast extends AbstractSegment implements Expression {
super(expression);
Assert.notNull(targetType, "Cast target must not be null!");
Assert.notNull(targetType, "Cast target must not be null");
this.expression = expression;
this.targetType = targetType;

View File

@@ -53,9 +53,9 @@ public class Comparison extends AbstractSegment implements Condition {
public static Comparison create(Expression leftColumnOrExpression, String comparator,
Expression rightColumnOrExpression) {
Assert.notNull(leftColumnOrExpression, "Left expression must not be null!");
Assert.notNull(comparator, "Comparator must not be null!");
Assert.notNull(rightColumnOrExpression, "Right expression must not be null!");
Assert.notNull(leftColumnOrExpression, "Left expression must not be null");
Assert.notNull(comparator, "Comparator must not be null");
Assert.notNull(rightColumnOrExpression, "Right expression must not be null");
return new Comparison(leftColumnOrExpression, comparator, rightColumnOrExpression);
}
@@ -73,9 +73,9 @@ public class Comparison extends AbstractSegment implements Condition {
*/
public static Comparison create(String unqualifiedColumnName, String comparator, Object rightValue) {
Assert.notNull(unqualifiedColumnName, "UnqualifiedColumnName must not be null.");
Assert.notNull(comparator, "Comparator must not be null.");
Assert.notNull(rightValue, "RightValue must not be null.");
Assert.notNull(unqualifiedColumnName, "UnqualifiedColumnName must not be null");
Assert.notNull(comparator, "Comparator must not be null");
Assert.notNull(rightValue, "RightValue must not be null");
return new Comparison(Expressions.just(unqualifiedColumnName), comparator, SQL.literalOf(rightValue));
}

View File

@@ -38,7 +38,7 @@ class DefaultDelete implements Delete {
@Override
public void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);

View File

@@ -32,7 +32,7 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
@Override
public DeleteWhere from(Table table) {
Assert.notNull(table, "Table must not be null!");
Assert.notNull(table, "Table must not be null");
this.from = table;
return this;
@@ -41,7 +41,7 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
@Override
public DeleteWhereAndOr where(Condition condition) {
Assert.notNull(condition, "Where Condition must not be null!");
Assert.notNull(condition, "Where Condition must not be null");
this.where = condition;
return this;
}
@@ -49,7 +49,7 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
@Override
public DeleteWhereAndOr and(Condition condition) {
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(condition, "Condition must not be null");
this.where = this.where.and(condition);
return this;
}
@@ -57,7 +57,7 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
@Override
public DeleteWhereAndOr or(Condition condition) {
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(condition, "Condition must not be null");
this.where = this.where.or(condition);
return this;
}

View File

@@ -43,7 +43,7 @@ class DefaultInsert implements Insert {
@Override
public void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);

View File

@@ -39,7 +39,7 @@ class DefaultInsertBuilder
@Override
public InsertIntoColumnsAndValuesWithBuild into(Table table) {
Assert.notNull(table, "Insert Into Table must not be null!");
Assert.notNull(table, "Insert Into Table must not be null");
this.into = table;
return this;
@@ -48,7 +48,7 @@ class DefaultInsertBuilder
@Override
public InsertIntoColumnsAndValuesWithBuild column(Column column) {
Assert.notNull(column, "Column must not be null!");
Assert.notNull(column, "Column must not be null");
this.columns.add(column);
@@ -58,7 +58,7 @@ class DefaultInsertBuilder
@Override
public InsertIntoColumnsAndValuesWithBuild columns(Column... columns) {
Assert.notNull(columns, "Columns must not be null!");
Assert.notNull(columns, "Columns must not be null");
return columns(Arrays.asList(columns));
}
@@ -66,7 +66,7 @@ class DefaultInsertBuilder
@Override
public InsertIntoColumnsAndValuesWithBuild columns(Collection<Column> columns) {
Assert.notNull(columns, "Columns must not be null!");
Assert.notNull(columns, "Columns must not be null");
this.columns.addAll(columns);
@@ -76,7 +76,7 @@ class DefaultInsertBuilder
@Override
public InsertValuesWithBuild value(Expression value) {
Assert.notNull(value, "Value must not be null!");
Assert.notNull(value, "Value must not be null");
this.values.add(value);
@@ -86,7 +86,7 @@ class DefaultInsertBuilder
@Override
public InsertValuesWithBuild values(Expression... values) {
Assert.notNull(values, "Values must not be null!");
Assert.notNull(values, "Values must not be null");
return values(Arrays.asList(values));
}
@@ -94,7 +94,7 @@ class DefaultInsertBuilder
@Override
public InsertValuesWithBuild values(Collection<? extends Expression> values) {
Assert.notNull(values, "Values must not be null!");
Assert.notNull(values, "Values must not be null");
this.values.addAll(values);

View File

@@ -90,7 +90,7 @@ class DefaultSelect implements Select {
@Override
public void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);

View File

@@ -43,7 +43,7 @@ class DefaultUpdate implements Update {
@Override
public void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);

View File

@@ -41,7 +41,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateAssign table(Table table) {
Assert.notNull(table, "Table must not be null!");
Assert.notNull(table, "Table must not be null");
this.table = table;
@@ -51,7 +51,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public DefaultUpdateBuilder set(Assignment assignment) {
Assert.notNull(assignment, "Assignment must not be null!");
Assert.notNull(assignment, "Assignment must not be null");
this.assignments.add(assignment);
@@ -61,7 +61,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateWhere set(Assignment... assignments) {
Assert.notNull(assignments, "Assignment must not be null!");
Assert.notNull(assignments, "Assignment must not be null");
return set(Arrays.asList(assignments));
}
@@ -69,7 +69,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateWhere set(Collection<? extends Assignment> assignments) {
Assert.notNull(assignments, "Assignment must not be null!");
Assert.notNull(assignments, "Assignment must not be null");
this.assignments.addAll(assignments);
@@ -79,7 +79,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateWhereAndOr where(Condition condition) {
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(condition, "Condition must not be null");
this.where = condition;
@@ -89,7 +89,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateWhereAndOr and(Condition condition) {
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(condition, "Condition must not be null");
this.where = this.where.and(condition);
@@ -99,7 +99,7 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
@Override
public UpdateWhereAndOr or(Condition condition) {
Assert.notNull(condition, "Condition must not be null!");
Assert.notNull(condition, "Condition must not be null");
this.where = this.where.and(condition);

View File

@@ -42,7 +42,7 @@ public class Functions {
*/
public static SimpleFunction count(Expression... columns) {
Assert.notNull(columns, "Columns must not be null!");
Assert.notNull(columns, "Columns must not be null");
Assert.notEmpty(columns, "Columns must contains at least one column");
return SimpleFunction.create("COUNT", Arrays.asList(columns));
@@ -56,7 +56,7 @@ public class Functions {
*/
public static SimpleFunction count(Collection<? extends Expression> columns) {
Assert.notNull(columns, "Columns must not be null!");
Assert.notNull(columns, "Columns must not be null");
return SimpleFunction.create("COUNT", new ArrayList<>(columns));
}
@@ -70,7 +70,7 @@ public class Functions {
*/
public static SimpleFunction upper(Expression expression) {
Assert.notNull(expression, "Expression must not be null!");
Assert.notNull(expression, "Expression must not be null");
return SimpleFunction.create("UPPER", Collections.singletonList(expression));
}
@@ -84,7 +84,7 @@ public class Functions {
*/
public static SimpleFunction lower(Expression expression) {
Assert.notNull(expression, "Columns must not be null!");
Assert.notNull(expression, "Columns must not be null");
return SimpleFunction.create("LOWER", Collections.singletonList(expression));
}

View File

@@ -51,8 +51,8 @@ public class InlineQuery extends AbstractSegment implements TableLike {
*/
public static InlineQuery create(Select select, SqlIdentifier alias) {
Assert.notNull(select, "Select must not be null!");
Assert.notNull(alias, "Alias must not be null or empty!");
Assert.notNull(select, "Select must not be null");
Assert.notNull(alias, "Alias must not be null or empty");
return new InlineQuery(select, alias);
}

View File

@@ -50,8 +50,8 @@ public class Like extends AbstractSegment implements Condition {
*/
public static Like create(Expression leftColumnOrExpression, Expression rightColumnOrExpression) {
Assert.notNull(leftColumnOrExpression, "Left expression must not be null!");
Assert.notNull(rightColumnOrExpression, "Right expression must not be null!");
Assert.notNull(leftColumnOrExpression, "Left expression must not be null");
Assert.notNull(rightColumnOrExpression, "Right expression must not be null");
return new Like(leftColumnOrExpression, rightColumnOrExpression, false);
}

View File

@@ -74,7 +74,7 @@ public abstract class SQL {
*/
public static BindMarker bindMarker(String name) {
Assert.hasText(name, "Name must not be null or empty!");
Assert.hasText(name, "Name must not be null or empty");
return new NamedBindMarker(name);
}

View File

@@ -75,8 +75,8 @@ public class Table extends AbstractSegment implements TableLike {
*/
public static Table aliased(String name, String alias) {
Assert.hasText(name, "Name must not be null or empty!");
Assert.hasText(alias, "Alias must not be null or empty!");
Assert.hasText(name, "Name must not be null or empty");
Assert.hasText(alias, "Alias must not be null or empty");
return new AliasedTable(name, alias);
}
@@ -89,7 +89,7 @@ public class Table extends AbstractSegment implements TableLike {
*/
public Table as(String alias) {
Assert.hasText(alias, "Alias must not be null or empty!");
Assert.hasText(alias, "Alias must not be null or empty");
return new AliasedTable(name, SqlIdentifier.unquoted(alias));
}

View File

@@ -40,7 +40,7 @@ public interface TableLike extends Segment {
*/
default Column column(String name) {
Assert.hasText(name, "Name must not be null or empty!");
Assert.hasText(name, "Name must not be null or empty");
return new Column(name, this);
}

View File

@@ -33,7 +33,7 @@ public interface Visitable {
*/
default void visit(Visitor visitor) {
Assert.notNull(visitor, "Visitor must not be null!");
Assert.notNull(visitor, "Visitor must not be null");
visitor.enter(this);
visitor.leave(this);

View File

@@ -58,8 +58,8 @@ class CastVisitor extends TypedSubtreeVisitor<Cast> implements PartRenderer {
@Override
Delegation leaveNested(Visitable segment) {
Assert.state(joiner != null, "Joiner must not be null.");
Assert.state(expressionVisitor != null, "ExpressionVisitor must not be null.");
Assert.state(joiner != null, "Joiner must not be null");
Assert.state(expressionVisitor != null, "ExpressionVisitor must not be null");
joiner.add(expressionVisitor.getRenderedPart());
return super.leaveNested(segment);
@@ -69,7 +69,7 @@ class CastVisitor extends TypedSubtreeVisitor<Cast> implements PartRenderer {
public CharSequence getRenderedPart() {
if (joiner == null) {
throw new IllegalStateException("Joiner must not be null.");
throw new IllegalStateException("Joiner must not be null");
}
return joiner.toString();

View File

@@ -71,7 +71,7 @@ abstract class DelegatingVisitor implements Visitor {
Delegation visitor = doEnter(segment);
Assert.notNull(visitor,
() -> String.format("Visitor must not be null. Caused by %s.doEnter(…)", getClass().getName()));
() -> String.format("Visitor must not be null Caused by %s.doEnter(…)", getClass().getName()));
Assert.state(!visitor.isLeave(),
() -> String.format("Delegation indicates leave. Caused by %s.doEnter(…)", getClass().getName()));
@@ -112,7 +112,7 @@ abstract class DelegatingVisitor implements Visitor {
Delegation result = visitor.doLeave0(segment);
Assert.notNull(visitor,
() -> String.format("Visitor must not be null. Caused by %s.doLeave(…)", getClass().getName()));
() -> String.format("Visitor must not be null Caused by %s.doLeave(…)", getClass().getName()));
if (visitor == this) {
if (result.isLeave()) {

View File

@@ -85,7 +85,7 @@ abstract class FilteredSingleConditionRenderSupport extends FilteredSubtreeVisit
*/
protected CharSequence consumeRenderedPart() {
Assert.state(hasDelegatedRendering(), "Rendering not delegated. Cannot consume delegated rendering part.");
Assert.state(hasDelegatedRendering(), "Rendering not delegated; Cannot consume delegated rendering part");
PartRenderer current = this.current;
this.current = null;

View File

@@ -62,7 +62,7 @@ class FromTableVisitor extends TypedSubtreeVisitor<TableLike> {
@Override
Delegation leaveMatched(TableLike segment) {
Assert.state(builder != null, "Builder must not be null in leaveMatched.");
Assert.state(builder != null, "Builder must not be null in leaveMatched");
if (delegate != null) {

View File

@@ -44,7 +44,7 @@ class InsertStatementVisitor extends DelegatingVisitor implements PartRenderer {
InsertStatementVisitor(RenderContext renderContext) {
Assert.notNull(renderContext, "renderContext must not be null!");
Assert.notNull(renderContext, "renderContext must not be null");
this.renderContext = renderContext;
this.intoClauseVisitor = createIntoClauseVisitor(renderContext);

View File

@@ -87,7 +87,7 @@ public interface RenderNamingStrategy {
*/
default RenderNamingStrategy map(Function<String, String> mappingFunction) {
Assert.notNull(mappingFunction, "Mapping function must not be null!");
Assert.notNull(mappingFunction, "Mapping function must not be null");
return new DelegatingRenderNamingStrategy(this, mappingFunction);
}

View File

@@ -44,9 +44,9 @@ class SegmentListVisitor extends TypedSubtreeVisitor<SegmentList<?>> implements
*/
SegmentListVisitor(String start, String separator, DelegatingVisitor nestedVisitor) {
Assert.notNull(start, "Start must not be null.");
Assert.notNull(separator, "Separator must not be null.");
Assert.notNull(nestedVisitor, "Nested Visitor must not be null.");
Assert.notNull(start, "Start must not be null");
Assert.notNull(separator, "Separator must not be null");
Assert.notNull(nestedVisitor, "Nested Visitor must not be null");
Assert.isInstanceOf(PartRenderer.class, nestedVisitor, "Nested visitor must implement PartRenderer");
this.start = start;

View File

@@ -35,7 +35,7 @@ public class SqlRenderer implements Renderer {
private SqlRenderer(RenderContext context) {
Assert.notNull(context, "RenderContext must not be null!");
Assert.notNull(context, "RenderContext must not be null");
this.context = context;
}

View File

@@ -73,7 +73,7 @@ abstract class TypedSingleConditionRenderSupport<T extends Visitable> extends Ty
*/
protected CharSequence consumeRenderedPart() {
Assert.state(hasDelegatedRendering(), "Rendering not delegated. Cannot consume delegated rendering part.");
Assert.state(hasDelegatedRendering(), "Rendering not delegated; Cannot consume delegated rendering part");
PartRenderer current = this.current;
this.current = null;

View File

@@ -42,7 +42,7 @@ class CriteriaFactory {
* @param parameterMetadataProvider parameter metadata provider (must not be {@literal null})
*/
public CriteriaFactory(ParameterMetadataProvider parameterMetadataProvider) {
Assert.notNull(parameterMetadataProvider, "Parameter metadata provider must not be null!");
Assert.notNull(parameterMetadataProvider, "Parameter metadata provider must not be null");
this.parameterMetadataProvider = parameterMetadataProvider;
}

View File

@@ -61,7 +61,7 @@ class ParameterMetadataProvider implements Iterable<ParameterMetadata> {
private ParameterMetadataProvider(Parameters<?, ?> parameters,
@Nullable Iterator<Object> bindableParameterValueIterator) {
Assert.notNull(parameters, "Parameters must not be null!");
Assert.notNull(parameters, "Parameters must not be null");
this.bindableParameterIterator = parameters.getBindableParameters().iterator();
this.bindableParameterValueIterator = bindableParameterValueIterator;
@@ -120,7 +120,7 @@ class ParameterMetadataProvider implements Iterable<ParameterMetadata> {
if (parameterValue == null && !Part.Type.SIMPLE_PROPERTY.equals(partType)) {
throw new IllegalArgumentException(
String.format("Value of parameter with name %s must not be null!", parameterName));
String.format("Value of parameter with name %s must not be null", parameterName));
}
}

View File

@@ -50,7 +50,7 @@ public class RelationalExampleMapper {
/**
* Use the {@link Example} to extract a {@link Query}.
*
*
* @param example
* @return query
*/
@@ -61,15 +61,15 @@ public class RelationalExampleMapper {
/**
* Transform each property of the {@link Example}'s probe into a {@link Criteria} and assemble them into a
* {@link Query}.
*
*
* @param example
* @param entity
* @return query
*/
private <T> Query getMappedExample(Example<T> example, RelationalPersistentEntity<?> entity) {
Assert.notNull(example, "Example must not be null!");
Assert.notNull(entity, "RelationalPersistentEntity must not be null!");
Assert.notNull(example, "Example must not be null");
Assert.notNull(entity, "RelationalPersistentEntity must not be null");
PersistentPropertyAccessor<T> propertyAccessor = entity.getPropertyAccessor(example.getProbe());
ExampleMatcherAccessor matcherAccessor = new ExampleMatcherAccessor(example.getMatcher());
@@ -119,7 +119,7 @@ public class RelationalExampleMapper {
: Criteria.where(column).like("%" + convPropValue + "%").ignoreCase(ignoreCase));
break;
default:
throw new IllegalStateException(example.getMatcher().getDefaultStringMatcher() + " is not supported!");
throw new IllegalStateException(example.getMatcher().getDefaultStringMatcher() + " is not supported");
}
});

View File

@@ -38,8 +38,8 @@ public class SimpleRelationalEntityMetadata<T> implements RelationalEntityMetada
*/
public SimpleRelationalEntityMetadata(Class<T> type, RelationalPersistentEntity<?> tableEntity) {
Assert.notNull(type, "Type must not be null!");
Assert.notNull(tableEntity, "Table entity must not be null!");
Assert.notNull(type, "Type must not be null");
Assert.notNull(tableEntity, "Table entity must not be null");
this.type = type;
this.tableEntity = tableEntity;

Some files were not shown because too many files have changed in this diff Show More