incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romanst...@apache.org
Subject svn commit: r956874 - in /incubator/bval/trunk: bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
Date Tue, 22 Jun 2010 13:07:53 GMT
Author: romanstumm
Date: Tue Jun 22 13:07:53 2010
New Revision: 956874

URL: http://svn.apache.org/viewvc?rev=956874&view=rev
Log:
BVAL-47 edited javadoc and TODOs

Modified:
    incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java

Modified: incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java?rev=956874&r1=956873&r2=956874&view=diff
==============================================================================
--- incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java
(original)
+++ incubator/bval/trunk/bval-core/src/main/java/org/apache/bval/AbstractBeanValidator.java
Tue Jun 22 13:07:53 2010
@@ -207,5 +207,5 @@ public abstract class AbstractBeanValida
         validateBeanInContext(context);
       }
     }
-  }
+  }  
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java?rev=956874&r1=956873&r2=956874&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ClassValidator.java
Tue Jun 22 13:07:53 2010
@@ -57,7 +57,6 @@ public class ClassValidator extends Abst
   protected final GroupsComputer groupsComputer = new GroupsComputer();
 
   public ClassValidator(ApacheFactoryContext factoryContext) {
-//        super(factoryContext.getMetaBeanFinder());
     this.factoryContext = factoryContext;
   }
 
@@ -124,8 +123,6 @@ public class ClassValidator extends Abst
    * <p/>
    * Special code is present to manage the {@link Default} group.
    * <p/>
-   * TODO: More descriptive name and don't override method from BeanValidator.
-   *
    * @param vcontext The current context of this validation call.
    */
   @Override
@@ -161,7 +158,7 @@ public class ClassValidator extends Abst
         Group currentGroup = context.getCurrentGroup();
         for (Group each : defaultGroups) {
           context.setCurrentGroup(each);
-          super.validateBean(context);
+          validateBean(context);
           // Spec 3.4.3 - Stop validation if errors already found
           if (result.violationsSize() > numViolations) {
             break;
@@ -190,7 +187,7 @@ public class ClassValidator extends Abst
               context.getMetaBean().getFeature("{GroupSequence:" + owner.getCanonicalName()
+ "}");
           for (Group each : ownerDefaultGroups) {
             context.setCurrentGroup(each);
-            super.validateBean(context);
+            validateBean(context);
             // Spec 3.4.3 - Stop validation if errors already found
             if (result.violationsSize() > numViolations) {
               break;
@@ -206,7 +203,7 @@ public class ClassValidator extends Abst
     }
     // if not the default group, proceed as normal
     else {
-      super.validateBean(context);
+      validateBean(context);
     }
 
 
@@ -218,27 +215,13 @@ public class ClassValidator extends Abst
   }
 
   /**
-   * TODO: Currently, almost the same code as super.validateRelatedBean, but
-   * as it is being called at a different time, I have explicitly added the
-   * code here with a different method name.
+   * validate the related beans that are cascadable.
    *
    * @param context The current context
    * @param prop    The property to cascade from (in case it is possible).
    */
   private void validateCascadedBean(GroupValidationContext<?> context, MetaProperty
prop) {
     AccessStrategy[] access = prop.getFeature(Features.Property.REF_CASCADE);
-//      TODO: Delete, never reached in JSR-303 validations
-//        if (access == null && prop.getMetaBean() != null) { // single property
access strategy
-//            System.out.println("\n\n ### UNEXPECTED REACH ### \n\n");
-//            // save old values from context
-//            final Object bean = context.getBean();
-//            final MetaBean mbean = context.getMetaBean();
-//            // modify context state for relationship-target bean
-//            context.moveDown(prop, new PropertyAccess(bean.getClass(), prop.getName()));
-//            followCascadedConstraint(context);
-//            // restore old values in context
-//            context.moveUp(bean, mbean);
-//        } else
     if (access != null) { // different accesses to relation
       // save old values from context
       final Object bean = context.getBean();



Mime
View raw message