[jboss-cvs] JBossAS SVN: r67503 - trunk/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 27 10:31:13 EST 2007


Author: adrian at jboss.org
Date: 2007-11-27 10:31:13 -0500 (Tue, 27 Nov 2007)
New Revision: 67503

Modified:
   trunk/ejb3/src/main/org/jboss/ejb3/AnnotationRepositoryToMetaData.java
Log:
Fix the broken member annotation retrieval in the new AnnotationsRepositoryToMetaData bridge

Modified: trunk/ejb3/src/main/org/jboss/ejb3/AnnotationRepositoryToMetaData.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/AnnotationRepositoryToMetaData.java	2007-11-27 14:58:35 UTC (rev 67502)
+++ trunk/ejb3/src/main/org/jboss/ejb3/AnnotationRepositoryToMetaData.java	2007-11-27 15:31:13 UTC (rev 67503)
@@ -312,6 +312,21 @@
    {
       if (annotation == null)
          throw new IllegalArgumentException("Null annotation");
-      return metaData.getMetaData(annotation);
+      return metaData.getAnnotation(annotation);
    }
+
+   public Object resolveAnnotation(Member m, Class annotation)
+   {
+      if (annotation == null)
+         throw new IllegalArgumentException("Null annotation");
+      MetaData component = metaData.getComponentMetaData(Signature.getSignature(m));
+      if (component == null)
+         return null;
+      return component.getAnnotation(annotation);
+   }
+
+   protected Object resolveAnnotation(Member m, String annotation)
+   {
+      return resolveAnnotation(m, loadClass(annotation));
+   }
 }




More information about the jboss-cvs-commits mailing list