bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r928886 - in /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints: NotEmptyValidatorForCollection.java NotEmptyValidatorForMap.java SizeValidatorForCollection.java SizeValidatorForMap.java
Date Mon, 29 Mar 2010 19:44:25 GMT
Author: simonetripodi
Date: Mon Mar 29 19:44:25 2010
New Revision: 928886

URL: http://svn.apache.org/viewvc?rev=928886&view=rev
Log:
fixed Generics type parametrization

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCollection.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForMap.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForCollection.java
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForMap.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCollection.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCollection.java?rev=928886&r1=928885&r2=928886&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCollection.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForCollection.java
Mon Mar 29 19:44:25 2010
@@ -29,12 +29,12 @@ import java.util.Collection;
  * Time: 14:03:12 <br/>
  * Copyright: Agimatec GmbH
  */
-public class NotEmptyValidatorForCollection implements ConstraintValidator<NotEmpty, Collection>
{
+public class NotEmptyValidatorForCollection implements ConstraintValidator<NotEmpty, Collection<?>>
{
     public void initialize(NotEmpty constraintAnnotation) {
         // do nothing
     }
 
-    public boolean isValid(Collection value, ConstraintValidatorContext context) {
+    public boolean isValid(Collection<?> value, ConstraintValidatorContext context)
{
         return value == null || !value.isEmpty();
     }
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForMap.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForMap.java?rev=928886&r1=928885&r2=928886&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForMap.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/NotEmptyValidatorForMap.java
Mon Mar 29 19:44:25 2010
@@ -29,12 +29,12 @@ import java.util.Map;
  * Time: 14:02:57 <br/>
  * Copyright: Agimatec GmbH
  */
-public class NotEmptyValidatorForMap implements ConstraintValidator<NotEmpty, Map>
{
+public class NotEmptyValidatorForMap implements ConstraintValidator<NotEmpty, Map<?,
?>> {
     public void initialize(NotEmpty constraintAnnotation) {
         // do nothing
     }
 
-    public boolean isValid(Map value, ConstraintValidatorContext context) {
+    public boolean isValid(Map<?, ?> value, ConstraintValidatorContext context) {
         return value == null || !value.isEmpty();
     }
 }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForCollection.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForCollection.java?rev=928886&r1=928885&r2=928886&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForCollection.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForCollection.java
Mon Mar 29 19:44:25 2010
@@ -25,7 +25,7 @@ import java.util.Collection;
 
 /** Check that a Collection's size is between min and max. */
 public class SizeValidatorForCollection extends SizeValidator
-      implements ConstraintValidator<Size, Collection> {
+      implements ConstraintValidator<Size, Collection<?>> {
 
     /**
      * Checks the number of entries in a map.
@@ -36,7 +36,7 @@ public class SizeValidatorForCollection 
      *         <code>collection</code> is between the specified <code>min</code>
and <code>max</code> values (inclusive),
      *         <code>false</code> otherwise.
      */
-    public boolean isValid(Collection collection, ConstraintValidatorContext context) {
+    public boolean isValid(Collection<?> collection, ConstraintValidatorContext context)
{
         if (collection == null) {
             return true;
         }

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForMap.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForMap.java?rev=928886&r1=928885&r2=928886&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForMap.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/constraints/SizeValidatorForMap.java
Mon Mar 29 19:44:25 2010
@@ -25,7 +25,7 @@ import java.util.Map;
 
 /** Check that a Map's size is between min and max. */
 public class SizeValidatorForMap extends SizeValidator
-      implements ConstraintValidator<Size, Map> {
+      implements ConstraintValidator<Size, Map<?, ?>> {
     /**
      * Checks the number of entries in a map.
      *
@@ -35,7 +35,7 @@ public class SizeValidatorForMap extends
      *         is between the specified <code>min</code> and <code>max</code>
values (inclusive),
      *         <code>false</code> otherwise.
      */
-    public boolean isValid(Map map, ConstraintValidatorContext context) {
+    public boolean isValid(Map<?, ?> map, ConstraintValidatorContext context) {
         if (map == null) {
             return true;
         }



Mime
View raw message