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

Improve JLS regarding access check for protected nested types

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 15.0.1
    • Fix Version/s: None
    • Component/s: specification
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      Relates to JDK-8149078, JDK-8061877

      During runtime the JVM treats protected nested types as if they were public for access checks. This is currently only documented as part of §15.12.4.3 of the Java Language Specification (JLS).

      1. It looks like this affects field access as well so "§15.11. Field Access Expressions" should contain this information too.
      2. Section "§6.6.2. Details on protected Access" should mention this as well and link to §15.11 and §15.12.4.3, because it is most likely that readers will first look this section for information about this topic.


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: