Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027181 Type Annotations Cleanup
  3. JDK-8027263

Incorrect type path for inner types

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • Introduced In Version:
      8
    • Verification:
      Verified

      Description

      In the following code:

      class Outer {
          public static class Inner {}
      }
      public class Test {
          public Object meth() { return new Outer.@X Inner(); }
      }

      The type path of the annotation @X is empty. It should be [INNER_TYPE].

      Note that in the slightly different code

      class Outer {
          public class Inner {}
      }
      public class Test {
          public Object meth() { Outer o = new Outer(); return o.new @X Inner(); }
      }

      The type path is correct.

        Attachments

          Activity

            People

            Assignee:
            emc Eric Mccorkle
            Reporter:
            emc Eric Mccorkle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: