You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/03/17 23:27:00 UTC

[jira] [Commented] (GEODE-10128) Open and export additional packages when running tests on JDK 17

    [ https://issues.apache.org/jira/browse/GEODE-10128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508464#comment-17508464 ] 

ASF subversion and git services commented on GEODE-10128:
---------------------------------------------------------

Commit 69b3acc487ff45808b08ffbe0c06e5211bad1bfc in geode's branch refs/heads/develop from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=69b3acc ]

GEODE-10128: Open/export packages for JDK 17 (#7451)

PROBLEM

JDK 17 throws exceptions when product and test code attempts to access
elements in modules that do not make those elements accessible.

SOLUTION

Open and export the required packages when starting a test JVM.

> Open and export additional packages when running tests on JDK 17
> ----------------------------------------------------------------
>
>                 Key: GEODE-10128
>                 URL: https://issues.apache.org/jira/browse/GEODE-10128
>             Project: Geode
>          Issue Type: Improvement
>          Components: ci, tests
>    Affects Versions: 1.15.0
>            Reporter: Dale Emery
>            Assignee: Dale Emery
>            Priority: Major
>              Labels: Java17, pull-request-available
>
> JDK 17 throws exceptions when code attempts certain kinds of access to packages that are not opened or exported by their modules. JDK 11 issued warnings in these cases.
> When Gradle launches test JVMs, it must open and export the packages that will be accessed by product and test code during the tests. We currently configure a few packages in {{{}test.gradle{}}}. To support JDK 17, we must open and export additional packages.
> Additional packages to open (via {{{}--add-opens{}}}):
>  - java.base/java.lang
>  - java.base/java.nio
>  - java.base/java.text
>  - java.base/java.util
>  - java.base/java.util.concurrent
>  - java.base/java.util.concurrent.atomic
>  - java.base/java.util.concurrent.locks
>  - java.base/javax.net.ssl
>  - java.base/sun.security.ssl
>  - java.base/sun.util.locale
>  - java.rmi/sun.rmi.transport
> Additional packages to export (via {{{}--add-opens{}}}):
>  - java.base/jdk.internal.util.random
>  - java.base/sun.nio.ch
>  - java.base/sun.security.x509
>  - java.management/com.sun.jmx.remote.security
> We may discover additional packages to open/export as we run more tests under JDK 17, and as we change product and test code.
> Note that different JDKs define different {{jdk.internal}} subpackages. For example:
>  - JDK 17 has {{{}jdk.internal.util.random{}}}, but JDK 11 does not.
>  - On Linux, JDK 11 and 17 have {{{}jdk.internal.platform.cgroupv1{}}}, but Windows and macOS JDKs do not.
> We have a few options for dealing with the differing {{jdk.internal}} packages:
>  - Configure which packages we open/export depending on the JDK implementation.
>  - Open all of these packages on all JDK platforms and versions (JDK 9 or higher). This will produce warnings when we open/export a package that does not exist.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)