incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r931258 - in /incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice: ConfigurationStateProvider.java ValidationModule.java
Date Tue, 06 Apr 2010 18:20:38 GMT
Author: simonetripodi
Date: Tue Apr  6 18:20:38 2010
New Revision: 931258

URL: http://svn.apache.org/viewvc?rev=931258&view=rev
Log:
fixed ValidationProvider binding warnings 

Modified:
    incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
    incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java

Modified: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java?rev=931258&r1=931257&r2=931258&view=diff
==============================================================================
--- incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
(original)
+++ incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ConfigurationStateProvider.java
Tue Apr  6 18:20:38 2010
@@ -39,7 +39,7 @@ public final class ConfigurationStatePro
     private final ConfigurationImpl configurationState;
 
     @Inject
-    public ConfigurationStateProvider(ValidationProvider aProvider) {
+    public ConfigurationStateProvider(ValidationProvider<?> aProvider) {
         this.configurationState = new ConfigurationImpl(null, aProvider);
     }
 

Modified: incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java?rev=931258&r1=931257&r2=931258&view=diff
==============================================================================
--- incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
(original)
+++ incubator/bval/sandbox/guice-integration/src/main/java/org/apache/bval/extentions/guice/ValidationModule.java
Tue Apr  6 18:20:38 2010
@@ -31,6 +31,7 @@ import org.apache.bval.jsr303.resolver.D
 
 import com.google.inject.AbstractModule;
 import com.google.inject.Scopes;
+import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matchers;
 
 /**
@@ -49,7 +50,7 @@ public final class ValidationModule exte
         this.bind(MessageInterpolator.class).to(DefaultMessageInterpolator.class).in(Scopes.SINGLETON);
         this.bind(TraversableResolver.class).to(DefaultTraversableResolver.class).in(Scopes.SINGLETON);
         this.bind(ConstraintValidatorFactory.class).to(GuiceAwareConstraintValidatorFactory.class);
-        this.bind(ValidationProvider.class).to(ApacheValidationProvider.class).in(Scopes.SINGLETON);
+        this.bind(new TypeLiteral<ValidationProvider<?>>() {}).to(ApacheValidationProvider.class).in(Scopes.SINGLETON);
         this.bind(ConfigurationState.class).toProvider(ConfigurationStateProvider.class);
         this.bind(ValidatorFactory.class).toProvider(ValidatorFactoryProvider.class);
         this.bind(Validator.class).toProvider(ValidatorProvider.class);



Mime
View raw message