backport175
  1. backport175
  2. BP-55

Unable to read annotation information when using generic Annotation types

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, JDK1.4.2, Eclipse 3.2
    • Number of attachments :
      0

      Description

      Hi Guys,

      Dunno if this is a bug are just something that hasn't been implemented yet. I've got a case here where I'm using different annotation types in an array. My annotated method looks like this:

      /**

      • @TestAnno(annoData = {@TestAnno1, @TestAnno2}

        )
        */
        public void myTestMethod()
        {
        }

      And my annotations classes are defined as:

      public interface TestAnno
      {
      Annotation annoData();
      }

      public interface TestAnno1
      {
      /**

      • @org.codehaus.backport175.DefaultValue ("One")
        */
        String data();
        }

      public interface TestAnno2
      {
      /**

      • @org.codehaus.backport175.DefaultValue ("Two")
        */
        String data();
        }

      For some reason, when I read back the annotations on the method above I get an array of empty elements. When I use speciifc types and not generic Annotation types, everything works fine.

      Any ideas on what's going on here?

      -Th

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Hentschel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: