incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r980598 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java
Date Thu, 29 Jul 2010 22:38:04 GMT
Author: mbenson
Date: Thu Jul 29 22:38:03 2010
New Revision: 980598

URL: http://svn.apache.org/viewvc?rev=980598&view=rev
Log:
compiler warning

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

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java?rev=980598&r1=980597&r2=980598&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ConstraintValidation.java
Thu Jul 29 22:38:03 2010
@@ -195,7 +195,9 @@ public class ConstraintValidation<T exte
     if (validator != null) {
       ConstraintValidatorContextImpl jsrContext =
           new ConstraintValidatorContextImpl(context, this);
-      if (!((ConstraintValidator<T, Object>) validator).isValid(context.getValidatedValue(),
jsrContext)) {
+      @SuppressWarnings("unchecked")
+      final ConstraintValidator<T, Object> objectValidator = (ConstraintValidator<T,
Object>) validator;
+      if (!objectValidator.isValid(context.getValidatedValue(), jsrContext)) {
         addErrors(context, jsrContext);
       }
     }



Mime
View raw message