incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r930203 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
Date Fri, 02 Apr 2010 09:22:41 GMT
Author: simonetripodi
Date: Fri Apr  2 09:22:41 2010
New Revision: 930203

URL: http://svn.apache.org/viewvc?rev=930203&view=rev
Log:
added generics parameters

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

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java?rev=930203&r1=930202&r2=930203&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/ApacheValidatorFactory.java
Fri Apr  2 09:22:41 2010
@@ -73,9 +73,9 @@ public class ApacheValidatorFactory impl
 
   public ApacheValidatorFactory() {
         properties = new HashMap<String, String>();
-        defaultSequences = new HashMap();
-        validAccesses = new HashMap();
-        constraintMap = new HashMap();
+        defaultSequences = new HashMap<Class<?>, Class<?>[]>();
+        validAccesses = new HashMap<Class<?>, List<AccessStrategy>>();
+        constraintMap = new HashMap<Class<?>, List<MetaConstraint<?, ? extends
Annotation>>>();
     }
 
     public void configure(ConfigurationState configuration) {
@@ -109,7 +109,6 @@ public class ApacheValidatorFactory impl
         return new ApacheFactoryContext(this);
     }
 
-    @SuppressWarnings({"CloneDoesntDeclareCloneNotSupportedException"})
     @Override
     public synchronized ApacheValidatorFactory clone() {
         try {
@@ -199,7 +198,7 @@ public class ApacheValidatorFactory impl
         if (slot != null) {
             slot.add(accessStategy);
         } else {
-            List<AccessStrategy> tmpList = new ArrayList();
+            List<AccessStrategy> tmpList = new ArrayList<AccessStrategy>();
             tmpList.add(accessStategy);
             validAccesses.put(beanClass, tmpList);
         }
@@ -214,7 +213,7 @@ public class ApacheValidatorFactory impl
         List<MetaConstraint<?,? extends Annotation>> slot = constraintMap.get(beanClass);
         if (slot != null) {
             //noinspection RedundantCast
-            return (List)slot;
+            return (List) slot;
         } else {
             return Collections.EMPTY_LIST;
         }



Mime
View raw message