@@ -72,7 +72,7 @@ class EvaluationContextExtensionInformation {
|
||||
*/
|
||||
public EvaluationContextExtensionInformation(Class<? extends EvaluationContextExtension> type) {
|
||||
|
||||
Assert.notNull(type, "Extension type must not be null!");
|
||||
Assert.notNull(type, "Extension type must not be null");
|
||||
|
||||
Class<?> rootObjectType = org.springframework.data.util.ReflectionUtils.findRequiredMethod(type, "getRootObject")
|
||||
.getReturnType();
|
||||
@@ -154,7 +154,7 @@ class EvaluationContextExtensionInformation {
|
||||
*/
|
||||
public ExtensionTypeInformation(Class<? extends EvaluationContextExtension> type) {
|
||||
|
||||
Assert.notNull(type, "Extension type must not be null!");
|
||||
Assert.notNull(type, "Extension type must not be null");
|
||||
|
||||
this.functions = discoverDeclaredFunctions(type);
|
||||
this.properties = discoverDeclaredProperties(type);
|
||||
@@ -256,7 +256,7 @@ class EvaluationContextExtensionInformation {
|
||||
*/
|
||||
RootObjectInformation(Class<?> type) {
|
||||
|
||||
Assert.notNull(type, "Type must not be null!");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
this.accessors = new HashMap<>();
|
||||
this.methods = new Methods();
|
||||
|
||||
@@ -209,7 +209,7 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
*/
|
||||
public ExtensionAwarePropertyAccessor(Collection<? extends EvaluationContextExtension> extensions) {
|
||||
|
||||
Assert.notNull(extensions, "Extensions must not be null!");
|
||||
Assert.notNull(extensions, "Extensions must not be null");
|
||||
|
||||
this.adapters = toAdapters(extensions);
|
||||
this.adapterMap = adapters.stream()//
|
||||
@@ -368,8 +368,8 @@ public class ExtensionAwareEvaluationContextProvider implements EvaluationContex
|
||||
public EvaluationContextExtensionAdapter(EvaluationContextExtension extension,
|
||||
EvaluationContextExtensionInformation information) {
|
||||
|
||||
Assert.notNull(extension, "Extension must not be null!");
|
||||
Assert.notNull(information, "Extension information must not be null!");
|
||||
Assert.notNull(extension, "Extension must not be null");
|
||||
Assert.notNull(information, "Extension information must not be null");
|
||||
|
||||
Optional<Object> target = Optional.ofNullable(extension.getRootObject());
|
||||
EvaluationContextExtensionInformation.ExtensionTypeInformation extensionTypeInformation = information
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.MultiValueMap;
|
||||
class Functions {
|
||||
|
||||
private static final String MESSAGE_TEMPLATE = "There are multiple matching methods of name '%s' for parameter types (%s), but no "
|
||||
+ "exact match. Make sure to provide only one matching overload or one with exactly those types.";
|
||||
+ "exact match; Make sure to provide only one matching overload or one with exactly those types";
|
||||
|
||||
private final MultiValueMap<String, Function> functions = new LinkedMultiValueMap<>();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Function {
|
||||
|
||||
this(method, null);
|
||||
|
||||
Assert.isTrue(Modifier.isStatic(method.getModifiers()), "Method must be static!");
|
||||
Assert.isTrue(Modifier.isStatic(method.getModifiers()), "Method must be static");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,9 +62,9 @@ public class Function {
|
||||
*/
|
||||
public Function(Method method, @Nullable Object target) {
|
||||
|
||||
Assert.notNull(method, "Method must not be null!");
|
||||
Assert.notNull(method, "Method must not be null");
|
||||
Assert.isTrue(target != null || Modifier.isStatic(method.getModifiers()),
|
||||
"Method must either be static or a non-static one with a target object!");
|
||||
"Method must either be static or a non-static one with a target object");
|
||||
|
||||
this.method = method;
|
||||
this.target = target;
|
||||
|
||||
Reference in New Issue
Block a user