@@ -51,8 +51,8 @@ class CassandraAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport
|
||||
@Override
|
||||
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) {
|
||||
|
||||
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null!");
|
||||
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
|
||||
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null");
|
||||
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
|
||||
|
||||
super.registerBeanDefinitions(annotationMetadata, registry);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class CassandraAuditingRegistrar 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(IsNewAwareAuditingHandler.class);
|
||||
|
||||
@@ -75,8 +75,8 @@ class CassandraAuditingRegistrar 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 listenerBeanDefinitionBuilder = BeanDefinitionBuilder
|
||||
.rootBeanDefinition(AuditingEntityCallback.class);
|
||||
|
||||
@@ -51,8 +51,8 @@ class ReactiveCassandraAuditingRegistrar extends AuditingBeanDefinitionRegistrar
|
||||
@Override
|
||||
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry) {
|
||||
|
||||
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null!");
|
||||
Assert.notNull(registry, "BeanDefinitionRegistry must not be null!");
|
||||
Assert.notNull(annotationMetadata, "AnnotationMetadata must not be null");
|
||||
Assert.notNull(registry, "BeanDefinitionRegistry must not be null");
|
||||
|
||||
super.registerBeanDefinitions(annotationMetadata, registry);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class ReactiveCassandraAuditingRegistrar extends AuditingBeanDefinitionRegistrar
|
||||
@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);
|
||||
|
||||
@@ -75,8 +75,8 @@ class ReactiveCassandraAuditingRegistrar extends AuditingBeanDefinitionRegistrar
|
||||
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);
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ public class AsyncCassandraTemplate
|
||||
|
||||
if (!result.wasApplied()) {
|
||||
throw new OptimisticLockingFailureException(
|
||||
String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", toSave,
|
||||
String.format("Cannot save entity %s with version %s to table %s; Has it been modified meanwhile", toSave,
|
||||
source.getVersion(), tableName));
|
||||
}
|
||||
});
|
||||
@@ -677,7 +677,7 @@ public class AsyncCassandraTemplate
|
||||
|
||||
if (!result.wasApplied()) {
|
||||
throw new OptimisticLockingFailureException(
|
||||
String.format("Cannot delete entity %s with version %s in table %s. Has it been modified meanwhile?",
|
||||
String.format("Cannot delete entity %s with version %s in table %s; Has it been modified meanwhile",
|
||||
entity, source.getVersion(), tableName));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -244,7 +244,7 @@ class CassandraBatchTemplate implements CassandraBatchOperations {
|
||||
for (Object entity : entities) {
|
||||
if (entity instanceof QueryOptions) {
|
||||
throw new IllegalArgumentException(
|
||||
String.format("%s must not be used as entity. Please make sure to call the appropriate method accepting %s",
|
||||
String.format("%s must not be used as entity; Please make sure to call the appropriate method accepting %s",
|
||||
ClassUtils.getDescriptiveType(entity), ClassUtils.getShortName(entity.getClass())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP
|
||||
|
||||
if (!result.wasApplied()) {
|
||||
throw new OptimisticLockingFailureException(
|
||||
String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", toSave,
|
||||
String.format("Cannot save entity %s with version %s to table %s; Has it been modified meanwhile", toSave,
|
||||
source.getVersion(), tableName));
|
||||
}
|
||||
});
|
||||
@@ -700,7 +700,7 @@ public class CassandraTemplate implements CassandraOperations, ApplicationEventP
|
||||
|
||||
if (!result.wasApplied()) {
|
||||
throw new OptimisticLockingFailureException(
|
||||
String.format("Cannot delete entity %s with version %s in table %s. Has it been modified meanwhile?",
|
||||
String.format("Cannot delete entity %s with version %s in table %s; Has it been modified meanwhile",
|
||||
entity, source.getVersion(), tableName));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -124,7 +124,7 @@ class ExecutableSelectOperationSupport implements ExecutableSelectOperation {
|
||||
|
||||
if (result.size() > 1) {
|
||||
throw new IncorrectResultSizeDataAccessException(
|
||||
String.format("Query [%s] returned non unique result.", this.query), 1);
|
||||
String.format("Query [%s] returned non unique result", this.query), 1);
|
||||
}
|
||||
|
||||
return result.iterator().next();
|
||||
|
||||
@@ -140,10 +140,10 @@ class PreparedStatementDelegate {
|
||||
String cql = QueryExtractorDelegate.getCql(statement);
|
||||
|
||||
if (StringUtils.hasText(cql)) {
|
||||
return String.format("Cannot prepare statement %s (%s). Statement must be a SimpleStatement.", cql, statement);
|
||||
return String.format("Cannot prepare statement %s (%s); Statement must be a SimpleStatement", cql, statement);
|
||||
}
|
||||
|
||||
return String.format("Cannot prepare statement %s. Statement must be a SimpleStatement.", statement);
|
||||
return String.format("Cannot prepare statement %s; Statement must be a SimpleStatement", statement);
|
||||
}
|
||||
|
||||
enum Mapper {
|
||||
|
||||
@@ -333,7 +333,7 @@ class ReactiveCassandraBatchTemplate implements ReactiveCassandraBatchOperations
|
||||
for (Object entity : entities) {
|
||||
if (entity instanceof QueryOptions) {
|
||||
throw new IllegalArgumentException(
|
||||
String.format("%s must not be used as entity. Please make sure to call the appropriate method accepting %s",
|
||||
String.format("%s must not be used as entity; Please make sure to call the appropriate method accepting %s",
|
||||
ClassUtils.getDescriptiveType(entity), ClassUtils.getShortName(entity.getClass())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ public class ReactiveCassandraTemplate
|
||||
if (!result.wasApplied()) {
|
||||
|
||||
sink.error(new OptimisticLockingFailureException(
|
||||
String.format("Cannot save entity %s with version %s to table %s. Has it been modified meanwhile?", toSave,
|
||||
String.format("Cannot save entity %s with version %s to table %s; Has it been modified meanwhile", toSave,
|
||||
source.getVersion(), tableName)));
|
||||
|
||||
return;
|
||||
@@ -678,7 +678,7 @@ public class ReactiveCassandraTemplate
|
||||
if (!result.wasApplied()) {
|
||||
|
||||
sink.error(new OptimisticLockingFailureException(
|
||||
String.format("Cannot delete entity %s with version %s in table %s. Has it been modified meanwhile?",
|
||||
String.format("Cannot delete entity %s with version %s in table %s; Has it been modified meanwhile",
|
||||
entity, source.getVersion(), tableName)));
|
||||
|
||||
return;
|
||||
|
||||
@@ -127,7 +127,7 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
}
|
||||
|
||||
sink.error(new IncorrectResultSizeDataAccessException(
|
||||
String.format("Query [%s] returned non unique result.", this.query), 1));
|
||||
String.format("Query [%s] returned non unique result", this.query), 1));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class IndexSpecificationFactory {
|
||||
|| (keyIndex != null && valueIndex != null)) {
|
||||
|
||||
throw new MappingException("Multiple index declarations for " + property
|
||||
+ " found. A map index must be either declared for entries, keys or values.");
|
||||
+ " found; A map index must be either declared for entries, keys or values");
|
||||
}
|
||||
|
||||
if (keyIndex != null) {
|
||||
|
||||
@@ -480,7 +480,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
|
||||
if (entity == null) {
|
||||
throw new MappingException(
|
||||
String.format("Expected to read %s into type %s but didn't find a PersistentEntity for the latter!",
|
||||
String.format("Expected to read %s into type %s but didn't find a PersistentEntity for the latter",
|
||||
rawSourceType.getSimpleName(), rawType.getName()));
|
||||
}
|
||||
|
||||
@@ -1327,7 +1327,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
if (!Object.class.equals(rawType)) {
|
||||
if (!rawType.isArray() && !ClassUtils.isAssignable(Iterable.class, rawType)) {
|
||||
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",
|
||||
source, source.getClass(), rawType));
|
||||
}
|
||||
}
|
||||
@@ -1415,7 +1415,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
String name = parameter.getName();
|
||||
|
||||
if (name == null) {
|
||||
throw new MappingException(String.format("Parameter %s does not have a name!", parameter));
|
||||
throw new MappingException(String.format("Parameter %s does not have a name", parameter));
|
||||
}
|
||||
|
||||
CassandraPersistentProperty property = getPersistentProperty(name, parameter.getType(),
|
||||
@@ -1423,7 +1423,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
|
||||
if (property == null) {
|
||||
|
||||
throw new MappingException(String.format("No property %s found on entity %s to bind constructor parameter to!",
|
||||
throw new MappingException(String.format("No property %s found on entity %s to bind constructor parameter to",
|
||||
name, entity.getType()));
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class QueryMapper {
|
||||
|
||||
field.getProperty().filter(CassandraPersistentProperty::isCompositePrimaryKey).ifPresent(it -> {
|
||||
throw new IllegalArgumentException(
|
||||
"Cannot use composite primary key directly. Reference a property of the composite primary key");
|
||||
"Cannot use composite primary key directly; Reference a property of the composite primary key");
|
||||
});
|
||||
|
||||
field.getProperty().filter(CassandraPersistentProperty::hasOrdinal).ifPresent(it -> {
|
||||
@@ -489,7 +489,7 @@ public class QueryMapper {
|
||||
* @param name must not be {@literal null} or empty.
|
||||
*/
|
||||
Field(ColumnName name) {
|
||||
Assert.notNull(name, "Name must not be null!");
|
||||
Assert.notNull(name, "Name must not be null");
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class RowReader {
|
||||
return row.getObject(index);
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Unknown Collection type encountered; valid collections are List, Set and Map.");
|
||||
throw new IllegalStateException("Unknown Collection type encountered; valid collections are List, Set and Map");
|
||||
}
|
||||
|
||||
private int getColumnIndex(String columnName) {
|
||||
|
||||
@@ -197,7 +197,7 @@ public class SchemaFactory {
|
||||
} catch (MappingException e) {
|
||||
|
||||
throw new MappingException(String.format(
|
||||
"Cannot resolve DataType for type [%s] for property [%s] in entity [%s]; Consider registering a Converter or annotating the property with @CassandraType.",
|
||||
"Cannot resolve DataType for type [%s] for property [%s] in entity [%s]; Consider registering a Converter or annotating the property with @CassandraType",
|
||||
property.getType(), property.getName(), property.getOwner().getName()), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ColumnSpecification {
|
||||
*/
|
||||
public ColumnSpecification type(DataType type) {
|
||||
|
||||
Assert.notNull(type, "DataType must not be null!");
|
||||
Assert.notNull(type, "DataType must not be null");
|
||||
|
||||
this.type = type;
|
||||
|
||||
|
||||
@@ -558,7 +558,7 @@ public abstract class ScriptUtils {
|
||||
|
||||
long elapsedTime = System.currentTimeMillis() - startTime;
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Executed CQL script from " + resource + " in " + elapsedTime + " ms.");
|
||||
logger.debug("Executed CQL script from " + resource + " in " + elapsedTime + " ms");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
if (ex instanceof ScriptException) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class AbstractDeleteEvent<T> extends AbstractStatementAwareMappingEvent<S
|
||||
|
||||
super(source, source, tableName);
|
||||
|
||||
Assert.notNull(type, "Type must not be null!");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class AfterLoadEvent<T> extends CassandraMappingEvent<Row> {
|
||||
|
||||
super(source, tableName);
|
||||
|
||||
Assert.notNull(type, "Type must not be null!");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class AuditingEntityCallback implements BeforeConvertCallback<Object>, Or
|
||||
*/
|
||||
public AuditingEntityCallback(ObjectFactory<IsNewAwareAuditingHandler> auditingHandlerFactory) {
|
||||
|
||||
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null!");
|
||||
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null");
|
||||
this.auditingHandlerFactory = auditingHandlerFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class CassandraMappingEvent<T> extends ApplicationEvent {
|
||||
|
||||
super(source);
|
||||
|
||||
Assert.notNull(tableName, "Table name must not be null!");
|
||||
Assert.notNull(tableName, "Table name must not be null");
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ReactiveAuditingEntityCallback implements ReactiveBeforeConvertCall
|
||||
*/
|
||||
public ReactiveAuditingEntityCallback(ObjectFactory<ReactiveIsNewAwareAuditingHandler> auditingHandlerFactory) {
|
||||
|
||||
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null!");
|
||||
Assert.notNull(auditingHandlerFactory, "IsNewAwareAuditingHandler must not be null");
|
||||
this.auditingHandlerFactory = auditingHandlerFactory;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CassandraPageRequest extends PageRequest {
|
||||
public static CassandraPageRequest of(int page, int size) {
|
||||
|
||||
Assert.isTrue(page == 0,
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0).");
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0)");
|
||||
|
||||
return of(page, size, Sort.unsorted());
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class CassandraPageRequest extends PageRequest {
|
||||
public static CassandraPageRequest of(int page, int size, Sort sort) {
|
||||
|
||||
Assert.isTrue(page == 0,
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0).");
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0)");
|
||||
|
||||
return new CassandraPageRequest(page, size, sort, null, false);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class CassandraPageRequest extends PageRequest {
|
||||
public static CassandraPageRequest of(int page, int size, Direction direction, String... properties) {
|
||||
|
||||
Assert.isTrue(page == 0,
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0).");
|
||||
"Cannot create a Cassandra page request for an indexed page other than the first page (0)");
|
||||
|
||||
return of(page, size, Sort.by(direction, properties));
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.datastax.oss.driver.api.core.CqlSession;
|
||||
public final class CqlSessionTracingFactory {
|
||||
|
||||
private CqlSessionTracingFactory() {
|
||||
throw new IllegalStateException("Can't instantiate a utility class.");
|
||||
throw new IllegalStateException("Can't instantiate a utility class");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,7 @@ public class CqlSessionTracingObservationHandler implements TracingObservationHa
|
||||
span.remoteIpAndPort(uri.getHost(), uri.getPort());
|
||||
} catch (Exception e) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Failed to parse the url [" + url + "]. Won't set this value on the span");
|
||||
log.debug("Failed to parse the url [" + url + "]; Won't set this value on the span");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CassandraRepositoryBean<T> extends CdiRepositoryBean<T> {
|
||||
Class<T> repositoryType, BeanManager beanManager, @Nullable CustomRepositoryImplementationDetector detector) {
|
||||
super(qualifiers, repositoryType, beanManager, Optional.ofNullable(detector));
|
||||
|
||||
Assert.notNull(operations, "Cannot create repository with 'null' for CassandraOperations.");
|
||||
Assert.notNull(operations, "Cannot create repository with 'null' for CassandraOperations");
|
||||
this.cassandraOperationsBean = operations;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class CassandraRepositoryExtension extends CdiRepositoryExtensionSupport
|
||||
|
||||
Bean<CassandraOperations> cassandraOperationsBean = Optional.ofNullable(this.cassandraOperationsMap.get(qualifiers))
|
||||
.orElseThrow(() -> new UnsatisfiedResolutionException(String.format(
|
||||
"Unable to resolve a bean for '%s' with qualifiers %s.", CassandraOperations.class.getName(), qualifiers)));
|
||||
"Unable to resolve a bean for '%s' with qualifiers %s", CassandraOperations.class.getName(), qualifiers)));
|
||||
|
||||
return new CassandraRepositoryBean<>(cassandraOperationsBean, qualifiers, repositoryType, beanManager,
|
||||
getCustomImplementationDetector());
|
||||
|
||||
@@ -90,7 +90,7 @@ public class CassandraQueryMethod extends QueryMethod {
|
||||
public void verify(Method method, RepositoryMetadata metadata) {
|
||||
|
||||
if (isPageQuery()) {
|
||||
throw new InvalidDataAccessApiUsageException("Page queries are not supported. Use a Slice query.");
|
||||
throw new InvalidDataAccessApiUsageException("Page queries are not supported; Use a Slice query");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class QueryStatementCreator {
|
||||
SimpleStatement statement = statementFactory.select(query, getPersistentEntity()).build();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("Created query [%s].", statement));
|
||||
LOG.debug(String.format("Created query [%s]", statement));
|
||||
}
|
||||
|
||||
return statement;
|
||||
@@ -116,7 +116,7 @@ class QueryStatementCreator {
|
||||
SimpleStatement statement = statementFactory.count(query, getPersistentEntity()).build();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("Created query [%s].", QueryExtractorDelegate.getCql(statement)));
|
||||
LOG.debug(String.format("Created query [%s]", QueryExtractorDelegate.getCql(statement)));
|
||||
}
|
||||
|
||||
return statement;
|
||||
@@ -143,7 +143,7 @@ class QueryStatementCreator {
|
||||
SimpleStatement statement = statementFactory.delete(query, getPersistentEntity()).build();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("Created query [%s].", QueryExtractorDelegate.getCql(statement)));
|
||||
LOG.debug(String.format("Created query [%s]", QueryExtractorDelegate.getCql(statement)));
|
||||
}
|
||||
|
||||
return statement;
|
||||
@@ -170,7 +170,7 @@ class QueryStatementCreator {
|
||||
SimpleStatement statement = statementFactory.select(query.limit(1), getPersistentEntity()).build();
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("Created query [%s].", QueryExtractorDelegate.getCql(statement)));
|
||||
LOG.debug(String.format("Created query [%s]", QueryExtractorDelegate.getCql(statement)));
|
||||
}
|
||||
|
||||
return statement;
|
||||
@@ -255,7 +255,7 @@ class QueryStatementCreator {
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("Created query [%s].", QueryExtractorDelegate.getCql(queryToUse)));
|
||||
LOG.debug(String.format("Created query [%s]", QueryExtractorDelegate.getCql(queryToUse)));
|
||||
}
|
||||
|
||||
return queryToUse;
|
||||
|
||||
@@ -43,7 +43,7 @@ import com.datastax.oss.driver.api.core.cql.SimpleStatement;
|
||||
*/
|
||||
public class ReactiveStringBasedCassandraQuery extends AbstractReactiveCassandraQuery {
|
||||
|
||||
private static final String COUNT_AND_EXISTS = "Manually defined query for %s cannot be a count and exists query at the same time!";
|
||||
private static final String COUNT_AND_EXISTS = "Manually defined query for %s cannot be a count and exists query at the same time";
|
||||
|
||||
private final StringBasedQuery stringBasedQuery;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import com.datastax.oss.driver.api.core.cql.SimpleStatement;
|
||||
*/
|
||||
public class StringBasedCassandraQuery extends AbstractCassandraQuery {
|
||||
|
||||
private static final String COUNT_AND_EXISTS = "Manually defined query for %s cannot be a count and exists query at the same time!";
|
||||
private static final String COUNT_AND_EXISTS = "Manually defined query for %s cannot be a count and exists query at the same time";
|
||||
|
||||
private final StringBasedQuery stringBasedQuery;
|
||||
|
||||
|
||||
@@ -71,6 +71,6 @@ public class CassandraRepositoryFactoryBean<T extends Repository<S, ID>, S, ID>
|
||||
|
||||
super.afterPropertiesSet();
|
||||
|
||||
Assert.notNull(cassandraOperations, "CassandraOperations must not be null!");
|
||||
Assert.notNull(cassandraOperations, "CassandraOperations must not be null");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class ReactiveCassandraRepositoryFactoryBean<T extends Repository<S, ID>,
|
||||
|
||||
super.afterPropertiesSet();
|
||||
|
||||
Assert.notNull(operations, "ReactiveCassandraOperations must not be null!");
|
||||
Assert.notNull(operations, "ReactiveCassandraOperations must not be null");
|
||||
|
||||
if (!mappingContextConfigured) {
|
||||
setMappingContext(operations.getConverter().getMappingContext());
|
||||
|
||||
@@ -226,7 +226,7 @@ public class ColumnTypeResolverUnitTests {
|
||||
DataType dataType = resolver.resolve(entity.getRequiredPersistentProperty("frozenListContent")).getDataType();
|
||||
|
||||
assertThat(dataType).isInstanceOf(ListType.class);
|
||||
assertThat(((ListType) dataType).isFrozen()).describedAs("The collection itself should not be frozen.").isFalse();
|
||||
assertThat(((ListType) dataType).isFrozen()).describedAs("The collection itself should not be frozen").isFalse();
|
||||
|
||||
DataType elementType = ((ListType) dataType).getElementType();
|
||||
assertThat(elementType).isInstanceOf(com.datastax.oss.driver.api.core.type.UserDefinedType.class);
|
||||
|
||||
@@ -84,7 +84,7 @@ class AbstractRoutingSessionFactoryUnitTests {
|
||||
sut.afterPropertiesSet();
|
||||
fail("Missing IllegalArgumentException");
|
||||
} catch (IllegalArgumentException e) {
|
||||
assertThat(e).hasMessageContaining("Illegal session factory value.");
|
||||
assertThat(e).hasMessageContaining("Illegal session factory value");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class ResourceKeyspacePopulatorUnitTests {
|
||||
keyspacePopulator.setScripts(new ByteArrayResource("drop table;create table;".getBytes()));
|
||||
|
||||
CqlSession sessionMock = mock(CqlSession.class);
|
||||
when(sessionMock.execute("drop table")).thenThrow(new IllegalStateException("Boom!"));
|
||||
when(sessionMock.execute("drop table")).thenThrow(new IllegalStateException("Boom"));
|
||||
|
||||
assertThatExceptionOfType(ScriptStatementFailedException.class)
|
||||
.isThrownBy(() -> keyspacePopulator.populate(sessionMock));
|
||||
@@ -133,7 +133,7 @@ class ResourceKeyspacePopulatorUnitTests {
|
||||
keyspacePopulator.setScripts(new ByteArrayResource("drop table;create table;".getBytes()));
|
||||
|
||||
CqlSession sessionMock = mock(CqlSession.class);
|
||||
when(sessionMock.execute("drop table")).thenThrow(new IllegalStateException("Boom!"));
|
||||
when(sessionMock.execute("drop table")).thenThrow(new IllegalStateException("Boom"));
|
||||
|
||||
when(sessionMock.execute("create table")).thenReturn(mock(ResultSet.class));
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ public class CassandraConnectionProperties extends Properties {
|
||||
|
||||
private <T> T convert(String propertyName, Class<T> type, Converter<String, T> converter) {
|
||||
|
||||
Assert.hasText(propertyName, "PropertyName must not be empty!");
|
||||
Assert.hasText(propertyName, "PropertyName must not be empty");
|
||||
|
||||
String propertyValue = getProperty(propertyName);
|
||||
try {
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CqlDataSet {
|
||||
*/
|
||||
public CqlDataSet executeIn(String keyspaceName) {
|
||||
|
||||
Assert.hasText(keyspaceName, "KeyspaceName must not be empty!");
|
||||
Assert.hasText(keyspaceName, "KeyspaceName must not be empty");
|
||||
return new CqlDataSet(location, keyspaceName);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public class CassandraExtension implements BeforeAllCallback, AfterAllCallback,
|
||||
Resources resources = TEST_RESOURCES.get();
|
||||
|
||||
Assert.state(resources != null,
|
||||
"No test in progress. Did you annotate your test class with @ExtendWith(CassandraExtension.class)?");
|
||||
"No test in progress; Did you annotate your test class with @ExtendWith(CassandraExtension.class)");
|
||||
|
||||
return resources;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user