bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1614433 - in /bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr: ApacheValidatorConfiguration.java ConfigurationImpl.java DefaultConstraintValidatorFactory.java
Date Tue, 29 Jul 2014 17:42:02 GMT
Author: rmannibucau
Date: Tue Jul 29 17:42:01 2014
New Revision: 1614433

URL: http://svn.apache.org/r1614433
Log:
no need of Properties.EXECUTABLE_VALIDATION_TYPES + NPE protection

Modified:
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorConfiguration.java
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConfigurationImpl.java
    bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/DefaultConstraintValidatorFactory.java

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorConfiguration.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorConfiguration.java?rev=1614433&r1=1614432&r2=1614433&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorConfiguration.java
(original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ApacheValidatorConfiguration.java
Tue Jul 29 17:42:01 2014
@@ -87,7 +87,5 @@ public interface ApacheValidatorConfigur
          * </ol>
          */
          String METABEAN_FACTORY_CLASSNAMES = "apache.bval.metabean-factory-classnames";
-
-        String EXECUTABLE_VALIDATION_TYPES = "apache.bval.executable-validation.types";
     }
 }

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConfigurationImpl.java?rev=1614433&r1=1614432&r2=1614433&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConfigurationImpl.java
(original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/ConfigurationImpl.java
Tue Jul 29 17:42:01 2014
@@ -333,11 +333,6 @@ public class ConfigurationImpl implement
         createBootstrapConfiguration();
         parser.applyConfigWithInstantiation(this); // instantiate the config if needed
 
-        // TODO: maybe find a better way to communicate between validator factory and config
-        if (getBootstrapConfiguration().isExecutableValidationEnabled()) {
-            getProperties().put(Properties.EXECUTABLE_VALIDATION_TYPES, executableValidationTypesAsString());
-        }
-
         prepared = true;
         return this;
     }

Modified: bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/DefaultConstraintValidatorFactory.java
URL: http://svn.apache.org/viewvc/bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/DefaultConstraintValidatorFactory.java?rev=1614433&r1=1614432&r2=1614433&view=diff
==============================================================================
--- bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/DefaultConstraintValidatorFactory.java
(original)
+++ bval/branches/bval-11/bval-jsr/src/main/java/org/apache/bval/jsr/DefaultConstraintValidatorFactory.java
Tue Jul 29 17:42:01 2014
@@ -63,7 +63,9 @@ public class DefaultConstraintValidatorF
             if (useCdi) {
                 try {
                     final BValExtension.Releasable<T> instance = BValExtension.inject(constraintClass);
-                    releasables.add(instance);
+                    if (instance != null) {
+                        releasables.add(instance);
+                    }
                     return instance.getInstance();
                 } catch (final Exception e) {
                     return constraintClass.newInstance();



Mime
View raw message