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

JShell: silently ignore access modifiers (as semantically irrelevant)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • tools
    • b143
    • generic
    • generic
    • Verified

    Description

      Currently, JShell does several lines of whining about access modifiers on definitions because they don't make sense in the wrapper world -- but still allows them by ignoring them. But the wrapper world is under the sheets. They cannot access these definitions externally anyhow. Access modifiers (not including static and final) can and should be silently ignored as yet another part of the hidden wrapper magic.

      There are many reasons you would see access modifiers including: cut-and-paste from source and examples from tutorials/books.

      Thanks Paul Deitel for the discussion that led to this realization.

      Attachments

        Activity

          People

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: