From 483b30e8c2b1fb2174b09c830ed490f483e19da9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 8 Jun 2022 11:58:32 -0700 Subject: [PATCH] Remove punctuation in Exception messages. Closes #1259. --- .../JdbcAggregateChangeExecutionContext.java | 16 ++--- .../data/jdbc/core/JdbcAggregateTemplate.java | 64 +++++++++---------- .../jdbc/core/convert/BasicJdbcConverter.java | 4 +- .../convert/DefaultDataAccessStrategy.java | 12 ++-- .../core/convert/DefaultJdbcTypeFactory.java | 2 +- .../IdGeneratingBatchInsertStrategy.java | 2 +- .../data/jdbc/core/convert/Identifier.java | 14 ++-- .../IterableOfEntryToMapConverter.java | 4 +- .../jdbc/core/convert/ResultSetAccessor.java | 2 +- .../data/jdbc/core/convert/SqlGenerator.java | 10 +-- .../jdbc/core/convert/SqlGeneratorSource.java | 6 +- .../core/convert/SqlParametersFactory.java | 6 +- .../jdbc/core/mapping/AggregateReference.java | 2 +- .../jdbc/core/mapping/JdbcMappingContext.java | 2 +- .../mybatis/MyBatisDataAccessStrategy.java | 4 +- .../config/AbstractJdbcConfiguration.java | 2 +- .../repository/config/DialectResolver.java | 2 +- .../config/JdbcAuditingRegistrar.java | 2 +- .../repository/query/AbstractJdbcQuery.java | 4 +- .../repository/query/JdbcQueryCreator.java | 6 +- .../jdbc/repository/query/QueryMapper.java | 16 ++--- .../query/StringBasedJdbcQuery.java | 10 +-- .../support/JdbcQueryLookupStrategy.java | 10 +-- .../support/JdbcRepositoryFactory.java | 12 ++-- .../support/JdbcRepositoryFactoryBean.java | 10 +-- .../support/SimpleJdbcRepository.java | 4 +- .../data/jdbc/support/JdbcUtil.java | 4 +- ...JdbcAggregateTemplateIntegrationTests.java | 2 +- .../CascadingDataAccessStrategyUnitTests.java | 2 +- .../data/jdbc/testing/TestUtils.java | 4 +- .../config/AbstractR2dbcConfiguration.java | 10 +-- .../r2dbc/config/R2dbcAuditingRegistrar.java | 6 +- .../r2dbc/convert/MappingR2dbcConverter.java | 10 +-- .../DefaultReactiveDataAccessStrategy.java | 2 +- .../r2dbc/core/DefaultStatementMapper.java | 2 +- .../r2dbc/core/MapBindParameterSource.java | 8 +-- .../data/r2dbc/core/NamedParameterUtils.java | 2 +- .../data/r2dbc/core/R2dbcEntityTemplate.java | 8 +-- .../core/ReactiveDataAccessStrategy.java | 2 +- .../data/r2dbc/dialect/DialectResolver.java | 2 +- .../event/ReactiveAuditingEntityCallback.java | 2 +- .../data/r2dbc/query/BoundAssignments.java | 4 +- .../data/r2dbc/query/BoundCondition.java | 4 +- .../data/r2dbc/query/QueryMapper.java | 20 +++--- .../data/r2dbc/query/UpdateMapper.java | 6 +- .../repository/query/AbstractR2dbcQuery.java | 6 +- .../repository/query/PartTreeR2dbcQuery.java | 2 +- .../query/PreparedOperationBindableQuery.java | 2 +- .../repository/query/R2dbcQueryMethod.java | 10 +-- .../support/R2dbcRepositoryFactory.java | 6 +- .../support/R2dbcRepositoryFactoryBean.java | 4 +- .../support/ReactiveFluentQuerySupport.java | 6 +- .../ReactivePageableExecutionUtils.java | 6 +- .../support/SimpleR2dbcRepository.java | 46 ++++++------- ...SimpleR2dbcRepositoryIntegrationTests.java | 2 +- .../conversion/BasicRelationalConverter.java | 6 +- .../DefaultRootAggregateChange.java | 6 +- .../conversion/DeleteAggregateChange.java | 4 +- .../core/dialect/RenderContextFactory.java | 2 +- .../BasicRelationalPersistentProperty.java | 2 +- .../core/mapping/CachingNamingStrategy.java | 2 +- .../core/mapping/NamingStrategy.java | 8 +-- .../PersistentPropertyPathExtension.java | 10 +-- .../mapping/RelationalMappingContext.java | 2 +- .../core/mapping/event/Identifier.java | 2 +- .../mapping/event/RelationalDeleteEvent.java | 4 +- .../data/relational/core/query/Criteria.java | 54 ++++++++-------- .../data/relational/core/query/Query.java | 2 +- .../relational/core/sql/AbstractSegment.java | 2 +- .../data/relational/core/sql/AssignValue.java | 4 +- .../data/relational/core/sql/Between.java | 6 +- .../data/relational/core/sql/Cast.java | 2 +- .../data/relational/core/sql/Comparison.java | 12 ++-- .../relational/core/sql/DefaultDelete.java | 2 +- .../core/sql/DefaultDeleteBuilder.java | 8 +-- .../relational/core/sql/DefaultInsert.java | 2 +- .../core/sql/DefaultInsertBuilder.java | 14 ++-- .../relational/core/sql/DefaultSelect.java | 2 +- .../relational/core/sql/DefaultUpdate.java | 2 +- .../core/sql/DefaultUpdateBuilder.java | 14 ++-- .../data/relational/core/sql/Functions.java | 8 +-- .../data/relational/core/sql/InlineQuery.java | 4 +- .../data/relational/core/sql/Like.java | 4 +- .../data/relational/core/sql/SQL.java | 2 +- .../data/relational/core/sql/Table.java | 6 +- .../data/relational/core/sql/TableLike.java | 2 +- .../data/relational/core/sql/Visitable.java | 2 +- .../core/sql/render/CastVisitor.java | 6 +- .../core/sql/render/DelegatingVisitor.java | 4 +- .../FilteredSingleConditionRenderSupport.java | 2 +- .../core/sql/render/FromTableVisitor.java | 2 +- .../sql/render/InsertStatementVisitor.java | 2 +- .../core/sql/render/RenderNamingStrategy.java | 2 +- .../core/sql/render/SegmentListVisitor.java | 6 +- .../core/sql/render/SqlRenderer.java | 2 +- .../TypedSingleConditionRenderSupport.java | 2 +- .../repository/query/CriteriaFactory.java | 2 +- .../query/ParameterMetadataProvider.java | 4 +- .../query/RelationalExampleMapper.java | 10 +-- .../query/SimpleRelationalEntityMetadata.java | 4 +- .../DeleteBatchingAggregateChangeTest.java | 2 +- .../SaveBatchingAggregateChangeTest.java | 4 +- .../query/RelationalExampleMapperTests.java | 2 +- 103 files changed, 338 insertions(+), 338 deletions(-) diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutionContext.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutionContext.java index aa9d7fc3..0b5f8ea3 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutionContext.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutionContext.java @@ -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 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 RelationalPersistentEntity getRequiredPersistentEntity(Class type) { @@ -331,7 +331,7 @@ class JdbcAggregateChangeExecutionContext { private void updateWithVersion(DbAction.UpdateRoot 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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateTemplate.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateTemplate.java index fc0494e4..aa661334 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateTemplate.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/JdbcAggregateTemplate.java @@ -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 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 Iterable saveAll(Iterable 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 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 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 findById(Object id, Class 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 boolean existsById(Object id, Class 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 Iterable findAll(Class domainType, Sort sort) { - Assert.notNull(domainType, "Domain type must not be null!"); + Assert.notNull(domainType, "Domain type must not be null"); Iterable all = accessStrategy.findAll(domainType, sort); return triggerAfterConvert(all); @@ -230,7 +230,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations { @Override public Page findAll(Class domainType, Pageable pageable) { - Assert.notNull(domainType, "Domain type must not be null!"); + Assert.notNull(domainType, "Domain type must not be null"); Iterable items = triggerAfterConvert(accessStrategy.findAll(domainType, pageable)); List content = StreamSupport.stream(items.spliterator(), false).collect(Collectors.toList()); @@ -241,7 +241,7 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations { @Override public Iterable findAll(Class domainType) { - Assert.notNull(domainType, "Domain type must not be null!"); + Assert.notNull(domainType, "Domain type must not be null"); Iterable all = accessStrategy.findAll(domainType); return triggerAfterConvert(all); @@ -250,8 +250,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations { @Override public Iterable findAllById(Iterable ids, Class 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 allById = accessStrategy.findAllById(ids, domainType); return triggerAfterConvert(allById); @@ -260,8 +260,8 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations { @Override public void delete(S aggregateRoot, Class 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 void deleteById(Object id, Class 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 void deleteAllById(Iterable ids, Class domainType) { - Assert.isTrue(ids.iterator().hasNext(), "Ids must not be empty!"); + Assert.isTrue(ids.iterator().hasNext(), "Ids must not be empty"); BatchingAggregateChange> 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 void deleteAll(Iterable instances, Class domainType) { - Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty!"); + Assert.isTrue(instances.iterator().hasNext(), "Aggregate instances must not be empty"); BatchingAggregateChange> 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 RootAggregateChange beforeExecute(T aggregateRoot, Function> 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 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()); } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BasicJdbcConverter.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BasicJdbcConverter.java index 720aa5e4..f6723566 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BasicJdbcConverter.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/BasicJdbcConverter.java @@ -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 entity = (RelationalPersistentEntity) 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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java index 605352e2..37fad605 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategy.java @@ -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 void deleteWithVersion(Object id, Class domainType, Number previousVersion) { - Assert.notNull(id, "Id must not be null."); + Assert.notNull(id, "Id must not be null"); RelationalPersistentEntity 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 findAllByPath(Identifier identifier, PersistentPropertyPath 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); diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultJdbcTypeFactory.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultJdbcTypeFactory.java index 05aa2749..f846da0a 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultJdbcTypeFactory.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/DefaultJdbcTypeFactory.java @@ -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()); diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IdGeneratingBatchInsertStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IdGeneratingBatchInsertStrategy.java index 8ad85968..5c67a45f 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IdGeneratingBatchInsertStrategy.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IdGeneratingBatchInsertStrategy.java @@ -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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/Identifier.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/Identifier.java index d3c190e9..010b5b36 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/Identifier.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/Identifier.java @@ -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 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 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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IterableOfEntryToMapConverter.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IterableOfEntryToMapConverter.java index 9c7da238..aace274c 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IterableOfEntryToMapConverter.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/IterableOfEntryToMapConverter.java @@ -63,8 +63,8 @@ class IterableOfEntryToMapConverter implements ConditionalConverter, Converter 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); } } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGenerator.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGenerator.java index ba03abd2..0ed67139 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGenerator.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGenerator.java @@ -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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGeneratorSource.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGeneratorSource.java index 99411059..3d27d24f 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGeneratorSource.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlGeneratorSource.java @@ -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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlParametersFactory.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlParametersFactory.java index d2a10e8c..b7f247f7 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlParametersFactory.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/convert/SqlParametersFactory.java @@ -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 diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/AggregateReference.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/AggregateReference.java index de990438..b7d459ab 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/AggregateReference.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/AggregateReference.java @@ -54,7 +54,7 @@ public interface AggregateReference { public IdOnlyAggregateReference(ID id) { - Assert.notNull(id, "Id must not be null."); + Assert.notNull(id, "Id must not be null"); this.id = id; } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/JdbcMappingContext.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/JdbcMappingContext.java index 9ff5321a..68976683 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/JdbcMappingContext.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/JdbcMappingContext.java @@ -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}. diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java index 53ecb788..e5473128 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/mybatis/MyBatisDataAccessStrategy.java @@ -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(); } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/AbstractJdbcConfiguration.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/AbstractJdbcConfiguration.java index dde95fc1..8b0419b3 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/AbstractJdbcConfiguration.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/AbstractJdbcConfiguration.java @@ -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(); } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/DialectResolver.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/DialectResolver.java index ef3e2725..02450c4c 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/DialectResolver.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/DialectResolver.java @@ -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))); } /** diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/JdbcAuditingRegistrar.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/JdbcAuditingRegistrar.java index 340e7233..deb536ad 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/JdbcAuditingRegistrar.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/JdbcAuditingRegistrar.java @@ -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)); diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/AbstractJdbcQuery.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/AbstractJdbcQuery.java index 129a6ebe..4b24785d 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/AbstractJdbcQuery.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/AbstractJdbcQuery.java @@ -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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryCreator.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryCreator.java index 78d82547..971e55ce 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryCreator.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryCreator.java @@ -341,9 +341,9 @@ class JdbcQueryCreator extends RelationalQueryCreator { 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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/QueryMapper.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/QueryMapper.java index 97626cb5..fa403f50 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/QueryMapper.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/QueryMapper.java @@ -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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQuery.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQuery.java index 8211e8ea..a8967820 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQuery.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQuery.java @@ -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, diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java index b9f377d4..ff8d3c94 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java @@ -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)); } } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java index b6bebae2..edd1b927 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java @@ -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; } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactoryBean.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactoryBean.java index f6625fb5..e25a969e 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactoryBean.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactoryBean.java @@ -160,24 +160,24 @@ public class JdbcRepositoryFactoryBean, 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); diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.java index 4809be92..1e477b63 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/SimpleJdbcRepository.java @@ -43,8 +43,8 @@ public class SimpleJdbcRepository implements CrudRepository, Paging public SimpleJdbcRepository(JdbcAggregateOperations entityOperations,PersistentEntity 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; diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java index 29d08958..15a81b7e 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/support/JdbcUtil.java @@ -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)) // diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateTemplateIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateTemplateIntegrationTests.java index cfc60e81..16c8b058 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateTemplateIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateTemplateIntegrationTests.java @@ -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; diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/CascadingDataAccessStrategyUnitTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/CascadingDataAccessStrategyUnitTests.java index 7e0599fe..959a825d 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/CascadingDataAccessStrategyUnitTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/CascadingDataAccessStrategyUnitTests.java @@ -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++; diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/TestUtils.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/TestUtils.java index 66ca0978..88b5ba99 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/TestUtils.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/testing/TestUtils.java @@ -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()); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/AbstractR2dbcConfiguration.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/AbstractR2dbcConfiguration.java index 5d68ae48..49d32f83 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/AbstractR2dbcConfiguration.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/AbstractR2dbcConfiguration.java @@ -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, 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); } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/R2dbcAuditingRegistrar.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/R2dbcAuditingRegistrar.java index 1420ae44..73ae3474 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/R2dbcAuditingRegistrar.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/config/R2dbcAuditingRegistrar.java @@ -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); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/convert/MappingR2dbcConverter.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/convert/MappingR2dbcConverter.java index 6b1afec4..559b65b2 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/convert/MappingR2dbcConverter.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/convert/MappingR2dbcConverter.java @@ -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 BiFunction 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); } } } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultReactiveDataAccessStrategy.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultReactiveDataAccessStrategy.java index 82559088..dc36f405 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultReactiveDataAccessStrategy.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultReactiveDataAccessStrategy.java @@ -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(); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultStatementMapper.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultStatementMapper.java index dc474ec8..295c80b5 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultStatementMapper.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/DefaultStatementMapper.java @@ -80,7 +80,7 @@ class DefaultStatementMapper implements StatementMapper { @SuppressWarnings("unchecked") public TypedStatementMapper forType(Class type) { - Assert.notNull(type, "Type must not be null!"); + Assert.notNull(type, "Type must not be null"); return new DefaultTypedStatementMapper<>( (RelationalPersistentEntity) this.mappingContext.getRequiredPersistentEntity(type)); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/MapBindParameterSource.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/MapBindParameterSource.java index 507147c0..820d8c26 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/MapBindParameterSource.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/MapBindParameterSource.java @@ -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) { diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/NamedParameterUtils.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/NamedParameterUtils.java index f275166d..9a1b9ea3 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/NamedParameterUtils.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/NamedParameterUtils.java @@ -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); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityTemplate.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityTemplate.java index 3dcabb3b..788aa118 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityTemplate.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityTemplate.java @@ -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 String formatOptimisticLockingExceptionMessage(T entity, RelationalPersistentEntity 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 String formatTransientEntityExceptionMessage(T entity, RelationalPersistentEntity 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 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); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/ReactiveDataAccessStrategy.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/ReactiveDataAccessStrategy.java index 878c3834..3263a6f5 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/ReactiveDataAccessStrategy.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/core/ReactiveDataAccessStrategy.java @@ -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); } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/DialectResolver.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/DialectResolver.java index 5c900062..beb8880d 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/DialectResolver.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/dialect/DialectResolver.java @@ -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)); }); } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/mapping/event/ReactiveAuditingEntityCallback.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/mapping/event/ReactiveAuditingEntityCallback.java index 7cdeeda7..68ffe849 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/mapping/event/ReactiveAuditingEntityCallback.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/mapping/event/ReactiveAuditingEntityCallback.java @@ -44,7 +44,7 @@ public class ReactiveAuditingEntityCallback implements BeforeConvertCallback auditingHandlerFactory) { - Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null!"); + Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null"); this.auditingHandlerFactory = auditingHandlerFactory; } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundAssignments.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundAssignments.java index 0489efae..c56a295d 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundAssignments.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundAssignments.java @@ -34,8 +34,8 @@ public class BoundAssignments { public BoundAssignments(Bindings bindings, List 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; diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundCondition.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundCondition.java index c94215e8..db519702 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundCondition.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/BoundCondition.java @@ -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; diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java index 908c0d97..188760ed 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/QueryMapper.java @@ -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; diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/UpdateMapper.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/UpdateMapper.java index 2ebc9cf4..d6df24fc 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/UpdateMapper.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/query/UpdateMapper.java @@ -86,9 +86,9 @@ public class UpdateMapper extends QueryMapper { public BoundAssignments getMappedObject(BindMarkers markers, Map 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 result = new ArrayList<>(); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/AbstractR2dbcQuery.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/AbstractR2dbcQuery.java index e4b4cca9..18b1d229 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/AbstractR2dbcQuery.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/AbstractR2dbcQuery.java @@ -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; diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PartTreeR2dbcQuery.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PartTreeR2dbcQuery.java index 18ab4229..2a140291 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PartTreeR2dbcQuery.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PartTreeR2dbcQuery.java @@ -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); } } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java index 90aff364..04d5b32b 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/PreparedOperationBindableQuery.java @@ -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; } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/R2dbcQueryMethod.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/R2dbcQueryMethod.java index 79866a17..b0c09121 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/R2dbcQueryMethod.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/R2dbcQueryMethod.java @@ -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())); } } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java index 7596d535..a8d3d3cb 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java @@ -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(); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactoryBean.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactoryBean.java index d843a5ab..02d69907 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactoryBean.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactoryBean.java @@ -157,9 +157,9 @@ public class R2dbcRepositoryFactoryBean, 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); diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactiveFluentQuerySupport.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactiveFluentQuerySupport.java index ca1c331f..137f8438 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactiveFluentQuerySupport.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactiveFluentQuerySupport.java @@ -50,7 +50,7 @@ abstract class ReactiveFluentQuerySupport implements FluentQuery.ReactiveF @Override public ReactiveFluentQuery 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 implements FluentQuery.ReactiveF @Override public ReactiveFluentQuery as(Class 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 implements FluentQuery.ReactiveF @Override public ReactiveFluentQuery project(Collection 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)); } diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactivePageableExecutionUtils.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactivePageableExecutionUtils.java index ba7f59ef..461c7070 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactivePageableExecutionUtils.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/ReactivePageableExecutionUtils.java @@ -47,9 +47,9 @@ abstract class ReactivePageableExecutionUtils { */ public static Mono> getPage(List content, Pageable pageable, Mono 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) { diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/SimpleR2dbcRepository.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/SimpleR2dbcRepository.java index 21970b7f..2b0a69a5 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/SimpleR2dbcRepository.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/SimpleR2dbcRepository.java @@ -117,7 +117,7 @@ public class SimpleR2dbcRepository implements R2dbcRepository { @Transactional public Mono 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 implements R2dbcRepository { @Transactional public Flux saveAll(Iterable 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 implements R2dbcRepository { @Transactional public Flux saveAll(Publisher 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 implements R2dbcRepository { @Override public Mono 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 implements R2dbcRepository { @Override public Mono 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 implements R2dbcRepository { @Override public Flux findAllById(Iterable 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 implements R2dbcRepository { @Override public Flux findAllById(Publisher 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 implements R2dbcRepository { @Transactional public Mono 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 implements R2dbcRepository { @Transactional public Mono deleteById(Publisher 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 implements R2dbcRepository { @Transactional public Mono 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 implements R2dbcRepository { @Override public Mono deleteAllById(Iterable 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 idsList = Streamable.of(ids).toList(); String idProperty = getIdProperty().getName(); @@ -316,7 +316,7 @@ public class SimpleR2dbcRepository implements R2dbcRepository { @Transactional public Mono deleteAll(Iterable 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 implements R2dbcRepository { @Transactional public Mono deleteAll(Publisher objectPublisher) { - Assert.notNull(objectPublisher, "The Object Publisher must not be null!"); + Assert.notNull(objectPublisher, "The Object Publisher must not be null"); Flux idPublisher = Flux.from(objectPublisher) // .map(this.entity::getRequiredId); @@ -358,7 +358,7 @@ public class SimpleR2dbcRepository implements R2dbcRepository { @Override public Flux 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 implements R2dbcRepository { @Override public Mono findOne(Example 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 implements R2dbcRepository { @Override public Flux findAll(Example 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 implements R2dbcRepository { @Override public Flux findAll(Example 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 implements R2dbcRepository { @Override public Mono count(Example 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 implements R2dbcRepository { @Override public Mono exists(Example 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 implements R2dbcRepository { public > P findBy(Example example, Function, 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 implements R2dbcRepository { @Override public Mono> page(Pageable pageable) { - Assert.notNull(pageable, "Pageable must not be null!"); + Assert.notNull(pageable, "Pageable must not be null"); Mono> items = createQuery(q -> q.with(pageable)).all().collectList(); diff --git a/spring-data-r2dbc/src/test/java/org/springframework/data/r2dbc/repository/support/H2SimpleR2dbcRepositoryIntegrationTests.java b/spring-data-r2dbc/src/test/java/org/springframework/data/r2dbc/repository/support/H2SimpleR2dbcRepositoryIntegrationTests.java index 7254eca2..ca3a27f9 100644 --- a/spring-data-r2dbc/src/test/java/org/springframework/data/r2dbc/repository/support/H2SimpleR2dbcRepositoryIntegrationTests.java +++ b/spring-data-r2dbc/src/test/java/org/springframework/data/r2dbc/repository/support/H2SimpleR2dbcRepositoryIntegrationTests.java @@ -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"); }); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/BasicRelationalConverter.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/BasicRelationalConverter.java index ec73de1a..1d08138c 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/BasicRelationalConverter.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/BasicRelationalConverter.java @@ -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, Object> delegate) { - Assert.notNull(delegate, "Delegate must not be null."); + Assert.notNull(delegate, "Delegate must not be null"); this.delegate = delegate; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DefaultRootAggregateChange.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DefaultRootAggregateChange.java index 93551300..c3d5f087 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DefaultRootAggregateChange.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DefaultRootAggregateChange.java @@ -57,7 +57,7 @@ class DefaultRootAggregateChange implements RootAggregateChange { @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 implements RootAggregateChange { @Override public void forEachAction(Consumer> 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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DeleteAggregateChange.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DeleteAggregateChange.java index 0dd4832d..7c1fd1bf 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DeleteAggregateChange.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/conversion/DeleteAggregateChange.java @@ -53,7 +53,7 @@ public class DeleteAggregateChange implements MutableAggregateChange { @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 implements MutableAggregateChange { @Override public void forEachAction(Consumer> consumer) { - Assert.notNull(consumer, "Consumer must not be null."); + Assert.notNull(consumer, "Consumer must not be null"); actions.forEach(consumer); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/RenderContextFactory.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/RenderContextFactory.java index 24b24458..bffaa647 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/RenderContextFactory.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/dialect/RenderContextFactory.java @@ -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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/BasicRelationalPersistentProperty.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/BasicRelationalPersistentProperty.java index d0d284d6..fd1421f1 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/BasicRelationalPersistentProperty.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/BasicRelationalPersistentProperty.java @@ -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()); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/CachingNamingStrategy.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/CachingNamingStrategy.java index 012745fc..32daeb11 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/CachingNamingStrategy.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/CachingNamingStrategy.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/NamingStrategy.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/NamingStrategy.java index f40b65e0..bf57868d 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/NamingStrategy.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/NamingStrategy.java @@ -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"; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/PersistentPropertyPathExtension.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/PersistentPropertyPathExtension.java index b60ceb20..068f198d 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/PersistentPropertyPathExtension.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/PersistentPropertyPathExtension.java @@ -53,8 +53,8 @@ public class PersistentPropertyPathExtension { MappingContext, ? 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 RelationalPersistentProperty> context, PersistentPropertyPath 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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/RelationalMappingContext.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/RelationalMappingContext.java index 0d68d905..11a43248 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/RelationalMappingContext.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/RelationalMappingContext.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/Identifier.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/Identifier.java index c0a7413a..46e9e80d 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/Identifier.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/Identifier.java @@ -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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/RelationalDeleteEvent.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/RelationalDeleteEvent.java index cab8ec3e..04e62397 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/RelationalDeleteEvent.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/mapping/event/RelationalDeleteEvent.java @@ -44,8 +44,8 @@ public abstract class RelationalDeleteEvent extends AbstractRelationalEvent 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) 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 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) 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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/query/Query.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/query/Query.java index 50190d6c..1ba37049 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/query/Query.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/query/Query.java @@ -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; diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AbstractSegment.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AbstractSegment.java index 495466fb..76d00aea 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AbstractSegment.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AbstractSegment.java @@ -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) { diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java index 61afe0c8..d45b958f 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/AssignValue.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Between.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Between.java index fe441b59..770aa78b 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Between.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Between.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Cast.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Cast.java index f020303a..3c58fc6c 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Cast.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Cast.java @@ -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; diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Comparison.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Comparison.java index 1db89ecc..b7a76dc1 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Comparison.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Comparison.java @@ -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)); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDelete.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDelete.java index 0f41dc6c..c993c1c9 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDelete.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDelete.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDeleteBuilder.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDeleteBuilder.java index 72d0a5d9..ece32cf3 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDeleteBuilder.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultDeleteBuilder.java @@ -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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsert.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsert.java index f4731c72..bf62118e 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsert.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsert.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsertBuilder.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsertBuilder.java index 64ab6c66..ebcbfa1c 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsertBuilder.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultInsertBuilder.java @@ -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 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 values) { - Assert.notNull(values, "Values must not be null!"); + Assert.notNull(values, "Values must not be null"); this.values.addAll(values); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSelect.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSelect.java index a8ad525a..c3984b4e 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSelect.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultSelect.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdate.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdate.java index 7b57a0a6..dd9610be 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdate.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdate.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdateBuilder.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdateBuilder.java index 86f946dd..a6fd0b4c 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdateBuilder.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/DefaultUpdateBuilder.java @@ -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 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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Functions.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Functions.java index 3db8b996..b5e366ba 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Functions.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Functions.java @@ -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 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)); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/InlineQuery.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/InlineQuery.java index 7719382c..7bcf29d9 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/InlineQuery.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/InlineQuery.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Like.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Like.java index be46b480..c2457e62 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Like.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Like.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/SQL.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/SQL.java index 6e207ab4..ae3bdb86 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/SQL.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/SQL.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Table.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Table.java index f4ebf532..aa27d73f 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Table.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Table.java @@ -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)); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/TableLike.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/TableLike.java index 0a6fecff..6ae115a4 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/TableLike.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/TableLike.java @@ -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); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Visitable.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Visitable.java index 8e93144d..9bc3e52e 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Visitable.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/Visitable.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/CastVisitor.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/CastVisitor.java index 567e0a05..d19c9998 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/CastVisitor.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/CastVisitor.java @@ -58,8 +58,8 @@ class CastVisitor extends TypedSubtreeVisitor 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 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(); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/DelegatingVisitor.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/DelegatingVisitor.java index 786d0939..acaaf905 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/DelegatingVisitor.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/DelegatingVisitor.java @@ -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()) { diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FilteredSingleConditionRenderSupport.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FilteredSingleConditionRenderSupport.java index 9ab45dff..13f2d9bc 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FilteredSingleConditionRenderSupport.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FilteredSingleConditionRenderSupport.java @@ -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; diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FromTableVisitor.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FromTableVisitor.java index 0748b2a0..e8915dd6 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FromTableVisitor.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/FromTableVisitor.java @@ -62,7 +62,7 @@ class FromTableVisitor extends TypedSubtreeVisitor { @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) { diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/InsertStatementVisitor.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/InsertStatementVisitor.java index b7de3ddf..202e3104 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/InsertStatementVisitor.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/InsertStatementVisitor.java @@ -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); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/RenderNamingStrategy.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/RenderNamingStrategy.java index 2d6e45e5..5184e78b 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/RenderNamingStrategy.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/RenderNamingStrategy.java @@ -87,7 +87,7 @@ public interface RenderNamingStrategy { */ default RenderNamingStrategy map(Function mappingFunction) { - Assert.notNull(mappingFunction, "Mapping function must not be null!"); + Assert.notNull(mappingFunction, "Mapping function must not be null"); return new DelegatingRenderNamingStrategy(this, mappingFunction); } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SegmentListVisitor.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SegmentListVisitor.java index 30e4fa97..ce0819fc 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SegmentListVisitor.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SegmentListVisitor.java @@ -44,9 +44,9 @@ class SegmentListVisitor extends TypedSubtreeVisitor> 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; diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SqlRenderer.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SqlRenderer.java index 8a4dc8d5..fccf91a3 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SqlRenderer.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/SqlRenderer.java @@ -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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/TypedSingleConditionRenderSupport.java b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/TypedSingleConditionRenderSupport.java index e2809695..834fbddd 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/TypedSingleConditionRenderSupport.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/core/sql/render/TypedSingleConditionRenderSupport.java @@ -73,7 +73,7 @@ abstract class TypedSingleConditionRenderSupport 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; diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/CriteriaFactory.java b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/CriteriaFactory.java index 08a275e2..abe48064 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/CriteriaFactory.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/CriteriaFactory.java @@ -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; } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/ParameterMetadataProvider.java b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/ParameterMetadataProvider.java index bac2c626..efe94005 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/ParameterMetadataProvider.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/ParameterMetadataProvider.java @@ -61,7 +61,7 @@ class ParameterMetadataProvider implements Iterable { private ParameterMetadataProvider(Parameters parameters, @Nullable Iterator 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 { 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)); } } diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/RelationalExampleMapper.java b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/RelationalExampleMapper.java index 7380572d..b3eae90a 100644 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/RelationalExampleMapper.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/RelationalExampleMapper.java @@ -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 Query getMappedExample(Example 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 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"); } }); diff --git a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/SimpleRelationalEntityMetadata.java b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/SimpleRelationalEntityMetadata.java index bd9b7637..a633302a 100755 --- a/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/SimpleRelationalEntityMetadata.java +++ b/spring-data-relational/src/main/java/org/springframework/data/relational/repository/query/SimpleRelationalEntityMetadata.java @@ -38,8 +38,8 @@ public class SimpleRelationalEntityMetadata implements RelationalEntityMetada */ public SimpleRelationalEntityMetadata(Class 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; diff --git a/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/DeleteBatchingAggregateChangeTest.java b/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/DeleteBatchingAggregateChangeTest.java index cdacbe76..d24994b3 100644 --- a/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/DeleteBatchingAggregateChangeTest.java +++ b/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/DeleteBatchingAggregateChangeTest.java @@ -155,7 +155,7 @@ class DeleteBatchingAggregateChangeTest { Class entityType, Class batchActionType) { return getBatchWithValueActions(actions, entityType, batchActionType).stream().findFirst() - .orElseThrow(() -> new RuntimeException("No BatchWithValue action found!")); + .orElseThrow(() -> new RuntimeException("No BatchWithValue action found")); } @SuppressWarnings("unchecked") diff --git a/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/SaveBatchingAggregateChangeTest.java b/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/SaveBatchingAggregateChangeTest.java index f829df5c..61125b5a 100644 --- a/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/SaveBatchingAggregateChangeTest.java +++ b/spring-data-relational/src/test/java/org/springframework/data/relational/core/conversion/SaveBatchingAggregateChangeTest.java @@ -494,7 +494,7 @@ class SaveBatchingAggregateChangeTest { Class entityType, Class batchActionType) { return getBatchWithValueActions(actions, entityType, batchActionType).stream().findFirst() - .orElseThrow(() -> new RuntimeException("No BatchWithValue action found!")); + .orElseThrow(() -> new RuntimeException("No BatchWithValue action found")); } private DbAction.BatchWithValue, Object> getBatchWithValueAction(List> actions, @@ -502,7 +502,7 @@ class SaveBatchingAggregateChangeTest { return getBatchWithValueActions(actions, entityType, batchActionType).stream() .filter(batchWithValue -> batchWithValue.getBatchValue() == batchValue).findFirst().orElseThrow( - () -> new RuntimeException(String.format("No BatchWithValue with batch value '%s' found!", batchValue))); + () -> new RuntimeException(String.format("No BatchWithValue with batch value '%s' found", batchValue))); } @SuppressWarnings("unchecked") diff --git a/spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/RelationalExampleMapperTests.java b/spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/RelationalExampleMapperTests.java index b981004f..83caf615 100644 --- a/spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/RelationalExampleMapperTests.java +++ b/spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/RelationalExampleMapperTests.java @@ -220,7 +220,7 @@ public class RelationalExampleMapperTests { Example example = Example.of(person, matcher); assertThatIllegalStateException().isThrownBy(() -> exampleMapper.getMappedExample(example)) - .withMessageContaining("REGEX is not supported!"); + .withMessageContaining("REGEX is not supported"); } @Test // GH-929