Browse Source

DATACMNS-985 - Remove references to single-argument assertion methods.

pull/194/head
Christoph Strobl 9 years ago committed by Oliver Gierke
parent
commit
3e048a6dca
  1. 2
      src/main/java/org/springframework/data/auditing/AuditingHandler.java
  2. 12
      src/main/java/org/springframework/data/config/BeanComponentDefinitionBuilder.java
  3. 4
      src/main/java/org/springframework/data/convert/ConfigurableTypeInformationMapper.java
  4. 12
      src/main/java/org/springframework/data/convert/DefaultTypeMapper.java
  5. 8
      src/main/java/org/springframework/data/convert/EntityInstantiators.java
  6. 2
      src/main/java/org/springframework/data/convert/MappingContextTypeInformationMapper.java
  7. 4
      src/main/java/org/springframework/data/domain/jaxb/SpringDataJaxb.java
  8. 4
      src/main/java/org/springframework/data/geo/Box.java
  9. 4
      src/main/java/org/springframework/data/geo/Circle.java
  10. 4
      src/main/java/org/springframework/data/geo/GeoResult.java
  11. 2
      src/main/java/org/springframework/data/geo/GeoResults.java
  12. 2
      src/main/java/org/springframework/data/geo/Point.java
  13. 6
      src/main/java/org/springframework/data/geo/Polygon.java
  14. 2
      src/main/java/org/springframework/data/history/AnnotationRevisionMetadata.java
  15. 4
      src/main/java/org/springframework/data/history/Revision.java
  16. 2
      src/main/java/org/springframework/data/history/Revisions.java
  17. 12
      src/main/java/org/springframework/data/mapping/PreferredConstructor.java
  18. 2
      src/main/java/org/springframework/data/mapping/context/AbstractMappingContext.java
  19. 2
      src/main/java/org/springframework/data/mapping/context/DefaultPersistentPropertyPath.java
  20. 4
      src/main/java/org/springframework/data/mapping/context/MappingContextEvent.java
  21. 4
      src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java
  22. 12
      src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java
  23. 4
      src/main/java/org/springframework/data/mapping/model/PersistentEntityParameterValueProvider.java
  24. 8
      src/main/java/org/springframework/data/mapping/model/SimpleTypeHolder.java
  25. 8
      src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java
  26. 8
      src/main/java/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.java
  27. 4
      src/main/java/org/springframework/data/repository/config/DefaultRepositoryConfiguration.java
  28. 4
      src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionBuilder.java
  29. 2
      src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionParser.java
  30. 2
      src/main/java/org/springframework/data/repository/config/RepositoryBeanDefinitionParser.java
  31. 4
      src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java
  32. 2
      src/main/java/org/springframework/data/repository/config/RepositoryConfigurationDelegate.java
  33. 4
      src/main/java/org/springframework/data/repository/config/RepositoryConfigurationExtensionSupport.java
  34. 4
      src/main/java/org/springframework/data/repository/config/XmlRepositoryConfigurationSource.java
  35. 2
      src/main/java/org/springframework/data/repository/core/support/AbstractEntityInformation.java
  36. 6
      src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java
  37. 2
      src/main/java/org/springframework/data/repository/core/support/DelegatingEntityInformation.java
  38. 2
      src/main/java/org/springframework/data/repository/core/support/PropertiesBasedNamedQueries.java
  39. 2
      src/main/java/org/springframework/data/repository/core/support/ReflectionEntityInformation.java
  40. 2
      src/main/java/org/springframework/data/repository/core/support/RepositoryFactorySupport.java
  41. 4
      src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryProxyPostProcessor.java
  42. 4
      src/main/java/org/springframework/data/repository/init/RepositoriesPopulatedEvent.java
  43. 4
      src/main/java/org/springframework/data/repository/init/ResourceReaderRepositoryPopulator.java
  44. 2
      src/main/java/org/springframework/data/repository/query/Parameter.java
  45. 2
      src/main/java/org/springframework/data/repository/query/Parameters.java
  46. 4
      src/main/java/org/springframework/data/repository/query/ParametersParameterAccessor.java
  47. 2
      src/main/java/org/springframework/data/repository/query/QueryMethod.java
  48. 2
      src/main/java/org/springframework/data/repository/support/AnnotationAttribute.java
  49. 4
      src/main/java/org/springframework/data/repository/support/MethodParameters.java
  50. 2
      src/main/java/org/springframework/data/repository/support/Repositories.java
  51. 4
      src/main/java/org/springframework/data/util/AnnotationDetectionFieldCallback.java
  52. 8
      src/main/java/org/springframework/data/util/TypeDiscoverer.java
  53. 2
      src/main/java/org/springframework/data/util/TypeVariableTypeInformation.java
  54. 6
      src/main/java/org/springframework/data/util/Version.java
  55. 2
      src/main/java/org/springframework/data/web/SortHandlerMethodArgumentResolver.java

2
src/main/java/org/springframework/data/auditing/AuditingHandler.java

@ -82,7 +82,7 @@ public class AuditingHandler implements InitializingBean { @@ -82,7 +82,7 @@ public class AuditingHandler implements InitializingBean {
*/
public void setAuditorAware(final AuditorAware<?> auditorAware) {
Assert.notNull(auditorAware);
Assert.notNull(auditorAware, "AuditorAware must not be null!");
this.auditorAware = auditorAware;
}

12
src/main/java/org/springframework/data/config/BeanComponentDefinitionBuilder.java

@ -43,8 +43,8 @@ public class BeanComponentDefinitionBuilder { @@ -43,8 +43,8 @@ public class BeanComponentDefinitionBuilder {
*/
public BeanComponentDefinitionBuilder(Element defaultSource, ParserContext context) {
Assert.notNull(defaultSource);
Assert.notNull(context);
Assert.notNull(defaultSource, "DefaultSource must not be null!");
Assert.notNull(context, "Context must not be null!");
this.defaultSource = defaultSource;
this.context = context;
@ -58,7 +58,7 @@ public class BeanComponentDefinitionBuilder { @@ -58,7 +58,7 @@ public class BeanComponentDefinitionBuilder {
*/
public BeanComponentDefinition getComponent(BeanDefinitionBuilder builder) {
Assert.notNull(builder);
Assert.notNull(builder, "Builder must not be null!");
AbstractBeanDefinition definition = builder.getRawBeanDefinition();
String name = BeanDefinitionReaderUtils.generateBeanName(definition, context.getRegistry(), context.isNested());
@ -76,7 +76,7 @@ public class BeanComponentDefinitionBuilder { @@ -76,7 +76,7 @@ public class BeanComponentDefinitionBuilder {
*/
public BeanComponentDefinition getComponentIdButFallback(BeanDefinitionBuilder builder, String fallback) {
Assert.hasText(fallback);
Assert.hasText(fallback, "Fallback component id must not be null or empty!");
String id = defaultSource.getAttribute("id");
return getComponent(builder, StringUtils.hasText(id) ? id : fallback);
@ -104,8 +104,8 @@ public class BeanComponentDefinitionBuilder { @@ -104,8 +104,8 @@ public class BeanComponentDefinitionBuilder {
*/
public BeanComponentDefinition getComponent(BeanDefinitionBuilder builder, String name, Object rawSource) {
Assert.notNull(builder);
Assert.hasText(name);
Assert.notNull(builder, "Builder must not be null!");
Assert.hasText(name, "Name of bean must not be null or empty!");
AbstractBeanDefinition definition = builder.getRawBeanDefinition();
definition.setSource(context.extractSource(rawSource));

4
src/main/java/org/springframework/data/convert/ConfigurableTypeInformationMapper.java

@ -37,13 +37,13 @@ public class ConfigurableTypeInformationMapper implements TypeInformationMapper @@ -37,13 +37,13 @@ public class ConfigurableTypeInformationMapper implements TypeInformationMapper
private final Map<ClassTypeInformation<?>, Object> typeMap;
/**
* Creates a new {@link ConfigurableTypeMapper} for the given type map.
* Creates a new {@link ConfigurableTypeInformationMapper} for the given type map.
*
* @param sourceTypeMap must not be {@literal null}.
*/
public ConfigurableTypeInformationMapper(Map<? extends Class<?>, String> sourceTypeMap) {
Assert.notNull(sourceTypeMap);
Assert.notNull(sourceTypeMap, "SourceTypeMap must not be null!");
this.typeMap = new HashMap<ClassTypeInformation<?>, Object>(sourceTypeMap.size());
for (Entry<? extends Class<?>, String> entry : sourceTypeMap.entrySet()) {

12
src/main/java/org/springframework/data/convert/DefaultTypeMapper.java

@ -77,8 +77,8 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> { @@ -77,8 +77,8 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> {
MappingContext<? extends PersistentEntity<?, ?>, ?> mappingContext,
List<? extends TypeInformationMapper> additionalMappers) {
Assert.notNull(accessor);
Assert.notNull(additionalMappers);
Assert.notNull(accessor, "Accessor must not be null!");
Assert.notNull(additionalMappers, "AdditionalMappers must not be null!");
List<TypeInformationMapper> mappers = new ArrayList<TypeInformationMapper>(additionalMappers.size() + 1);
if (mappingContext != null) {
@ -97,7 +97,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> { @@ -97,7 +97,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> {
*/
public TypeInformation<?> readType(S source) {
Assert.notNull(source);
Assert.notNull(source, "Source object must not be null!");
Object alias = accessor.readAliasFrom(source);
return alias == null ? null : getFromCacheOrCreate(alias);
@ -138,7 +138,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> { @@ -138,7 +138,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> {
@SuppressWarnings("unchecked")
public <T> TypeInformation<? extends T> readType(S source, TypeInformation<T> basicType) {
Assert.notNull(source);
Assert.notNull(source, "Source object must not be null!");
Class<?> documentsTargetType = getDefaultedTypeToBeUsed(source);
if (documentsTargetType == null) {
@ -198,7 +198,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> { @@ -198,7 +198,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> {
*/
public void writeType(TypeInformation<?> info, S sink) {
Assert.notNull(info);
Assert.notNull(info, "TypeInformation must not be null!");
Object alias = getAliasFor(info);
if (alias != null) {
@ -215,7 +215,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> { @@ -215,7 +215,7 @@ public class DefaultTypeMapper<S> implements TypeMapper<S> {
*/
protected final Object getAliasFor(TypeInformation<?> info) {
Assert.notNull(info);
Assert.notNull(info, "TypeInformation must not be null!");
for (TypeInformationMapper mapper : mappers) {
Object alias = mapper.createAliasFor(info);

8
src/main/java/org/springframework/data/convert/EntityInstantiators.java

@ -62,14 +62,14 @@ public class EntityInstantiators { @@ -62,14 +62,14 @@ public class EntityInstantiators {
* Creates a new {@link EntityInstantiator} using the given fallback {@link EntityInstantiator} and the given custom
* ones.
*
* @param fallback must not be {@literal null}.
* @param defaultInstantiator must not be {@literal null}.
* @param customInstantiators must not be {@literal null}.
*/
public EntityInstantiators(EntityInstantiator defaultInstantiator,
Map<Class<?>, EntityInstantiator> customInstantiators) {
Assert.notNull(defaultInstantiator);
Assert.notNull(customInstantiators);
Assert.notNull(defaultInstantiator, "DefaultInstantiator must not be null!");
Assert.notNull(customInstantiators, "CustomInstantiators must not be null!");
this.fallback = defaultInstantiator;
this.customInstantiators = customInstantiators;
@ -83,7 +83,7 @@ public class EntityInstantiators { @@ -83,7 +83,7 @@ public class EntityInstantiators {
*/
public EntityInstantiator getInstantiatorFor(PersistentEntity<?, ?> entity) {
Assert.notNull(entity);
Assert.notNull(entity, "Entity must not be null!");
Class<?> type = entity.getType();
if (!customInstantiators.containsKey(type)) {

2
src/main/java/org/springframework/data/convert/MappingContextTypeInformationMapper.java

@ -46,7 +46,7 @@ public class MappingContextTypeInformationMapper implements TypeInformationMappe @@ -46,7 +46,7 @@ public class MappingContextTypeInformationMapper implements TypeInformationMappe
*/
public MappingContextTypeInformationMapper(MappingContext<? extends PersistentEntity<?, ?>, ?> mappingContext) {
Assert.notNull(mappingContext);
Assert.notNull(mappingContext, "MappingContext must not be null!");
this.typeMap = new ConcurrentHashMap<ClassTypeInformation<?>, CacheValue<Object>>();
this.mappingContext = mappingContext;

4
src/main/java/org/springframework/data/domain/jaxb/SpringDataJaxb.java

@ -110,7 +110,7 @@ public abstract class SpringDataJaxb { @@ -110,7 +110,7 @@ public abstract class SpringDataJaxb {
*/
public static <T, S> List<T> unmarshal(Collection<S> source, XmlAdapter<S, T> adapter) {
Assert.notNull(adapter);
Assert.notNull(adapter, "Adapter must not be null!");
if (source == null || source.isEmpty()) {
return Collections.emptyList();
@ -138,7 +138,7 @@ public abstract class SpringDataJaxb { @@ -138,7 +138,7 @@ public abstract class SpringDataJaxb {
*/
public static <T, S> List<S> marshal(Iterable<T> source, XmlAdapter<S, T> adapter) {
Assert.notNull(adapter);
Assert.notNull(adapter, "Adapter must not be null!");
if (source == null) {
return Collections.emptyList();

4
src/main/java/org/springframework/data/geo/Box.java

@ -40,8 +40,8 @@ public class Box implements Shape { @@ -40,8 +40,8 @@ public class Box implements Shape {
*/
public Box(Point first, Point second) {
Assert.notNull(first);
Assert.notNull(second);
Assert.notNull(first, "First point must not be null!");
Assert.notNull(second, "Second point must not be null!");
this.first = first;
this.second = second;

4
src/main/java/org/springframework/data/geo/Circle.java

@ -42,8 +42,8 @@ public class Circle implements Shape { @@ -42,8 +42,8 @@ public class Circle implements Shape {
@PersistenceConstructor
public Circle(Point center, Distance radius) {
Assert.notNull(center);
Assert.notNull(radius);
Assert.notNull(center, "Center point must not be null!");
Assert.notNull(radius, "Radius must not be null!");
Assert.isTrue(radius.getValue() >= 0, "Radius must not be negative!");
this.center = center;

4
src/main/java/org/springframework/data/geo/GeoResult.java

@ -41,8 +41,8 @@ public class GeoResult<T> implements Serializable { @@ -41,8 +41,8 @@ public class GeoResult<T> implements Serializable {
*/
public GeoResult(T content, Distance distance) {
Assert.notNull(content);
Assert.notNull(distance);
Assert.notNull(content, "Content must not be null!");
Assert.notNull(distance, "Distance must not be null!");
this.content = content;
this.distance = distance;

2
src/main/java/org/springframework/data/geo/GeoResults.java

@ -68,7 +68,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable { @@ -68,7 +68,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
@PersistenceConstructor
public GeoResults(List<? extends GeoResult<T>> results, Distance averageDistance) {
Assert.notNull(results);
Assert.notNull(results, "Results must not be null!");
this.results = results;
this.averageDistance = averageDistance;

2
src/main/java/org/springframework/data/geo/Point.java

@ -55,7 +55,7 @@ public class Point implements Serializable { @@ -55,7 +55,7 @@ public class Point implements Serializable {
*/
public Point(Point point) {
Assert.notNull(point);
Assert.notNull(point, "Source point must not be null!");
this.x = point.x;
this.y = point.y;

6
src/main/java/org/springframework/data/geo/Polygon.java

@ -51,7 +51,7 @@ public class Polygon implements Iterable<Point>, Shape { @@ -51,7 +51,7 @@ public class Polygon implements Iterable<Point>, Shape {
Assert.notNull(x, "X coordinate must not be null!");
Assert.notNull(y, "Y coordinate must not be null!");
Assert.notNull(z, "Z coordinate must not be null!");
Assert.notNull(others);
Assert.notNull(others, "Others must not be null!");
List<Point> points = new ArrayList<Point>(3 + others.length);
points.addAll(Arrays.asList(x, y, z));
@ -68,13 +68,13 @@ public class Polygon implements Iterable<Point>, Shape { @@ -68,13 +68,13 @@ public class Polygon implements Iterable<Point>, Shape {
@PersistenceConstructor
public Polygon(List<? extends Point> points) {
Assert.notNull(points);
Assert.notNull(points, "Points must not be null!");
List<Point> pointsToSet = new ArrayList<Point>(points.size());
for (Point point : points) {
Assert.notNull(point);
Assert.notNull(point, "Single Point in Polygon must not be null!");
pointsToSet.add(point);
}

2
src/main/java/org/springframework/data/history/AnnotationRevisionMetadata.java

@ -45,7 +45,7 @@ public class AnnotationRevisionMetadata<N extends Number & Comparable<N>> implem @@ -45,7 +45,7 @@ public class AnnotationRevisionMetadata<N extends Number & Comparable<N>> implem
public AnnotationRevisionMetadata(final Object entity, Class<? extends Annotation> revisionNumberAnnotation,
Class<? extends Annotation> revisionTimeStampAnnotation) {
Assert.notNull(entity);
Assert.notNull(entity, "Entity must not be null!");
this.entity = entity;
if (revisionNumberAnnotation != null) {

4
src/main/java/org/springframework/data/history/Revision.java

@ -37,8 +37,8 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp @@ -37,8 +37,8 @@ public final class Revision<N extends Number & Comparable<N>, T> implements Comp
*/
public Revision(RevisionMetadata<N> metadata, T entity) {
Assert.notNull(metadata);
Assert.notNull(entity);
Assert.notNull(metadata, "Metadata must not be null!");
Assert.notNull(entity, "Entity must not be null!");
this.metadata = metadata;
this.entity = entity;

2
src/main/java/org/springframework/data/history/Revisions.java

@ -51,7 +51,7 @@ public class Revisions<N extends Number & Comparable<N>, T> implements Iterable< @@ -51,7 +51,7 @@ public class Revisions<N extends Number & Comparable<N>, T> implements Iterable<
*/
private Revisions(List<? extends Revision<N, T>> revisions, boolean latestLast) {
Assert.notNull(revisions);
Assert.notNull(revisions, "Revisions must not be null!");
this.revisions = new ArrayList<Revision<N, T>>(revisions);
this.latestLast = latestLast;

12
src/main/java/org/springframework/data/mapping/PreferredConstructor.java

@ -58,8 +58,8 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> { @@ -58,8 +58,8 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
*/
public PreferredConstructor(Constructor<T> constructor, Parameter<Object, P>... parameters) {
Assert.notNull(constructor);
Assert.notNull(parameters);
Assert.notNull(constructor, "Constructor must not be null!");
Assert.notNull(parameters, "Parameters must not be null!");
ReflectionUtils.makeAccessible(constructor);
this.constructor = constructor;
@ -122,7 +122,7 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> { @@ -122,7 +122,7 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
*/
public boolean isConstructorParameter(PersistentProperty<?> property) {
Assert.notNull(property);
Assert.notNull(property, "Property must not be null!");
try {
@ -166,7 +166,7 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> { @@ -166,7 +166,7 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
*/
public boolean isEnclosingClassParameter(Parameter<?, P> parameter) {
Assert.notNull(parameter);
Assert.notNull(parameter, "Parameter must not be null!");
if (parameters.isEmpty() || !parameter.isEnclosingClassParameter()) {
return false;
@ -203,8 +203,8 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> { @@ -203,8 +203,8 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
*/
public Parameter(String name, TypeInformation<T> type, Annotation[] annotations, PersistentEntity<T, P> entity) {
Assert.notNull(type);
Assert.notNull(annotations);
Assert.notNull(type, "Type must not be null!");
Assert.notNull(annotations, "Annotations must not be null!");
this.name = name;
this.type = type;

2
src/main/java/org/springframework/data/mapping/context/AbstractMappingContext.java

@ -160,7 +160,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<? @@ -160,7 +160,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
*/
public E getPersistentEntity(TypeInformation<?> type) {
Assert.notNull(type);
Assert.notNull(type, "Type must not be null!");
try {
read.lock();

2
src/main/java/org/springframework/data/mapping/context/DefaultPersistentPropertyPath.java

@ -51,7 +51,7 @@ class DefaultPersistentPropertyPath<T extends PersistentProperty<T>> implements @@ -51,7 +51,7 @@ class DefaultPersistentPropertyPath<T extends PersistentProperty<T>> implements
*/
public DefaultPersistentPropertyPath(List<T> properties) {
Assert.notNull(properties);
Assert.notNull(properties, "Properties must not be null!");
this.properties = properties;
}

4
src/main/java/org/springframework/data/mapping/context/MappingContextEvent.java

@ -46,8 +46,8 @@ public class MappingContextEvent<E extends PersistentEntity<?, P>, P extends Per @@ -46,8 +46,8 @@ public class MappingContextEvent<E extends PersistentEntity<?, P>, P extends Per
super(source);
Assert.notNull(source);
Assert.notNull(entity);
Assert.notNull(source, "Source MappingContext must not be null!");
Assert.notNull(entity, "Entity must not be null!");
this.source = source;
this.entity = entity;

4
src/main/java/org/springframework/data/mapping/model/AbstractPersistentProperty.java

@ -58,8 +58,8 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P> @@ -58,8 +58,8 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
public AbstractPersistentProperty(Field field, PropertyDescriptor propertyDescriptor, PersistentEntity<?, P> owner,
SimpleTypeHolder simpleTypeHolder) {
Assert.notNull(simpleTypeHolder);
Assert.notNull(owner);
Assert.notNull(simpleTypeHolder, "SimpleTypeHolder must not be null!");
Assert.notNull(owner, "Owner entity must not be null!");
this.name = field == null ? propertyDescriptor.getName() : field.getName();
this.rawType = field == null ? propertyDescriptor.getPropertyType() : field.getType();

12
src/main/java/org/springframework/data/mapping/model/BasicPersistentEntity.java

@ -96,7 +96,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -96,7 +96,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public BasicPersistentEntity(TypeInformation<T> information, Comparator<P> comparator) {
Assert.notNull(information);
Assert.notNull(information, "Information must not be null!");
this.information = information;
this.properties = new ArrayList<P>();
@ -188,7 +188,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -188,7 +188,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public void addPersistentProperty(P property) {
Assert.notNull(property);
Assert.notNull(property, "Property must not be null!");
if (properties.contains(property)) {
return;
@ -323,7 +323,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -323,7 +323,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public void doWithProperties(PropertyHandler<P> handler) {
Assert.notNull(handler);
Assert.notNull(handler, "Handler must not be null!");
for (P property : properties) {
if (!property.isTransient() && !property.isAssociation()) {
@ -339,7 +339,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -339,7 +339,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
@Override
public void doWithProperties(SimplePropertyHandler handler) {
Assert.notNull(handler);
Assert.notNull(handler, "Handler must not be null!");
for (PersistentProperty<?> property : properties) {
if (!property.isTransient() && !property.isAssociation()) {
@ -354,7 +354,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -354,7 +354,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public void doWithAssociations(AssociationHandler<P> handler) {
Assert.notNull(handler);
Assert.notNull(handler, "Handler must not be null!");
for (Association<P> association : associations) {
handler.doWithAssociation(association);
@ -367,7 +367,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement @@ -367,7 +367,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
*/
public void doWithAssociations(SimpleAssociationHandler handler) {
Assert.notNull(handler);
Assert.notNull(handler, "Handler must not be null!");
for (Association<? extends PersistentProperty<?>> association : associations) {
handler.doWithAssociation(association);

4
src/main/java/org/springframework/data/mapping/model/PersistentEntityParameterValueProvider.java

@ -47,8 +47,8 @@ public class PersistentEntityParameterValueProvider<P extends PersistentProperty @@ -47,8 +47,8 @@ public class PersistentEntityParameterValueProvider<P extends PersistentProperty
public PersistentEntityParameterValueProvider(PersistentEntity<?, P> entity, PropertyValueProvider<P> provider,
Object parent) {
Assert.notNull(entity);
Assert.notNull(provider);
Assert.notNull(entity, "Entity must not be null!");
Assert.notNull(provider, "Provider must not be null!");
this.entity = entity;
this.provider = provider;

8
src/main/java/org/springframework/data/mapping/model/SimpleTypeHolder.java

@ -86,7 +86,7 @@ public class SimpleTypeHolder { @@ -86,7 +86,7 @@ public class SimpleTypeHolder {
*/
public SimpleTypeHolder(Set<? extends Class<?>> customSimpleTypes, boolean registerDefaults) {
Assert.notNull(customSimpleTypes);
Assert.notNull(customSimpleTypes, "CustomSimpleTypes must not be null!");
this.simpleTypes = new CopyOnWriteArraySet<Class<?>>(customSimpleTypes);
if (registerDefaults) {
@ -102,8 +102,8 @@ public class SimpleTypeHolder { @@ -102,8 +102,8 @@ public class SimpleTypeHolder {
*/
public SimpleTypeHolder(Set<? extends Class<?>> customSimpleTypes, SimpleTypeHolder source) {
Assert.notNull(customSimpleTypes);
Assert.notNull(source);
Assert.notNull(customSimpleTypes, "CustomSimpleTypes must not be null!");
Assert.notNull(source, "SourceTypeHolder must not be null!");
this.simpleTypes = new CopyOnWriteArraySet<Class<?>>(customSimpleTypes);
this.simpleTypes.addAll(source.simpleTypes);
@ -117,7 +117,7 @@ public class SimpleTypeHolder { @@ -117,7 +117,7 @@ public class SimpleTypeHolder {
*/
public boolean isSimpleType(Class<?> type) {
Assert.notNull(type);
Assert.notNull(type, "Type must not be null!");
if (Object.class.equals(type) || simpleTypes.contains(type)) {
return true;

8
src/main/java/org/springframework/data/repository/cdi/CdiRepositoryBean.java

@ -86,10 +86,10 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl @@ -86,10 +86,10 @@ public abstract class CdiRepositoryBean<T> implements Bean<T>, PassivationCapabl
public CdiRepositoryBean(Set<Annotation> qualifiers, Class<T> repositoryType, BeanManager beanManager,
CustomRepositoryImplementationDetector detector) {
Assert.notNull(qualifiers);
Assert.notNull(beanManager);
Assert.notNull(repositoryType);
Assert.isTrue(repositoryType.isInterface());
Assert.notNull(qualifiers, "Qualifiers must not be null!");
Assert.notNull(beanManager, "BeanManager must not be null!");
Assert.notNull(repositoryType, "Repoitory type must not be null!");
Assert.isTrue(repositoryType.isInterface(), "RepositoryType must be an interface!");
this.qualifiers = qualifiers;
this.repositoryType = repositoryType;

8
src/main/java/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.java

@ -67,7 +67,7 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura @@ -67,7 +67,7 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura
* Creates a new {@link AnnotationRepositoryConfigurationSource} from the given {@link AnnotationMetadata} and
* annotation.
*
* @param configMetadata must not be {@literal null}.
* @param metadata must not be {@literal null}.
* @param annotation must not be {@literal null}.
* @param resourceLoader must not be {@literal null}.
* @param environment
@ -77,9 +77,9 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura @@ -77,9 +77,9 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura
super(environment);
Assert.notNull(metadata);
Assert.notNull(annotation);
Assert.notNull(resourceLoader);
Assert.notNull(metadata, "Metadata must not be null!");
Assert.notNull(annotation, "Annotation must not be null!");
Assert.notNull(resourceLoader, "ResourceLoader must not be null!");
this.attributes = new AnnotationAttributes(metadata.getAnnotationAttributes(annotation.getName()));
this.enableAnnotationMetadata = new StandardAnnotationMetadata(annotation);

4
src/main/java/org/springframework/data/repository/config/DefaultRepositoryConfiguration.java

@ -44,8 +44,8 @@ public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSou @@ -44,8 +44,8 @@ public class DefaultRepositoryConfiguration<T extends RepositoryConfigurationSou
*/
public DefaultRepositoryConfiguration(T configurationSource, BeanDefinition definition) {
Assert.notNull(configurationSource);
Assert.notNull(definition);
Assert.notNull(configurationSource, "ConfigurationSource must not be null!");
Assert.notNull(definition, "BeanDefinition must not be null!");
this.configurationSource = configurationSource;
this.definition = definition;

4
src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionBuilder.java

@ -41,7 +41,7 @@ public class NamedQueriesBeanDefinitionBuilder { @@ -41,7 +41,7 @@ public class NamedQueriesBeanDefinitionBuilder {
*/
public NamedQueriesBeanDefinitionBuilder(String defaultLocation) {
Assert.hasText(defaultLocation);
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty!");
this.defaultLocation = defaultLocation;
}
@ -52,7 +52,7 @@ public class NamedQueriesBeanDefinitionBuilder { @@ -52,7 +52,7 @@ public class NamedQueriesBeanDefinitionBuilder {
*/
public void setLocations(String locations) {
Assert.hasText(locations);
Assert.hasText(locations, "Locations must not be null nor empty!");
this.locations = locations;
}

2
src/main/java/org/springframework/data/repository/config/NamedQueriesBeanDefinitionParser.java

@ -46,7 +46,7 @@ public class NamedQueriesBeanDefinitionParser implements BeanDefinitionParser { @@ -46,7 +46,7 @@ public class NamedQueriesBeanDefinitionParser implements BeanDefinitionParser {
* @param defaultLocation must be non-empty
*/
public NamedQueriesBeanDefinitionParser(String defaultLocation) {
Assert.hasText(defaultLocation);
Assert.hasText(defaultLocation, "DefaultLocation must not be null nor empty!");
this.defaultLocation = defaultLocation;
}

2
src/main/java/org/springframework/data/repository/config/RepositoryBeanDefinitionParser.java

@ -47,7 +47,7 @@ public class RepositoryBeanDefinitionParser implements BeanDefinitionParser { @@ -47,7 +47,7 @@ public class RepositoryBeanDefinitionParser implements BeanDefinitionParser {
*/
public RepositoryBeanDefinitionParser(RepositoryConfigurationExtension extension) {
Assert.notNull(extension);
Assert.notNull(extension, "Extension must not be null!");
this.extension = extension;
}

4
src/main/java/org/springframework/data/repository/config/RepositoryComponentProvider.java

@ -61,7 +61,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro @@ -61,7 +61,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro
assertRequiredSpringVersionPresent();
Assert.notNull(includeFilters);
Assert.notNull(includeFilters, "Include filters must not be null!");
if (includeFilters.iterator().hasNext()) {
for (TypeFilter filter : includeFilters) {
@ -204,7 +204,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro @@ -204,7 +204,7 @@ class RepositoryComponentProvider extends ClassPathScanningCandidateComponentPro
*/
public AllTypeFilter(List<TypeFilter> delegates) {
Assert.notNull(delegates);
Assert.notNull(delegates, "TypeFilter deleages must not be null!");
this.delegates = delegates;
}

2
src/main/java/org/springframework/data/repository/config/RepositoryConfigurationDelegate.java

@ -73,7 +73,7 @@ public class RepositoryConfigurationDelegate { @@ -73,7 +73,7 @@ public class RepositoryConfigurationDelegate {
Assert.isTrue(isXml || isAnnotation,
"Configuration source must either be an Xml- or an AnnotationBasedConfigurationSource!");
Assert.notNull(resourceLoader);
Assert.notNull(resourceLoader, "ResourceLoader must not be null!");
RepositoryBeanNameGenerator generator = new RepositoryBeanNameGenerator();
generator.setBeanClassLoader(resourceLoader.getClassLoader());

4
src/main/java/org/springframework/data/repository/config/RepositoryConfigurationExtensionSupport.java

@ -76,8 +76,8 @@ public abstract class RepositoryConfigurationExtensionSupport implements Reposit @@ -76,8 +76,8 @@ public abstract class RepositoryConfigurationExtensionSupport implements Reposit
public <T extends RepositoryConfigurationSource> Collection<RepositoryConfiguration<T>> getRepositoryConfigurations(
T configSource, ResourceLoader loader, boolean strictMatchesOnly) {
Assert.notNull(configSource);
Assert.notNull(loader);
Assert.notNull(configSource, "ConfigSource must not be null!");
Assert.notNull(loader, "Loader must not be null!");
Set<RepositoryConfiguration<T>> result = new HashSet<RepositoryConfiguration<T>>();

4
src/main/java/org/springframework/data/repository/config/XmlRepositoryConfigurationSource.java

@ -62,8 +62,8 @@ public class XmlRepositoryConfigurationSource extends RepositoryConfigurationSou @@ -62,8 +62,8 @@ public class XmlRepositoryConfigurationSource extends RepositoryConfigurationSou
super(environment);
Assert.notNull(element);
Assert.notNull(context);
Assert.notNull(element, "Element must not be null!");
Assert.notNull(context, "Context must not be null!");
this.element = element;
this.context = context;

2
src/main/java/org/springframework/data/repository/core/support/AbstractEntityInformation.java

@ -38,7 +38,7 @@ public abstract class AbstractEntityInformation<T, ID extends Serializable> impl @@ -38,7 +38,7 @@ public abstract class AbstractEntityInformation<T, ID extends Serializable> impl
*/
public AbstractEntityInformation(Class<T> domainClass) {
Assert.notNull(domainClass);
Assert.notNull(domainClass, "DomainClass must not be null!");
this.domainClass = domainClass;
}

6
src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java

@ -73,8 +73,8 @@ class DefaultRepositoryInformation implements RepositoryInformation { @@ -73,8 +73,8 @@ class DefaultRepositoryInformation implements RepositoryInformation {
public DefaultRepositoryInformation(RepositoryMetadata metadata, Class<?> repositoryBaseClass,
Class<?> customImplementationClass) {
Assert.notNull(metadata);
Assert.notNull(repositoryBaseClass);
Assert.notNull(metadata, "Metadata must not be null!");
Assert.notNull(repositoryBaseClass, "RepositoryBaseClass must not be null!");
this.metadata = metadata;
this.repositoryBaseClass = repositoryBaseClass;
@ -146,7 +146,7 @@ class DefaultRepositoryInformation implements RepositoryInformation { @@ -146,7 +146,7 @@ class DefaultRepositoryInformation implements RepositoryInformation {
*/
private boolean isTargetClassMethod(Method method, Class<?> targetType) {
Assert.notNull(method);
Assert.notNull(method, "Method must not be null!");
if (targetType == null) {
return false;

2
src/main/java/org/springframework/data/repository/core/support/DelegatingEntityInformation.java

@ -38,7 +38,7 @@ public class DelegatingEntityInformation<T, ID extends Serializable> implements @@ -38,7 +38,7 @@ public class DelegatingEntityInformation<T, ID extends Serializable> implements
*/
public DelegatingEntityInformation(EntityInformation<T, ID> delegate) {
Assert.notNull(delegate);
Assert.notNull(delegate, "Delegate EnittyInformation must not be null!");
this.delegate = delegate;
}

2
src/main/java/org/springframework/data/repository/core/support/PropertiesBasedNamedQueries.java

@ -37,7 +37,7 @@ public class PropertiesBasedNamedQueries implements NamedQueries { @@ -37,7 +37,7 @@ public class PropertiesBasedNamedQueries implements NamedQueries {
* @param properties
*/
public PropertiesBasedNamedQueries(Properties properties) {
Assert.notNull(properties);
Assert.notNull(properties, "Properties must not be null!");
this.properties = properties;
}

2
src/main/java/org/springframework/data/repository/core/support/ReflectionEntityInformation.java

@ -58,7 +58,7 @@ public class ReflectionEntityInformation<T, ID extends Serializable> extends Abs @@ -58,7 +58,7 @@ public class ReflectionEntityInformation<T, ID extends Serializable> extends Abs
public ReflectionEntityInformation(Class<T> domainClass, final Class<? extends Annotation> annotation) {
super(domainClass);
Assert.notNull(annotation);
Assert.notNull(annotation, "Annotation must not be null!");
ReflectionUtils.doWithFields(domainClass, new FieldCallback() {
public void doWith(Field field) {

2
src/main/java/org/springframework/data/repository/core/support/RepositoryFactorySupport.java

@ -153,7 +153,7 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, @@ -153,7 +153,7 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware,
*/
public void addQueryCreationListener(QueryCreationListener<?> listener) {
Assert.notNull(listener);
Assert.notNull(listener, "Listener must not be null!");
this.queryPostProcessors.add(listener);
}

4
src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryProxyPostProcessor.java

@ -70,8 +70,8 @@ class TransactionalRepositoryProxyPostProcessor implements RepositoryProxyPostPr @@ -70,8 +70,8 @@ class TransactionalRepositoryProxyPostProcessor implements RepositoryProxyPostPr
public TransactionalRepositoryProxyPostProcessor(ListableBeanFactory beanFactory, String transactionManagerName,
boolean enableDefaultTransaction) {
Assert.notNull(beanFactory);
Assert.notNull(transactionManagerName);
Assert.notNull(beanFactory, "BeanFactory must not be null!");
Assert.notNull(transactionManagerName, "TransactionManagerName must not be null!");
this.beanFactory = beanFactory;
this.transactionManagerName = transactionManagerName;

4
src/main/java/org/springframework/data/repository/init/RepositoriesPopulatedEvent.java

@ -43,8 +43,8 @@ public class RepositoriesPopulatedEvent extends ApplicationEvent { @@ -43,8 +43,8 @@ public class RepositoriesPopulatedEvent extends ApplicationEvent {
super(populator);
Assert.notNull(populator);
Assert.notNull(repositories);
Assert.notNull(populator, "Populator must not be null!");
Assert.notNull(repositories, "Repositories must not be null!");
this.repositories = repositories;
}

4
src/main/java/org/springframework/data/repository/init/ResourceReaderRepositoryPopulator.java

@ -67,7 +67,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A @@ -67,7 +67,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A
*/
public ResourceReaderRepositoryPopulator(ResourceReader reader, ClassLoader classLoader) {
Assert.notNull(reader);
Assert.notNull(reader, "Reader must not be null!");
this.reader = reader;
this.classLoader = classLoader;
@ -82,7 +82,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A @@ -82,7 +82,7 @@ public class ResourceReaderRepositoryPopulator implements RepositoryPopulator, A
* @throws IOException
*/
public void setResourceLocation(String location) throws IOException {
Assert.hasText(location);
Assert.hasText(location, "Location must not be null!");
setResources(resolver.getResources(location));
}

2
src/main/java/org/springframework/data/repository/query/Parameter.java

@ -54,7 +54,7 @@ public class Parameter { @@ -54,7 +54,7 @@ public class Parameter {
*/
protected Parameter(MethodParameter parameter) {
Assert.notNull(parameter);
Assert.notNull(parameter, "MethodParameter must not be null!");
this.parameter = parameter;
this.parameterType = potentiallyUnwrapParameterType(parameter);

2
src/main/java/org/springframework/data/repository/query/Parameters.java

@ -60,7 +60,7 @@ public abstract class Parameters<S extends Parameters<S, T>, T extends Parameter @@ -60,7 +60,7 @@ public abstract class Parameters<S extends Parameters<S, T>, T extends Parameter
*/
public Parameters(Method method) {
Assert.notNull(method);
Assert.notNull(method, "Method must not be null!");
List<Class<?>> types = Arrays.asList(method.getParameterTypes());

4
src/main/java/org/springframework/data/repository/query/ParametersParameterAccessor.java

@ -42,8 +42,8 @@ public class ParametersParameterAccessor implements ParameterAccessor { @@ -42,8 +42,8 @@ public class ParametersParameterAccessor implements ParameterAccessor {
*/
public ParametersParameterAccessor(Parameters<?, ?> parameters, Object[] values) {
Assert.notNull(parameters);
Assert.notNull(values);
Assert.notNull(parameters, "Parameters must not be null!");
Assert.notNull(values, "Values must not be null!");
Assert.isTrue(parameters.getNumberOfParameters() == values.length, "Invalid number of parameters given!");

2
src/main/java/org/springframework/data/repository/query/QueryMethod.java

@ -87,7 +87,7 @@ public class QueryMethod { @@ -87,7 +87,7 @@ public class QueryMethod {
}
}
Assert.notNull(this.parameters);
Assert.notNull(this.parameters, String.format("Parameters extracted from method '%s' must not be null!", method.getName()));
if (isPageQuery()) {
Assert.isTrue(this.parameters.hasPageableParameter(),

2
src/main/java/org/springframework/data/repository/support/AnnotationAttribute.java

@ -50,7 +50,7 @@ class AnnotationAttribute { @@ -50,7 +50,7 @@ class AnnotationAttribute {
*/
public AnnotationAttribute(Class<? extends Annotation> annotationType, String attributeName) {
Assert.notNull(annotationType);
Assert.notNull(annotationType, "AnnotationType must not be null!");
this.annotationType = annotationType;
this.attributeName = attributeName;

4
src/main/java/org/springframework/data/repository/support/MethodParameters.java

@ -54,7 +54,7 @@ class MethodParameters { @@ -54,7 +54,7 @@ class MethodParameters {
*/
public MethodParameters(Method method, AnnotationAttribute namingAnnotation) {
Assert.notNull(method);
Assert.notNull(method, "Method must not be null!");
this.parameters = new ArrayList<MethodParameter>();
for (int i = 0; i < method.getParameterTypes().length; i++) {
@ -122,7 +122,7 @@ class MethodParameters { @@ -122,7 +122,7 @@ class MethodParameters {
*/
public List<MethodParameter> getParametersWith(Class<? extends Annotation> annotation) {
Assert.notNull(annotation);
Assert.notNull(annotation, "Annotation must not be null!");
List<MethodParameter> result = new ArrayList<MethodParameter>();
for (MethodParameter parameter : getParameters()) {

2
src/main/java/org/springframework/data/repository/support/Repositories.java

@ -72,7 +72,7 @@ public class Repositories implements Iterable<Class<?>> { @@ -72,7 +72,7 @@ public class Repositories implements Iterable<Class<?>> {
*/
public Repositories(ListableBeanFactory factory) {
Assert.notNull(factory);
Assert.notNull(factory, "Factory must not be null!");
this.beanFactory = factory;
this.repositoryFactoryInfos = new HashMap<Class<?>, RepositoryFactoryInformation<Object, Serializable>>();

4
src/main/java/org/springframework/data/util/AnnotationDetectionFieldCallback.java

@ -42,7 +42,7 @@ public class AnnotationDetectionFieldCallback implements FieldCallback { @@ -42,7 +42,7 @@ public class AnnotationDetectionFieldCallback implements FieldCallback {
*/
public AnnotationDetectionFieldCallback(Class<? extends Annotation> annotationType) {
Assert.notNull(annotationType);
Assert.notNull(annotationType, "AnnotationType must not be null!");
this.annotationType = annotationType;
}
@ -83,7 +83,7 @@ public class AnnotationDetectionFieldCallback implements FieldCallback { @@ -83,7 +83,7 @@ public class AnnotationDetectionFieldCallback implements FieldCallback {
@SuppressWarnings("unchecked")
public <T> T getValue(Object source) {
Assert.notNull(source);
Assert.notNull(source, "Source object must not be null!");
return field == null ? null : (T) ReflectionUtils.getField(field, source);
}
}

8
src/main/java/org/springframework/data/util/TypeDiscoverer.java

@ -91,8 +91,8 @@ class TypeDiscoverer<S> implements TypeInformation<S> { @@ -91,8 +91,8 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
*/
protected TypeDiscoverer(Type type, Map<TypeVariable<?>, Type> typeVariableMap) {
Assert.notNull(type);
Assert.notNull(typeVariableMap);
Assert.notNull(type, "Type must not be null!");
Assert.notNull(typeVariableMap, "TypeVariableMap must not be null!");
this.type = type;
this.typeVariableMap = typeVariableMap;
@ -447,7 +447,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> { @@ -447,7 +447,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
*/
public TypeInformation<?> getReturnType(Method method) {
Assert.notNull(method);
Assert.notNull(method, "Method must not be null!");
return createInfo(method.getGenericReturnType());
}
@ -532,7 +532,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> { @@ -532,7 +532,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
@Override
public TypeInformation<?> specialize(ClassTypeInformation<?> type) {
Assert.isTrue(getType().isAssignableFrom(type.getType()));
Assert.isTrue(getType().isAssignableFrom(type.getType()), String.format("%s must be assignable from %s", getType(), type.getType()));
List<TypeInformation<?>> arguments = getTypeArguments();

2
src/main/java/org/springframework/data/util/TypeVariableTypeInformation.java

@ -47,7 +47,7 @@ class TypeVariableTypeInformation<T> extends ParentTypeAwareTypeInformation<T> { @@ -47,7 +47,7 @@ class TypeVariableTypeInformation<T> extends ParentTypeAwareTypeInformation<T> {
Map<TypeVariable<?>, Type> typeVariableMap) {
super(variable, parent, typeVariableMap);
Assert.notNull(variable);
Assert.notNull(variable, "TypeVariable must not be null!");
this.variable = variable;
this.owningType = owningType;
}

6
src/main/java/org/springframework/data/util/Version.java

@ -42,8 +42,8 @@ public class Version implements Comparable<Version> { @@ -42,8 +42,8 @@ public class Version implements Comparable<Version> {
*/
public Version(int... parts) {
Assert.notNull(parts);
Assert.isTrue(parts.length > 0 && parts.length < 5);
Assert.notNull(parts, "Parts must not be null!");
Assert.isTrue(parts.length > 0 && parts.length < 5, String.format("Invalid parts length. 0 < %s < 5", parts.length));
this.major = parts[0];
this.minor = parts.length > 1 ? parts[1] : 0;
@ -64,7 +64,7 @@ public class Version implements Comparable<Version> { @@ -64,7 +64,7 @@ public class Version implements Comparable<Version> {
*/
public static Version parse(String version) {
Assert.hasText(version);
Assert.hasText(version, "Version must not be null o empty!");
String[] parts = version.trim().split("\\.");
int[] intParts = new int[parts.length];

2
src/main/java/org/springframework/data/web/SortHandlerMethodArgumentResolver.java

@ -64,7 +64,7 @@ public class SortHandlerMethodArgumentResolver implements SortArgumentResolver { @@ -64,7 +64,7 @@ public class SortHandlerMethodArgumentResolver implements SortArgumentResolver {
*/
public void setSortParameter(String sortParameter) {
Assert.hasText(sortParameter);
Assert.hasText(sortParameter, "SortParameter must not be null nor empty!");
this.sortParameter = sortParameter;
}

Loading…
Cancel
Save