incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1005252 - /incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java
Date Wed, 06 Oct 2010 21:05:00 GMT
Author: mbenson
Date: Wed Oct  6 21:05:00 2010
New Revision: 1005252

URL: http://svn.apache.org/viewvc?rev=1005252&view=rev
Log:
return null for PropertyDescriptors that are not cascaded and have no validations

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java?rev=1005252&r1=1005251&r2=1005252&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303d/src/main/java/org/apache/bval/jsr303/dynamic/DynamicClassValidator.java
Wed Oct  6 21:05:00 2010
@@ -176,6 +176,10 @@ public class DynamicClassValidator exten
                     propertyType = validationContext.getMetaBean().getBeanClass();
                     validations = validationContext.getMetaBean().getValidations();
                 }
+                // If no constraints and not cascaded, return null
+                if (validations.length == 0 && !cascaded) {
+                    return null;
+                }
                 return new DynamicPropertyDescriptorImpl(metaBean, propertyName, propertyType,
cascaded, validations);
             } finally {
                 factoryContext().clearValidationState();



Mime
View raw message