Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-88556 As a developer I want to run tests on Java 11
  3. LPS-88685

Add --add-opens to JUnit JVM args to avoid illegal reflective access warning

    Details

      Description

      According to Java 11 Migration Guide,

      Some tools and libraries use reflection to access parts of the JDK that are meant for internal use only. This illegal reflective access will be disabled in a future release of the JDK. Currently, it is permitted by default and a warning is issued.

      ...

      If you have to allow code on the class path to do deep reflection to access nonpublic members, then use the --add-opens option.

      To avoid these warnings from being displayed, and to be compatible with future JDK versions, add --add-opens to JUnit JVM args.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                dante.wang Dante Wang
                Recent user:
                Dante Wang
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  46 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  Master