bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [bval] 08/16: code audit & get to the point
Date Mon, 10 Jun 2019 05:02:22 GMT
This is an automated email from the ASF dual-hosted git repository.

rmannibucau pushed a commit to tag 0.5
in repository https://gitbox.apache.org/repos/asf/bval.git

commit 5f29124b5ad5245fb7fa792e488565b839284dd6
Author: mbenson <mbenson@13f79535-47bb-0310-9956-ffa450edef68>
AuthorDate: Sun Sep 16 17:48:11 2012 +0000

    code audit & get to the point
    
    git-svn-id: http://svn.apache.org/repos/asf/bval/trunk@1385328 13f79535-47bb-0310-9956-ffa450edef68
---
 .../main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
b/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
index be6da46..ac5b8e8 100644
--- a/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
+++ b/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
@@ -35,7 +35,6 @@ import javax.validation.Validation;
 import javax.validation.ValidationException;
 import javax.validation.Validator;
 import javax.validation.ValidatorFactory;
-import javax.validation.bootstrap.ProviderSpecificBootstrap;
 import javax.validation.spi.ConfigurationState;
 
 import org.apache.bval.jsr303.xml.AnnotationIgnores;
@@ -65,6 +64,7 @@ public class ApacheValidatorFactory implements ValidatorFactory, Cloneable
{
     private final AnnotationIgnores annotationIgnores = new AnnotationIgnores();
     private final ConstraintCached constraintsCache = new ConstraintCached();
     private final Map<Class<?>, Class<?>[]> defaultSequences;
+
     /**
      * access strategies for properties with cascade validation @Valid support
      */
@@ -78,11 +78,9 @@ public class ApacheValidatorFactory implements ValidatorFactory, Cloneable
{
      */
     public static synchronized ApacheValidatorFactory getDefault() {
         if (DEFAULT_FACTORY == null) {
-            ProviderSpecificBootstrap<ApacheValidatorConfiguration> provider =
-                    Validation.byProvider(ApacheValidationProvider.class);
-            ApacheValidatorConfiguration configuration = provider.configure();
             DEFAULT_FACTORY =
-                    (ApacheValidatorFactory) configuration.buildValidatorFactory();
+                Validation.byProvider(ApacheValidationProvider.class).configure().buildValidatorFactory()
+                    .unwrap(ApacheValidatorFactory.class);
         }
         return DEFAULT_FACTORY;
     }


Mime
View raw message