2 Replies Latest reply on Aug 8, 2008 5:27 AM by Carlo de Wolf

    AnnotatedElementMetaDataLoader doesn't work for private meth

    Carlo de Wolf Master

      With a hack, part of https://jira.jboss.org/jira/browse/EJBTHREE-1448, I have made advisor.annotationRepository authoritative on annotations. I did this by setting advisor.metaData to a dummy. (Which leaves the relationship between and advisor.annotationRepository and advisor.metaData as a nagging question in my mind. I guess that annotationRepository should be deprecated?)

      This disables the regular fallback of the advisor to scan for annotations and leaves it to MDR.

      But now if I want to look at an annotation of a private method I get nothing, because AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(signature)
      returns null when AnnotatedElementMetaDataLoader.this.annotated = class
      A and signature = MethodSignature of a private Method of class A.

      Dare I say, I consider this a bug.