You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by GitBox <gi...@apache.org> on 2021/09/27 10:23:08 UTC

[GitHub] [struts] lukaszlenart opened a new pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

lukaszlenart opened a new pull request #499:
URL: https://github.com/apache/struts/pull/499


   Upgrades XStream and OVal
   [WW-5142](https://issues.apache.org/jira/browse/WW-5142)
   [WW-5143](https://issues.apache.org/jira/browse/WW-5143)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] [struts] lukaszlenart commented on a change in pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
lukaszlenart commented on a change in pull request #499:
URL: https://github.com/apache/struts/pull/499#discussion_r720306338



##########
File path: plugins/oval/src/test/java/org/apache/struts2/oval/interceptor/OValValidationInterceptorTest.java
##########
@@ -308,24 +296,12 @@ public void testMemberObject() throws Exception {
 
         Map<String, List<String>> fieldErrors = ((ValidationAware) baseActionProxy.getAction()).getFieldErrors();
         assertNotNull(fieldErrors);
-        assertEquals(5, fieldErrors.size()); // 5: as there will be field errors for 'person' and 'person.address' themselves
-        assertValue(fieldErrors, "person.name", Arrays.asList("name cannot be null"));
-        assertValue(fieldErrors, "person.email", Arrays.asList("email cannot be null"));
-        try {
-            // Oval version <= 1.40 validation error for invalid data reports: "net.sf.oval.constraint.AssertValid.violated".
-            assertValue(fieldErrors, "person.address", Arrays.asList("net.sf.oval.constraint.AssertValid.violated"));
-            // Oval version <= 1.40 validation error for minimum length reports: "street cannot be smaller than 7 characters".
-            assertValue(fieldErrors, "person.address.street", Arrays.asList("street cannot be smaller than 7 characters"));
-        } catch (AssertionFailedError afe) {
-            // Oval version >= 1.50 validation error for invalid data reports: "address is invalid".
-            assertValue(fieldErrors, "person.address", Arrays.asList("address is invalid"));
-            // Oval version >= 1.50 validation error for minimum length reports: "street cannot be shorter than 7 characters".
-            assertValue(fieldErrors, "person.address.street", Arrays.asList("street cannot be shorter than 7 characters"));
-        }
-
+        assertEquals(3, fieldErrors.size()); // 5: as there will be field errors for 'person' and 'person.address' themselves

Review comment:
       👍 

##########
File path: plugins/oval/src/test/java/org/apache/struts2/oval/interceptor/OValValidationInterceptorTest.java
##########
@@ -281,21 +280,10 @@ public void testModelDrivenAction() throws Exception {
 
         Map<String, List<String>> fieldErrors = ((ValidationAware) baseActionProxy.getAction()).getFieldErrors();
         assertNotNull(fieldErrors);
-        assertEquals(5, fieldErrors.size()); // 5: as there will be field errors for 'model' and 'address' themselves
-        assertValue(fieldErrors, "name", Arrays.asList("name cannot be null"));
-        assertValue(fieldErrors, "email", Arrays.asList("email cannot be null"));
-        try {
-            // Oval version <= 1.40 validation error for invalid data reports: "net.sf.oval.constraint.AssertValid.violated".
-            assertValue(fieldErrors, "address", Arrays.asList("net.sf.oval.constraint.AssertValid.violated"));
-            // Oval version <= 1.40 validation error for minimum length reports: "street cannot be smaller than 7 characters".
-            assertValue(fieldErrors, "address.street", Arrays.asList("street cannot be smaller than 7 characters"));
-        } catch (AssertionFailedError afe) {
-            // Oval version >= 1.50 validation error for invalid data reports: "address is invalid".
-            assertValue(fieldErrors, "address", Arrays.asList("address is invalid"));
-            // Oval version >= 1.50 validation error for minimum length reports: "street cannot be shorter than 7 characters".
-            assertValue(fieldErrors, "address.street", Arrays.asList("street cannot be shorter than 7 characters"));
-        }
-
+        assertEquals(3, fieldErrors.size()); // 5: as there will be field errors for 'model' and 'address' themselves

Review comment:
       👍 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [struts] yasserzamani commented on pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on pull request #499:
URL: https://github.com/apache/struts/pull/499#issuecomment-933270952


   Frankly I didn't completely understand all changes but tests show that it's operating as expected as before. LGTM :+1:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [struts] coveralls commented on pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #499:
URL: https://github.com/apache/struts/pull/499#issuecomment-927749655


   
   [![Coverage Status](https://coveralls.io/builds/43083618/badge)](https://coveralls.io/builds/43083618)
   
   Coverage increased (+0.01%) to 49.83% when pulling **8ab65d79ef0ca2baec359608f5180a6ea54fcb71 on WW-5142-oval** into **4cc23cc306e5e26666498053e06a12431a203fe6 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [struts] yasserzamani merged pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
yasserzamani merged pull request #499:
URL: https://github.com/apache/struts/pull/499


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[GitHub] [struts] yasserzamani commented on a change in pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
yasserzamani commented on a change in pull request #499:
URL: https://github.com/apache/struts/pull/499#discussion_r719277944



##########
File path: plugins/oval/src/test/java/org/apache/struts2/oval/interceptor/OValValidationInterceptorTest.java
##########
@@ -308,24 +296,12 @@ public void testMemberObject() throws Exception {
 
         Map<String, List<String>> fieldErrors = ((ValidationAware) baseActionProxy.getAction()).getFieldErrors();
         assertNotNull(fieldErrors);
-        assertEquals(5, fieldErrors.size()); // 5: as there will be field errors for 'person' and 'person.address' themselves
-        assertValue(fieldErrors, "person.name", Arrays.asList("name cannot be null"));
-        assertValue(fieldErrors, "person.email", Arrays.asList("email cannot be null"));
-        try {
-            // Oval version <= 1.40 validation error for invalid data reports: "net.sf.oval.constraint.AssertValid.violated".
-            assertValue(fieldErrors, "person.address", Arrays.asList("net.sf.oval.constraint.AssertValid.violated"));
-            // Oval version <= 1.40 validation error for minimum length reports: "street cannot be smaller than 7 characters".
-            assertValue(fieldErrors, "person.address.street", Arrays.asList("street cannot be smaller than 7 characters"));
-        } catch (AssertionFailedError afe) {
-            // Oval version >= 1.50 validation error for invalid data reports: "address is invalid".
-            assertValue(fieldErrors, "person.address", Arrays.asList("address is invalid"));
-            // Oval version >= 1.50 validation error for minimum length reports: "street cannot be shorter than 7 characters".
-            assertValue(fieldErrors, "person.address.street", Arrays.asList("street cannot be shorter than 7 characters"));
-        }
-
+        assertEquals(3, fieldErrors.size()); // 5: as there will be field errors for 'person' and 'person.address' themselves

Review comment:
       nitpick: // 5: in comment should be // 3:

##########
File path: plugins/oval/src/test/java/org/apache/struts2/oval/interceptor/OValValidationInterceptorTest.java
##########
@@ -281,21 +280,10 @@ public void testModelDrivenAction() throws Exception {
 
         Map<String, List<String>> fieldErrors = ((ValidationAware) baseActionProxy.getAction()).getFieldErrors();
         assertNotNull(fieldErrors);
-        assertEquals(5, fieldErrors.size()); // 5: as there will be field errors for 'model' and 'address' themselves
-        assertValue(fieldErrors, "name", Arrays.asList("name cannot be null"));
-        assertValue(fieldErrors, "email", Arrays.asList("email cannot be null"));
-        try {
-            // Oval version <= 1.40 validation error for invalid data reports: "net.sf.oval.constraint.AssertValid.violated".
-            assertValue(fieldErrors, "address", Arrays.asList("net.sf.oval.constraint.AssertValid.violated"));
-            // Oval version <= 1.40 validation error for minimum length reports: "street cannot be smaller than 7 characters".
-            assertValue(fieldErrors, "address.street", Arrays.asList("street cannot be smaller than 7 characters"));
-        } catch (AssertionFailedError afe) {
-            // Oval version >= 1.50 validation error for invalid data reports: "address is invalid".
-            assertValue(fieldErrors, "address", Arrays.asList("address is invalid"));
-            // Oval version >= 1.50 validation error for minimum length reports: "street cannot be shorter than 7 characters".
-            assertValue(fieldErrors, "address.street", Arrays.asList("street cannot be shorter than 7 characters"));
-        }
-
+        assertEquals(3, fieldErrors.size()); // 5: as there will be field errors for 'model' and 'address' themselves

Review comment:
       nitpick: // 5: in comment should be // 3:




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [struts] coveralls edited a comment on pull request #499: [WW-5143] [WW-5142] Upgrades OVal to ver. 3.2.1 and upgrades XStream to ver 1.4.18

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #499:
URL: https://github.com/apache/struts/pull/499#issuecomment-927749655


   
   [![Coverage Status](https://coveralls.io/builds/43214506/badge)](https://coveralls.io/builds/43214506)
   
   Coverage increased (+0.01%) to 49.83% when pulling **c1b48eb0ef47b7088d2c07255d81dac02a066862 on WW-5142-oval** into **4cc23cc306e5e26666498053e06a12431a203fe6 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@struts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org