incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r946346 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
Date Wed, 19 May 2010 19:16:59 GMT
Author: dwoods
Date: Wed May 19 19:16:59 2010
New Revision: 946346

URL: http://svn.apache.org/viewvc?rev=946346&view=rev
Log:
BVAL-49 ValidationException must be thrown in case ConstraintValidatorFactory returns null
for a valid getInstance call.  Contributed by Carlos Vara.

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java?rev=946346&r1=946345&r2=946346&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/Jsr303MetaBeanFactory.java
Wed May 19 19:16:59 2010
@@ -407,6 +407,9 @@ public class Jsr303MetaBeanFactory imple
             checkOneType(assignableTypes, type, owner, annotation, access);
             validator = getConstraintValidatorFactory()
                   .getInstance(validatorTypes.get(assignableTypes.get(0)));
+            if ( validator == null ) {
+                throw new ValidationException("Factory returned null validator for: " + validatorTypes.get(assignableTypes.get(0)));
+            }
             // NOTE: validator initialization deferred until append phase
         } else {
             validator = null;



Mime
View raw message