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

Need option to report non-reflective use of encapsulated classes at runtime

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      generic

      Description

      A DESCRIPTION OF THE REQUEST :
      When evaluating migration of an existing application to Java 9, the --illegal-access = warn flag can be used to report on reflective access to encapsulated classes. However normal, non-reflective access is not reported.

      If the application contains third-party libraries, it may not be possible to check for encapsulated class use at compile time. The only approach currently seems to be to run with --illegal-access=deny. This terminates the application at the first illegal use and will not help in location other references.

      JUSTIFICATION :
      Need listing of encapsulated class usages from compiled code at runtime. The jdps dependency analyzer can help but a runtime report would also be useful.


        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: