bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1765894 - /bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
Date Thu, 20 Oct 2016 22:08:45 GMT
Author: mbenson
Date: Thu Oct 20 22:08:45 2016
New Revision: 1765894

URL: http://svn.apache.org/viewvc?rev=1765894&view=rev
Log:
cleanup

Modified:
    bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java

Modified: bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java
URL: http://svn.apache.org/viewvc/bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java?rev=1765894&r1=1765893&r2=1765894&view=diff
==============================================================================
--- bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java (original)
+++ bval/trunk/bval-jsr/src/test/java/org/apache/bval/jsr/ComposedConstraintsTest.java Thu
Oct 20 22:08:45 2016
@@ -48,17 +48,15 @@ public class ComposedConstraintsTest ext
         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