Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8025087

Annotation processing api returns default modifier for interface static method

XMLWordPrintable

      Annotation processing api returns both default and static modifiers for static interface methods when used with class file.

      Mini testcase to reproduce this behavior are attached.

      >C:\Java\8b106\windows-i586\bin\javac.exe -classpath C:\work\Oracle\Proc\out\production\Proc -processor jck.proc.Proc jck.proc.i2
      Top: i2 [abstract, default]
      Enclosing: defaultMethod [public, default]
      Enclosing: staticMethod [public, default, static]
      Enclosing: abstractMethod [public, abstract]

      When used with sources everything is fine:
      >C:\Java\8b106\windows-i586\bin\javac.exe -classpath C:\work\Oracle\Proc\out\production\Proc -processor jck.proc.Proc C:\work\Oracle\Proc\src\jck\proc\Test.java
      Top: i2 [abstract, default]
      Enclosing: defaultMethod [public, default]
      Enclosing: staticMethod [public, static]
      Enclosing: abstractMethod [public, abstract]

      Sources attached.

        1. Proc.java
          0.9 kB
        2. Test.java
          0.1 kB

            jlahoda Jan Lahoda
            vrudomet Victor Rudometov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: