From e99cda3739e462afc815388d12995c93fbc1dc47 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 15 Oct 2009 14:31:41 +0000 Subject: [PATCH] updated to final versions of JSR-330 and JSR-303 APIs --- .../resources/changelog.txt | 17 +- org.springframework.beans/ivy.xml | 2 +- org.springframework.context/context.iml | 9 +- org.springframework.context/ivy.xml | 7 +- org.springframework.context/pom.xml | 7 +- .../LocalValidatorFactoryBean.java | 10 +- .../beanvalidation/ValidatorFactoryTests.java | 7 +- org.springframework.web.servlet/ivy.xml | 4 +- org.springframework.web.servlet/pom.xml | 7 +- .../web-servlet.iml | 146 +++++++----------- spring-framework.ipr | 9 ++ 11 files changed, 115 insertions(+), 110 deletions(-) diff --git a/build-spring-framework/resources/changelog.txt b/build-spring-framework/resources/changelog.txt index 758aa16c4c..4e6e1c0e3f 100644 --- a/build-spring-framework/resources/changelog.txt +++ b/build-spring-framework/resources/changelog.txt @@ -3,11 +3,24 @@ SPRING FRAMEWORK CHANGELOG http://www.springsource.org -Changes in version 3.0.0.RC2 (2009-##-##) +Changes in version 3.0.0.RC2 (2009-10-30) ----------------------------------------- -* DataBinder now accepts var-args to set allowed, disallowed, and required fields +* updated to final versions of JSR-330 "javax.inject" and JSR-303 "javax.validation" APIs +* full compliance with the JSR-330 TCK (i.e. full compliance with the final specification) +* support for Hibernate Validator 4.0 GA (as the JSR-303 reference implementation) +* revised MethodParameter's annotation accessor methods +* PathMatchingResourcePatternResolver leniently ignores non-existing root directories +* DefaultConversionService understands "on"/"off", "yes"/"no", "1"/"0" as boolean values +* CustomEditorConfigurer supports PropertyEditor instances again (with deprecation warning) * ClassUtils is now parametrized with Class and Class where appropriate +* DataBinder now accepts var-args to set allowed, disallowed, and required fields +* DataBinder auto-grows nested paths on traversal (avoiding NullValueInNestedPathException) +* fixed enum binding regression with WebRequestDataBinder (as used by @MVC data binding now) +* fixed FieldError to expose rejected input value as String value instead of as array +* ContentNegotiatingViewResolver works with ignoreAcceptHeader and defaultContentType as well +* re-introduced Struts 1.x support ("org.springframework.web.struts") in deprecated form +* deprecated scheduling support for JDK 1.3 Timer ("org.springframework.scheduling.timer") Changes in version 3.0.0.RC1 (2009-09-25) diff --git a/org.springframework.beans/ivy.xml b/org.springframework.beans/ivy.xml index c0195e01ed..ca0f85d629 100644 --- a/org.springframework.beans/ivy.xml +++ b/org.springframework.beans/ivy.xml @@ -21,7 +21,7 @@ - + diff --git a/org.springframework.context/context.iml b/org.springframework.context/context.iml index ca85d7c64b..b94dd7b1c7 100644 --- a/org.springframework.context/context.iml +++ b/org.springframework.context/context.iml @@ -23,6 +23,7 @@ + @@ -140,22 +141,22 @@ - + - + - + - + diff --git a/org.springframework.context/ivy.xml b/org.springframework.context/ivy.xml index 062ba96d1d..b5f2837754 100644 --- a/org.springframework.context/ivy.xml +++ b/org.springframework.context/ivy.xml @@ -35,10 +35,10 @@ - + - + @@ -55,13 +55,14 @@ + - + diff --git a/org.springframework.context/pom.xml b/org.springframework.context/pom.xml index 25b061d386..325753ec50 100644 --- a/org.springframework.context/pom.xml +++ b/org.springframework.context/pom.xml @@ -45,7 +45,8 @@ javax.inject - com.springsource.javax.inject + javax.inject + 1.0 provided @@ -63,7 +64,7 @@ javax.validation validation-api - 1.0.CR3 + 1.0.GA provided @@ -193,7 +194,7 @@ org.hibernate hibernate-validator - 4.0.0.Beta2 + 4.0.0.GA test diff --git a/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java b/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java index b7c9496f06..da59c63f8d 100644 --- a/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java +++ b/org.springframework.context/src/main/java/org/springframework/validation/beanvalidation/LocalValidatorFactoryBean.java @@ -57,7 +57,7 @@ import org.springframework.util.CollectionUtils; * @see javax.validation.ValidatorFactory#getValidator() */ public class LocalValidatorFactoryBean extends SpringValidatorAdapter - implements ValidatorFactory, Validator, ApplicationContextAware, InitializingBean { + implements ValidatorFactory, ApplicationContextAware, InitializingBean { private Class providerClass; @@ -208,4 +208,12 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter return this.validatorFactory.getMessageInterpolator(); } + public TraversableResolver getTraversableResolver() { + return this.validatorFactory.getTraversableResolver(); + } + + public ConstraintValidatorFactory getConstraintValidatorFactory() { + return this.validatorFactory.getConstraintValidatorFactory(); + } + } diff --git a/org.springframework.context/src/test/java/org/springframework/validation/beanvalidation/ValidatorFactoryTests.java b/org.springframework.context/src/test/java/org/springframework/validation/beanvalidation/ValidatorFactoryTests.java index e1bf2d0099..7816ea683d 100644 --- a/org.springframework.context/src/test/java/org/springframework/validation/beanvalidation/ValidatorFactoryTests.java +++ b/org.springframework.context/src/test/java/org/springframework/validation/beanvalidation/ValidatorFactoryTests.java @@ -24,14 +24,13 @@ import java.util.Arrays; import java.util.Iterator; import java.util.Set; import javax.validation.Constraint; -import javax.validation.ConstraintPayload; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import javax.validation.ConstraintViolation; import javax.validation.Valid; import javax.validation.constraints.NotNull; -import org.hibernate.validation.HibernateValidationProvider; +import org.hibernate.validator.HibernateValidator; import static org.junit.Assert.*; import org.junit.Test; @@ -66,7 +65,7 @@ public class ValidatorFactoryTests { @Test public void testSimpleValidationWithCustomProvider() throws Exception { LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean(); - validator.setProviderClass(HibernateValidationProvider.class); + validator.setProviderClass(HibernateValidator.class); validator.afterPropertiesSet(); ValidPerson person = new ValidPerson(); Set> result = validator.validate(person); @@ -182,7 +181,7 @@ public class ValidatorFactoryTests { Class[] groups() default {}; - Class[] payload() default {}; + Class[] payload() default {}; } diff --git a/org.springframework.web.servlet/ivy.xml b/org.springframework.web.servlet/ivy.xml index 824b0801b3..f8b14152de 100644 --- a/org.springframework.web.servlet/ivy.xml +++ b/org.springframework.web.servlet/ivy.xml @@ -97,8 +97,8 @@ - - + + diff --git a/org.springframework.web.servlet/pom.xml b/org.springframework.web.servlet/pom.xml index 4a8942b00c..9ba10dc925 100644 --- a/org.springframework.web.servlet/pom.xml +++ b/org.springframework.web.servlet/pom.xml @@ -280,13 +280,14 @@ javax.validation - com.springsource.javax.validation - 1.0.0.CR3 + validation-api + 1.0.GA + provided org.hibernate hibernate-validator - 4.0.0.Beta2 + 4.0.0.GA test diff --git a/org.springframework.web.servlet/web-servlet.iml b/org.springframework.web.servlet/web-servlet.iml index 4cdaff2679..9d2fef1564 100644 --- a/org.springframework.web.servlet/web-servlet.iml +++ b/org.springframework.web.servlet/web-servlet.iml @@ -20,8 +20,11 @@ + + + @@ -37,295 +40,262 @@ - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -341,31 +311,33 @@ - + - + + + - + - + - + - + diff --git a/spring-framework.ipr b/spring-framework.ipr index 44f1b65eaf..a7ccbe06ca 100644 --- a/spring-framework.ipr +++ b/spring-framework.ipr @@ -981,6 +981,15 @@ + + + + + + + + + -- GitLab