diff --git a/org.springframework.context/src/main/java/org/springframework/validation/SmartValidator.java b/org.springframework.context/src/main/java/org/springframework/validation/SmartValidator.java
index afb7fda442..7179f1e347 100644
--- a/org.springframework.context/src/main/java/org/springframework/validation/SmartValidator.java
+++ b/org.springframework.context/src/main/java/org/springframework/validation/SmartValidator.java
@@ -26,19 +26,18 @@ package org.springframework.validation;
public interface SmartValidator extends Validator {
/**
- * Validate the supplied target
object, which must be
- * of a {@link Class} for which the {@link #supports(Class)} method
- * typically has (or would) return true
.
- *
The supplied {@link Errors errors} instance can be used to report - * any resulting validation errors. - *
This variant of validate
supports validation hints,
- * such as validation groups against a JSR-303 provider (in this case,
- * the provided hint objects need to be annotation arguments of type Class).
- *
Note: Validation hints may get ignored by the actual target Validator, + * Validate the supplied {@code target} object, which must be of a {@link Class} for + * which the {@link #supports(Class)} method typically has (or would) return {@code true}. + *
The supplied {@link Errors errors} instance can be used to report any + * resulting validation errors. + *
This variant of {@code validate} supports validation hints, such as + * validation groups against a JSR-303 provider (in this case, the provided hint + * objects need to be annotation arguments of type {@code Class}). + *
Note: Validation hints may get ignored by the actual target {@code Validator},
* in which case this method is supposed to be behave just like its regular
* {@link #validate(Object, Errors)} sibling.
- * @param target the object that is to be validated (can be null
)
- * @param errors contextual state about the validation process (never null
)
+ * @param target the object that is to be validated (can be {@code null})
+ * @param errors contextual state about the validation process (never {@code null})
* @param validationHints one or more hint objects to be passed to the validation engine
* @see ValidationUtils
*/
diff --git a/org.springframework.context/src/main/java/org/springframework/validation/annotation/Validated.java b/org.springframework.context/src/main/java/org/springframework/validation/annotation/Validated.java
index 70da20211f..e1b2b0930d 100644
--- a/org.springframework.context/src/main/java/org/springframework/validation/annotation/Validated.java
+++ b/org.springframework.context/src/main/java/org/springframework/validation/annotation/Validated.java
@@ -58,6 +58,6 @@ public @interface Validated {
*
Other {@link org.springframework.validation.SmartValidator} implementations may * support class arguments in other ways as well. */ - Class[] value() default {}; + Class>[] value() default {}; } diff --git a/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java b/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java index 3ccf295ad4..52dee7a9c2 100644 --- a/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java +++ b/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/MethodValidationPostProcessor.java @@ -46,13 +46,15 @@ import org.springframework.validation.annotation.Validated; * *
Applicable methods have JSR-303 constraint annotations on their parameters * and/or on their return value (in the latter case specified at the method level, - * typically as inline annotation). + * typically as inline annotation), e.g.: * - *
E.g.: public @NotNull Object myValidMethod(@NotNull String arg1, @Max(10) int arg2)
+ *
+ * public @NotNull Object myValidMethod(@NotNull String arg1, @Max(10) int arg2) + ** *
Target classes with such annotated methods need to be annotated with Spring's * {@link Validated} annotation at the type level, for their methods to be searched for - * inline constraint annotations. Validation groups can be specified through {@link Validated} + * inline constraint annotations. Validation groups can be specified through {@code @Validated} * as well. By default, JSR-303 will validate against its default group only. * *
As of Spring 3.1, this functionality requires Hibernate Validator 4.2 or higher. @@ -64,6 +66,7 @@ import org.springframework.validation.annotation.Validated; * @see MethodValidationInterceptor * @see org.hibernate.validator.method.MethodValidator */ +@SuppressWarnings("serial") public class MethodValidationPostProcessor extends ProxyConfig implements BeanPostProcessor, BeanClassLoaderAware, Ordered, InitializingBean {