[weld-commits] Weld SVN: r4779 - api/trunk/cdi/src/main/java/javax/enterprise/util.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sun Nov 8 08:32:10 EST 2009


Author: pete.muir at jboss.org
Date: 2009-11-08 08:32:10 -0500 (Sun, 08 Nov 2009)
New Revision: 4779

Modified:
   api/trunk/cdi/src/main/java/javax/enterprise/util/AnnotationLiteral.java
Log:
tidy up, rollback requirement to implement annotation type

Modified: api/trunk/cdi/src/main/java/javax/enterprise/util/AnnotationLiteral.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/util/AnnotationLiteral.java	2009-11-08 12:00:28 UTC (rev 4778)
+++ api/trunk/cdi/src/main/java/javax/enterprise/util/AnnotationLiteral.java	2009-11-08 13:32:10 UTC (rev 4779)
@@ -115,10 +115,6 @@
          {
             throw new RuntimeException(getClass() + " is missing type parameter in AnnotationLiteral");
          }
-         if ( !annotationType.isAssignableFrom(this.getClass()) )
-         {
-            throw new RuntimeException(getClass() + " does not implement the annotation type");
-         }
       }
       return annotationType;
    }
@@ -174,9 +170,9 @@
             }
             appendInBraces(string, Arrays.toString(quoted));
          }
-         else if (value instanceof Class[]) 
+         else if (value instanceof Class<?>[]) 
          {
-            Class[] classes = (Class[]) value;
+            Class<?>[] classes = (Class<?>[]) value;
             String[] names = new String[classes.length];
             for(int j=0; j<classes.length; j++) 
             {
@@ -192,9 +188,9 @@
          {
             string.append('"').append(value).append('"');
          }
-         else if (value instanceof Class) 
+         else if (value instanceof Class<?>) 
          {
-            string.append(((Class)value).getName()).append(".class");
+            string.append(((Class<?>)value).getName()).append(".class");
          }
          else 
          {



More information about the weld-commits mailing list