From 97cc6d53e45c531dd88b3d9dbf79fe99327f05f4 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Fri, 1 Dec 2023 18:54:10 -0500 Subject: [PATCH] Update to only export to openjceplus on supported platforms --- closed/GensrcJ9JCL.gmk | 1 + closed/custom/Images-pre.gmk | 3 ++- src/java.base/share/classes/module-info.java | 23 +++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/closed/GensrcJ9JCL.gmk b/closed/GensrcJ9JCL.gmk index a6ab121eaaa..b0bf31962a5 100644 --- a/closed/GensrcJ9JCL.gmk +++ b/closed/GensrcJ9JCL.gmk @@ -48,6 +48,7 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \ src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java \ src/java.base/share/classes/jdk/internal/access/JavaNetInetAddressAccess.java \ src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java \ + src/java.base/share/classes/module-info.java \ src/java.base/share/classes/sun/security/jca/ProviderConfig.java \ src/java.base/share/classes/sun/security/jca/ProviderList.java \ src/java.base/unix/classes/java/lang/ProcessEnvironment.java \ diff --git a/closed/custom/Images-pre.gmk b/closed/custom/Images-pre.gmk index 6e343fd396b..1c7443d6d82 100644 --- a/closed/custom/Images-pre.gmk +++ b/closed/custom/Images-pre.gmk @@ -1,5 +1,5 @@ # =========================================================================== -# (c) Copyright IBM Corp. 2020, 2021 All Rights Reserved +# (c) Copyright IBM Corp. 2020, 2023 All Rights Reserved # =========================================================================== # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as @@ -24,4 +24,5 @@ JRE_MODULES += \ openj9.dataaccess \ openj9.dtfj \ openj9.gpu \ + $(if $(call equals, $(BUILD_OPENJCEPLUS), true), openjceplus) \ # diff --git a/src/java.base/share/classes/module-info.java b/src/java.base/share/classes/module-info.java index 644c1a6e13b..005a2fb6dc7 100644 --- a/src/java.base/share/classes/module-info.java +++ b/src/java.base/share/classes/module-info.java @@ -25,7 +25,7 @@ /* * =========================================================================== - * (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved + * (c) Copyright IBM Corp. 2022, 2023 All Rights Reserved * =========================================================================== */ @@ -182,6 +182,9 @@ jdk.compiler, jdk.jlink; exports jdk.internal.logger to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ java.logging; exports jdk.internal.org.objectweb.asm to jdk.jartool, @@ -199,6 +202,9 @@ exports jdk.internal.org.xml.sax.helpers to jdk.jfr; exports jdk.internal.misc to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ java.desktop, java.logging, java.management, @@ -279,6 +285,9 @@ jdk.jconsole, jdk.sctp; exports sun.net.www to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ java.net.http, jdk.jartool; exports sun.net.www.protocol.http to @@ -310,8 +319,14 @@ jdk.crypto.ec, jdk.incubator.foreign; exports sun.security.internal.interfaces to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ jdk.crypto.cryptoki; exports sun.security.internal.spec to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ jdk.crypto.cryptoki; exports sun.security.jca to java.smartcardio, @@ -337,6 +352,9 @@ exports sun.security.tools to jdk.jartool; exports sun.security.util to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ java.desktop, java.naming, java.rmi, @@ -366,6 +384,9 @@ jdk.jlink, jdk.localedata; exports sun.util.logging to +/*[IF OPENJCEPLUS_SUPPORT]*/ + openjceplus, +/*[ENDIF] OPENJCEPLUS_SUPPORT */ java.desktop, java.logging, java.prefs;