geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r769055 - /geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
Date Mon, 27 Apr 2009 16:38:26 GMT
Author: dwoods
Date: Mon Apr 27 16:38:26 2009
New Revision: 769055

URL: http://svn.apache.org/viewvc?rev=769055&view=rev
Log:
GERONIMO-4619 Incremental updates to the Validation class implementation.

Modified:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java?rev=769055&r1=769054&r2=769055&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
(original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
Mon Apr 27 16:38:26 2009
@@ -152,23 +152,25 @@
         public T configure() {
             T cfg = null;
 
-            if (cfgType == null)
-                throw new ValidationException(
-                    "No configuration type was supplied");
+            // create a default resolver if not supplied by providerResolver()
             if (vpResolver == null)
                 vpResolver = new DefaultValidationProviderResolver();
 
+            // check each provider discovered by the resolver
             for (ValidationProvider vProvider : vpResolver
                 .getValidationProviders()) {
                 if (vProvider.isSuitable(cfgType)) {
                     GenericBootstrapImpl bootstrap = new GenericBootstrapImpl();
+                    // set the resolver
                     bootstrap.providerResolver(vpResolver);
-                    // FIXME JSR-303 - Need to create a Configuration<T>
-                    // from the above bootstrap and configurationType
-
+                    // Create a Configuration<T> from the above bootstrap state
+                    // and configurationType
+                    cfg = vProvider.createSpecializedConfiguration(bootstrap, 
+                        cfgType);
                 }
             }
 
+            // return the Configuration<T> or throw a Spec required exception
             if (cfg != null)
                 return cfg;
             else



Mime
View raw message