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

Class.getModifiers() returns "static" for anonymous classes

    XMLWordPrintable

Details

    Description

       Oracle's implementation returns "static" for anonymous classes, which
      contradicts the spec.

      Java 7 spec:
              An anonymous class is always implicitly final (8.1.1.2).
              An anonymous class is always an inner class (8.1.3); it is never
      static (8.1.1, 8.5.1).
              The modifier static pertains only to member classes (8.5.1), not to
      top level or local or anonymous classes.
       

      Attachments

        Issue Links

          Activity

            People

              igerasim Ivan Gerasimov
              asaha Abhijit Saha
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: