Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8071453 Allow interface methods to be private
  3. JDK-8072872

9.4: Allow interface methods to be 'private'

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7, 8
    • Fix Version/s: 9
    • Component/s: specification
    • Labels:

      Description

      Overview of changes that have been identified:
      - 9.4: Modify syntax, clarify that private methods are not "implicitly public" and are not "default". Error checks for conflicts between 'private' and any of 'public', 'abstract', or 'default', similar to 8.4.3.
      - 9.4.1: Private methods are not inherited or overridden in a subinterface. (Inheritance definition actually works already, because it speaks of "abstract or default", but even without any spec change, this should definitely be tested.)
      - 9.4.1.2: a private method can't override a public method.
      - 8.4.8: Private methods are not inherited or overridden in a subclass. (Again, no spec change, but should be tested.)
      - 13.5.6: Describe the binary compatibility impact of changing the access of an interface method (similar to 13.4.7)

      Need to investigate other potential impacts, where interface methods have been assumed to always be public (for example, in 6.6).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abuckley Alex Buckley
              Reporter:
              dlsmith Dan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: