bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject [18/51] [abbrv] bval git commit: cleanup
Date Fri, 03 Nov 2017 22:27:43 GMT
cleanup


Project: http://git-wip-us.apache.org/repos/asf/bval/repo
Commit: http://git-wip-us.apache.org/repos/asf/bval/commit/1071590f
Tree: http://git-wip-us.apache.org/repos/asf/bval/tree/1071590f
Diff: http://git-wip-us.apache.org/repos/asf/bval/diff/1071590f

Branch: refs/heads/master
Commit: 1071590fc7243e2f8a0e5aa411d8cc585d9e8890
Parents: 7463f35
Author: Matt Benson <mbenson@apache.org>
Authored: Thu Oct 20 22:08:45 2016 +0000
Committer: Matt Benson <mbenson@apache.org>
Committed: Thu Oct 20 22:08:45 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/bval/jsr/ComposedConstraintsTest.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bval/blob/1071590f/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
----------------------------------------------------------------------
diff --git a/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java b/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
index 49b2465..b985d71 100644
--- a/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
+++ b/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
@@ -48,17 +48,15 @@ public class ComposedConstraintsTest extends ValidationTestBase {
         for (ConstraintDescriptor<?> cd : ed.getConstraintDescriptors()) {
             assertTrue(cd.isReportAsSingleViolation());
             assertEquals(3, cd.getComposingConstraints().size());
-            assertTrue("no composing constraints found!!",
-                  !cd.getComposingConstraints().isEmpty());
-            processConstraintDescriptor(cd); //check all constraints on zip code
+            assertTrue("no composing constraints found!!", !cd.getComposingConstraints().isEmpty());
+            processConstraintDescriptor(cd); // check all constraints on zip code
         }
     }
 
     private void processConstraintDescriptor(ConstraintDescriptor<?> cd) {
         //Size.class is understood by the tool
-        if (cd.getAnnotation().annotationType().equals(Size.class)) {
-            @SuppressWarnings("unused")
-            Size m = (Size) cd.getAnnotation();//what for?
+        if (Size.class.equals(cd.getAnnotation().annotationType())) {
+            Size.class.cast(cd.getAnnotation());
         }
         for (ConstraintDescriptor<?> composingCd : cd.getComposingConstraints()) {
             //check composing constraints recursively


Mime
View raw message