openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r796331 - in /openjpa/trunk: ./ openjpa-integration/validation/ openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/
Date Tue, 21 Jul 2009 15:03:18 GMT
Author: dwoods
Date: Tue Jul 21 15:03:18 2009
New Revision: 796331

URL: http://svn.apache.org/viewvc?rev=796331&view=rev
Log:
OPENJPA-1177 Upgraded to use geronimo-validation_1.0_spec-1.0-EA3-SNAPSHOT (1.0.CR3 API level)
and to use hibernate RI as the default Bean Validation provider for integration tests.

Modified:
    openjpa/trunk/openjpa-integration/validation/pom.xml
    openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestValidationGroups.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java
    openjpa/trunk/pom.xml

Modified: openjpa/trunk/openjpa-integration/validation/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/pom.xml?rev=796331&r1=796330&r2=796331&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/validation/pom.xml (original)
+++ openjpa/trunk/openjpa-integration/validation/pom.xml Tue Jul 21 15:03:18 2009
@@ -52,11 +52,10 @@
     </properties>
 
     <profiles>
-        <!-- Default profile for testing with Agimatec validation provider -->
+        <!-- Profile for testing with Agimatec validation provider -->
         <profile>
             <id>agimatec</id>
             <activation>
-                <activeByDefault>true</activeByDefault>
                 <property>
                     <name>agimatec</name>
                 </property>
@@ -79,7 +78,7 @@
                 <dependency>
                     <groupId>com.agimatec</groupId>
                     <artifactId>agimatec-jsr303</artifactId>
-                    <version>0.9.1-SNAPSHOT</version>
+                    <version>0.9.2-SNAPSHOT</version>
                     <scope>test</scope>
                     <exclusions>
                         <!-- force usage of the geronimo-validation_1.0_spec -->
@@ -97,7 +96,7 @@
                 <dependency>
                     <groupId>com.agimatec</groupId>
                     <artifactId>agimatec-validation</artifactId>
-                    <version>0.9.1-SNAPSHOT</version>
+                    <version>0.9.2-SNAPSHOT</version>
                     <scope>test</scope>
                 </dependency>
                 <dependency>
@@ -125,28 +124,27 @@
             </repositories>
         </profile>
 
-        <!-- Profile for testing with Hibernate Bean Validation RI -->
+        <!-- Default profile for testing with Hibernate Bean Validation RI -->
         <profile>
             <id>hibernate</id>
             <activation>
+                <activeByDefault>true</activeByDefault>
                 <property>
                     <name>hibernate</name>
                 </property>
             </activation>
             <dependencies>
-                <!-- Latest matching BV RI versions from 20090427 -->
                 <dependency>
                     <groupId>javax.validation</groupId>
                     <artifactId>validation-api</artifactId>
-                    <version>1.0.CR2</version>
-                    <!-- <version>1.0.CR3</version> -->
+                    <version>1.0.CR3</version>
                     <scope>test</scope>
                 </dependency>
+                <!-- Hibernate that implements 1.0.CR3 -->
                 <dependency>
                     <groupId>org.hibernate</groupId>
                     <artifactId>hibernate-validator</artifactId>
-                    <version>4.0.0.Beta1</version>
-                    <!-- <version>4.0.0.Beta2-SNAPSHOT</version> -->
+                    <version>4.0.0.Beta2</version>
                     <scope>test</scope>
                     <exclusions>
                         <!-- force usage of the geronimo-jpa_2.0_spec -->

Modified: openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestValidationGroups.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestValidationGroups.java?rev=796331&r1=796330&r2=796331&view=diff
==============================================================================
--- openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestValidationGroups.java
(original)
+++ openjpa/trunk/openjpa-integration/validation/src/test/java/org/apache/openjpa/integration/validation/TestValidationGroups.java
Tue Jul 21 15:03:18 2009
@@ -25,6 +25,8 @@
 
 import javax.validation.ConstraintViolation;
 import javax.validation.ConstraintViolationException;
+import javax.validation.Path;
+import javax.validation.Path.Node;
 
 import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.persistence.OpenJPAEntityManager;
@@ -602,7 +604,7 @@
 
     private void checkCVE(ConstraintViolationException e,
         String... vioProperties) {
-        Set<?>cvs = e.getConstraintViolations();
+        Set<ConstraintViolation<?>>cvs = e.getConstraintViolations();
         if (vioProperties.length == 0 && cvs == null)
             return;
         assertEquals(vioProperties.length, cvs.size());
@@ -612,8 +614,7 @@
             ConstraintViolation<?> v = (ConstraintViolation<?>)i.next();
             boolean found = false;
             for (String vio : vioProperties) {
-                // TODO - getPropertyPath() will return a Path in future APIs
-                if (v.getPropertyPath().compareTo(vio) == 0) {
+                if (v.getPropertyPath().toString().compareTo(vio) == 0) {
                     found = true;
                     break;
                 }

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java?rev=796331&r1=796330&r2=796331&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidatorImpl.java
Tue Jul 21 15:03:18 2009
@@ -23,7 +23,7 @@
 import java.util.Set;
 
 import javax.persistence.ValidationMode;
-import javax.validation.BeanDescriptor;
+import javax.validation.metadata.BeanDescriptor;
 import javax.validation.ConstraintViolation;
 import javax.validation.ConstraintViolationException;
 import javax.validation.Validation;

Modified: openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/pom.xml?rev=796331&r1=796330&r2=796331&view=diff
==============================================================================
--- openjpa/trunk/pom.xml (original)
+++ openjpa/trunk/pom.xml Tue Jul 21 15:03:18 2009
@@ -507,7 +507,7 @@
             <dependency>
                 <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>geronimo-validation_1.0_spec</artifactId>
-                <version>1.0-EA-SNAPSHOT</version>
+                <version>1.0-EA3-SNAPSHOT</version>
             </dependency>            
             <dependency>
                 <groupId>org.apache.derby</groupId>



Mime
View raw message