incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r929917 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Date Thu, 01 Apr 2010 10:52:22 GMT
Author: simonetripodi
Date: Thu Apr  1 10:52:22 2010
New Revision: 929917

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

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

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java?rev=929917&r1=929916&r2=929917&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxy.java
Thu Apr  1 10:52:22 2010
@@ -39,13 +39,13 @@ public class AnnotationProxy implements 
     private final Class<? extends Annotation> annotationType;
     private final Map<String, Object> values;
 
-    public AnnotationProxy(AnnotationProxyBuilder descriptor) {
+    public <A extends Annotation> AnnotationProxy(AnnotationProxyBuilder<A> descriptor)
{
         this.annotationType = descriptor.getType();
         values = getAnnotationValues(descriptor);
     }
 
-    private Map<String, Object> getAnnotationValues(AnnotationProxyBuilder descriptor)
{
-        Map<String, Object> result = new HashMap();
+    private <A extends Annotation> Map<String, Object> getAnnotationValues(AnnotationProxyBuilder<A>
descriptor) {
+        Map<String, Object> result = new HashMap<String, Object>();
         int processedValuesFromDescriptor = 0;
         final Method[] declaredMethods = SecureActions.getDeclaredMethods(annotationType);
         for (Method m : declaredMethods) {
@@ -90,7 +90,7 @@ public class AnnotationProxy implements 
     }
 
     private SortedSet<String> getMethodsSorted() {
-        SortedSet<String> result = new TreeSet();
+        SortedSet<String> result = new TreeSet<String>();
         result.addAll(values.keySet());
         return result;
     }



Mime
View raw message