@@ -22,6 +22,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @see TargetAwareIdentifierAccessor
|
||||
*/
|
||||
public interface IdentifierAccessor {
|
||||
@@ -51,6 +52,6 @@ public interface IdentifierAccessor {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Could not obtain identifier!");
|
||||
throw new IllegalStateException("Could not obtain identifier");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.util.Assert;
|
||||
* @author Patryk Wasik
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public interface PersistentEntity<T, P extends PersistentProperty<P>> extends Iterable<P> {
|
||||
|
||||
@@ -131,7 +132,7 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
|
||||
return property;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("Required identifier property not found for %s!", getType()));
|
||||
throw new IllegalStateException(String.format("Required identifier property not found for %s", getType()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,7 +160,7 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
|
||||
return property;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("Required version property not found for %s!", getType()));
|
||||
throw new IllegalStateException(String.format("Required version property not found for %s", getType()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,7 +187,7 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
|
||||
return property;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("Required property %s not found for %s!", name, getType()));
|
||||
throw new IllegalStateException(String.format("Required property %s not found for %s", name, getType()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -312,7 +313,7 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
|
||||
}
|
||||
|
||||
throw new IllegalStateException(
|
||||
String.format("Required annotation %s not found for %s!", annotationType, getType()));
|
||||
String.format("Required annotation %s not found for %s", annotationType, getType()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
* @author Mark Paluch
|
||||
* @author Jens Schauder
|
||||
* @author Christoph Strobl
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
|
||||
@@ -89,7 +90,7 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
Method getter = getGetter();
|
||||
|
||||
if (getter == null) {
|
||||
throw new IllegalArgumentException(String.format("No getter available for persistent property %s!", this));
|
||||
throw new IllegalArgumentException(String.format("No getter available for persistent property %s", this));
|
||||
}
|
||||
|
||||
return getter;
|
||||
@@ -109,7 +110,7 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
Method setter = getSetter();
|
||||
|
||||
if (setter == null) {
|
||||
throw new IllegalArgumentException(String.format("No setter available for persistent property %s!", this));
|
||||
throw new IllegalArgumentException(String.format("No setter available for persistent property %s", this));
|
||||
}
|
||||
|
||||
return setter;
|
||||
@@ -147,7 +148,7 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
Method wither = getWither();
|
||||
|
||||
if (wither == null) {
|
||||
throw new IllegalArgumentException(String.format("No wither available for persistent property %s!", this));
|
||||
throw new IllegalArgumentException(String.format("No wither available for persistent property %s", this));
|
||||
}
|
||||
|
||||
return wither;
|
||||
@@ -161,7 +162,7 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
Field field = getField();
|
||||
|
||||
if (field == null) {
|
||||
throw new IllegalArgumentException(String.format("No field backing persistent property %s!", this));
|
||||
throw new IllegalArgumentException(String.format("No field backing persistent property %s", this));
|
||||
}
|
||||
|
||||
return field;
|
||||
@@ -193,7 +194,7 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
return association;
|
||||
}
|
||||
|
||||
throw new IllegalStateException("No association found!");
|
||||
throw new IllegalStateException("No association found");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @since 1.10
|
||||
* @see PersistentEntity#getPropertyAccessor(Object)
|
||||
* @see ConvertingPropertyAccessor
|
||||
@@ -75,7 +76,7 @@ public interface PersistentPropertyAccessor<T> {
|
||||
|
||||
if (parent == null) {
|
||||
|
||||
String nullIntermediateMessage = "Cannot lookup property %s on null intermediate! Original path was: %s on %s.";
|
||||
String nullIntermediateMessage = "Cannot lookup property %s on null intermediate! Original path was: %s on %s";
|
||||
|
||||
throw new MappingException(
|
||||
String.format(nullIntermediateMessage, parentProperty, path.toDotPath(), getBean().getClass().getName()));
|
||||
@@ -151,7 +152,7 @@ public interface PersistentPropertyAccessor<T> {
|
||||
|
||||
if (current == null) {
|
||||
|
||||
String nullIntermediateMessage = "Cannot lookup property %s on null intermediate! Original path was: %s on %s.";
|
||||
String nullIntermediateMessage = "Cannot lookup property %s on null intermediate! Original path was: %s on %s";
|
||||
|
||||
throw new MappingException(
|
||||
String.format(nullIntermediateMessage, property, path.toDotPath(), bean.getClass().getName()));
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.springframework.lang.Nullable;
|
||||
* Abstraction of a path of {@link PersistentProperty}s.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public interface PersistentPropertyPath<P extends PersistentProperty<P>> extends Streamable<P> {
|
||||
|
||||
@@ -79,7 +80,7 @@ public interface PersistentPropertyPath<P extends PersistentProperty<P>> extends
|
||||
P property = getLeafProperty();
|
||||
|
||||
if (property == null) {
|
||||
throw new IllegalStateException("No leaf property found!");
|
||||
throw new IllegalStateException("No leaf property found");
|
||||
}
|
||||
|
||||
return property;
|
||||
|
||||
@@ -41,10 +41,11 @@ import org.springframework.util.StringUtils;
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Mariusz Mączkowski
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public class PropertyPath implements Streamable<PropertyPath> {
|
||||
|
||||
private static final String PARSE_DEPTH_EXCEEDED = "Trying to parse a path with depth greater than 1000! This has been disabled for security reasons to prevent parsing overflows.";
|
||||
private static final String PARSE_DEPTH_EXCEEDED = "Trying to parse a path with depth greater than 1000! This has been disabled for security reasons to prevent parsing overflows";
|
||||
|
||||
private static final String DELIMITERS = "_\\.";
|
||||
private static final Pattern SPLITTER = Pattern.compile("(?:[%s]?([%s]*?[^%s]+))".replaceAll("%s", DELIMITERS));
|
||||
@@ -300,7 +301,7 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
"No next path available! Clients should call hasNext() before invoking this method!");
|
||||
"No next path available! Clients should call hasNext() before invoking this method");
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -358,7 +359,7 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
|
||||
if (result == null) {
|
||||
throw new IllegalStateException(
|
||||
String.format("Expected parsing to yield a PropertyPath from %s but got null!", source));
|
||||
String.format("Expected parsing to yield a PropertyPath from %s but got null", source));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -21,6 +21,7 @@ package org.springframework.data.mapping;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @since 2.0
|
||||
* @soundtrack Anika Nilles - Greenfield (Pikalar)
|
||||
*/
|
||||
@@ -41,6 +42,6 @@ public abstract class TargetAwareIdentifierAccessor implements IdentifierAccesso
|
||||
return identifier;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("Could not obtain identifier from %s!", target));
|
||||
throw new IllegalStateException(String.format("Could not obtain identifier from %s", target));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.util.comparator.Comparators;
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @author Myeonghyeon Lee
|
||||
* @author Johannes Englmeier
|
||||
* @since 2.2
|
||||
*/
|
||||
class EntityCallbackDiscoverer {
|
||||
@@ -322,7 +323,7 @@ class EntityCallbackDiscoverer {
|
||||
}
|
||||
|
||||
throw new IllegalStateException(
|
||||
String.format("%s does not define a callback method accepting %s and %s additional arguments.",
|
||||
String.format("%s does not define a callback method accepting %s and %s additional arguments",
|
||||
ClassUtils.getShortName(callbackType), ClassUtils.getShortName(entityType), args.length));
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Graeme Rocher
|
||||
* @author Mark Paluch
|
||||
* @author Christoph Strobl
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public interface MappingContext<E extends PersistentEntity<?, P>, P extends PersistentProperty<P>> {
|
||||
|
||||
@@ -76,7 +77,7 @@ public interface MappingContext<E extends PersistentEntity<?, P>, P extends Pers
|
||||
return entity;
|
||||
}
|
||||
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for type %s!", type));
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for type %s", type));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +117,7 @@ public interface MappingContext<E extends PersistentEntity<?, P>, P extends Pers
|
||||
return entity;
|
||||
}
|
||||
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for type %s!", type));
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for type %s", type));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +150,7 @@ public interface MappingContext<E extends PersistentEntity<?, P>, P extends Pers
|
||||
return entity;
|
||||
}
|
||||
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for property %s!", persistentProperty));
|
||||
throw new MappingException(String.format("Couldn't find PersistentEntity for property %s", persistentProperty));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.util.Assert;
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @since 1.8
|
||||
*/
|
||||
public class PersistentEntities implements Streamable<PersistentEntity<?, ? extends PersistentProperty<?>>> {
|
||||
@@ -117,7 +118,7 @@ public class PersistentEntities implements Streamable<PersistentEntity<?, ? exte
|
||||
|
||||
return getPersistentEntity(type).orElseThrow(() -> {
|
||||
return new MappingException(String.format(
|
||||
"Cannot get or create PersistentEntity for type %s! PersistentEntities knows about %s MappingContext instances and therefore cannot identify a single responsible one. Please configure the initialEntitySet through an entity scan using the base package in your configuration to pre initialize contexts.",
|
||||
"Cannot get or create PersistentEntity for type %s! PersistentEntities knows about %s MappingContext instances and therefore cannot identify a single responsible one. Please configure the initialEntitySet through an entity scan using the base package in your configuration to pre initialize contexts",
|
||||
type.getName(), contexts.size()));
|
||||
});
|
||||
}
|
||||
@@ -253,7 +254,7 @@ public class PersistentEntities implements Streamable<PersistentEntity<?, ? exte
|
||||
|
||||
String message = "Found multiple entities identified by " + type.getType() + ": ";
|
||||
message += entities.stream().map(it -> it.getType().getName()).collect(Collectors.joining(", "));
|
||||
message += "! Introduce dedicated unique identifier types or explicitly define the target type in @Reference!";
|
||||
message += "! Introduce dedicated unique identifier types or explicitly define the target type in @Reference";
|
||||
|
||||
throw new IllegalStateException(message);
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Thomas Darimont
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implements MutablePersistentEntity<T, P> {
|
||||
|
||||
@@ -206,7 +207,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
throw new MappingException(
|
||||
String.format(
|
||||
"Attempt to add version property %s but already have property %s registered "
|
||||
+ "as version. Check your mapping configuration!",
|
||||
+ "as version. Check your mapping configuration",
|
||||
property.getField(), versionProperty.getField()));
|
||||
}
|
||||
|
||||
@@ -236,7 +237,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
|
||||
if (idProperty != null) {
|
||||
throw new MappingException(String.format("Attempt to add id property %s but already have property %s registered "
|
||||
+ "as id. Check your mapping configuration!", property.getField(), idProperty.getField()));
|
||||
+ "as id. Check your mapping configuration ", property.getField(), idProperty.getField()));
|
||||
}
|
||||
|
||||
return property;
|
||||
@@ -520,11 +521,11 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
public int compare(@Nullable Association<P> left, @Nullable Association<P> right) {
|
||||
|
||||
if (left == null) {
|
||||
throw new IllegalArgumentException("Left argument must not be null!");
|
||||
throw new IllegalArgumentException("Left argument must not be null");
|
||||
}
|
||||
|
||||
if (right == null) {
|
||||
throw new IllegalArgumentException("Right argument must not be null!");
|
||||
throw new IllegalArgumentException("Right argument must not be null");
|
||||
}
|
||||
|
||||
return delegate.compare(left.getInverse(), right.getInverse());
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
|
||||
@@ -80,7 +81,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
}
|
||||
|
||||
throw new UnsupportedOperationException(
|
||||
String.format("Cannot set immutable property %s.%s!", property.getOwner().getName(), property.getName()));
|
||||
String.format("Cannot set immutable property %s.%s ", property.getOwner().getName(), property.getName()));
|
||||
}
|
||||
|
||||
if (!property.usePropertyAccess()) {
|
||||
@@ -98,7 +99,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
ReflectionUtils.invokeMethod(setter, bean, value);
|
||||
|
||||
} catch (IllegalStateException e) {
|
||||
throw new MappingException("Could not set object property!", e);
|
||||
throw new MappingException("Could not set object property", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
|
||||
} catch (IllegalStateException e) {
|
||||
throw new MappingException(
|
||||
String.format("Could not read property %s of %s!", property.toString(), bean.toString()), e);
|
||||
String.format("Could not read property %s of %s", property.toString(), bean.toString()), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +169,7 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
|
||||
if (copy == null) {
|
||||
throw new UnsupportedOperationException(String.format(
|
||||
"Kotlin class %s has no .copy(…) method for property %s!", type.getName(), property.getName()));
|
||||
"Kotlin class %s has no .copy(…) method for property %s", type.getName(), property.getName()));
|
||||
}
|
||||
|
||||
return copy.callBy(getCallArgs(copy, property, bean, value));
|
||||
|
||||
@@ -64,6 +64,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @author Jens Schauder
|
||||
* @author Johannes Englmeier
|
||||
* @since 1.13
|
||||
*/
|
||||
public class ClassGeneratingPropertyAccessorFactory implements PersistentPropertyAccessorFactory {
|
||||
@@ -775,7 +776,7 @@ public class ClassGeneratingPropertyAccessorFactory implements PersistentPropert
|
||||
visitGetPropertySwitch(entity, persistentProperties, internalClassName, mv);
|
||||
|
||||
mv.visitLabel(l1);
|
||||
visitThrowUnsupportedOperationException(mv, "No accessor to get property %s!");
|
||||
visitThrowUnsupportedOperationException(mv, "No accessor to get property %s");
|
||||
|
||||
mv.visitLocalVariable(THIS_REF, referenceName(internalClassName), null, l0, l1, 0);
|
||||
mv.visitLocalVariable("property", referenceName(PERSISTENT_PROPERTY),
|
||||
@@ -938,7 +939,7 @@ public class ClassGeneratingPropertyAccessorFactory implements PersistentPropert
|
||||
Label l1 = new Label();
|
||||
mv.visitLabel(l1);
|
||||
|
||||
visitThrowUnsupportedOperationException(mv, "No accessor to set property %s!");
|
||||
visitThrowUnsupportedOperationException(mv, "No accessor to set property %s");
|
||||
|
||||
mv.visitLocalVariable(THIS_REF, referenceName(internalClassName), null, l0, l1, 0);
|
||||
mv.visitLocalVariable("property", "Lorg/springframework/data/mapping/PersistentProperty;",
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Oliver Drotbohm
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @since 2.3
|
||||
*/
|
||||
public class InstantiationAwarePropertyAccessor<T> implements PersistentPropertyAccessor<T> {
|
||||
@@ -98,7 +99,7 @@ public class InstantiationAwarePropertyAccessor<T> implements PersistentProperty
|
||||
|
||||
if (it.getName() == null) {
|
||||
throw new IllegalStateException(
|
||||
String.format("Cannot detect parameter names of copy creator of %s!", owner.getType()));
|
||||
String.format("Cannot detect parameter names of copy creator of %s", owner.getType()));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.lang.Nullable;
|
||||
*
|
||||
* @author Mark Paluch
|
||||
* @author Oliver Gierke
|
||||
* @author Johannes Englmeier
|
||||
* @since 2.0
|
||||
*/
|
||||
class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInstantiator {
|
||||
@@ -205,7 +206,7 @@ class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInsta
|
||||
@Nullable InstanceCreatorMetadata<P> entityCreator, ParameterValueProvider<P> provider) {
|
||||
|
||||
if (entityCreator == null) {
|
||||
throw new IllegalArgumentException("EntityCreator must not be null!");
|
||||
throw new IllegalArgumentException("EntityCreator must not be null");
|
||||
}
|
||||
|
||||
Object[] params = allocateArguments(synthetic.getParameterCount()
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Johannes Englmeier
|
||||
* @soundtrack Scary Pockets - Crash Into Me (Dave Matthews Band Cover feat. Julia Nunes) -
|
||||
* https://www.youtube.com/watch?v=syGlBNVGEqU
|
||||
*/
|
||||
@@ -60,7 +61,7 @@ class PersistentEntityIsNewStrategy implements IsNewStrategy {
|
||||
if (!ClassUtils.isAssignable(Number.class, type)) {
|
||||
|
||||
throw new IllegalArgumentException(String
|
||||
.format("Only numeric primitives are supported as identifier / version field types! Got: %s.", valueType));
|
||||
.format("Only numeric primitives are supported as identifier / version field types! Got: %s", valueType));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -104,6 +105,6 @@ class PersistentEntityIsNewStrategy implements IsNewStrategy {
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException(
|
||||
String.format("Could not determine whether %s is new! Unsupported identifier or version property!", entity));
|
||||
String.format("Could not determine whether %s is new! Unsupported identifier or version property", entity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.lang.Nullable;
|
||||
* expression evaluation.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Johannes Englmeier
|
||||
*/
|
||||
public class PersistentEntityParameterValueProvider<P extends PersistentProperty<P>>
|
||||
implements ParameterValueProvider<P> {
|
||||
@@ -57,14 +58,14 @@ public class PersistentEntityParameterValueProvider<P extends PersistentProperty
|
||||
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));
|
||||
}
|
||||
|
||||
P property = entity.getPersistentProperty(name);
|
||||
|
||||
if (property == null) {
|
||||
throw new MappingException(
|
||||
String.format("No property %s found on entity %s to bind constructor parameter to!", name, entity.getType()));
|
||||
String.format("No property %s found on entity %s to bind constructor parameter to", name, entity.getType()));
|
||||
}
|
||||
|
||||
return provider.getPropertyValue(property);
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.springframework.util.Assert;
|
||||
* property, the nested property will be set on all collection elements and map values.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Johannes Englmeier
|
||||
* @since 2.3
|
||||
* @soundtrack Ron Spielman - Nineth Song (Tip of My Tongue)
|
||||
*/
|
||||
@@ -249,7 +250,7 @@ class SimplePersistentPropertyPathAccessor<T> implements PersistentPropertyPathA
|
||||
}
|
||||
|
||||
if (!type.isInstance(value)) {
|
||||
throw new MappingException(String.format("Invalid property value type! Need %s but got %s!", //
|
||||
throw new MappingException(String.format("Invalid property value type! Need %s but got %s", //
|
||||
type.getName(), value.getClass().getName()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user