DATACMNS-985 - Remove references to single-argument assertion methods.
This commit is contained in:
committed by
Oliver Gierke
parent
49817278b7
commit
3e048a6dca
@@ -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>> {
|
||||
*/
|
||||
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>> {
|
||||
*/
|
||||
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>> {
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
@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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
*/
|
||||
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 {
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user