@@ -41,31 +41,27 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
4141 <property name =" transformerListener" location =" ${ TEST_ROOT } /Utils/src" />
4242 <property name =" TestUtilities" location =" ../TestUtilities/src" />
4343 <property name =" TestUtilitiesJ9" location =" ../TestUtilitiesJ9/src" />
44- <condition property =" src_90_jcl_dir" value =" src_90_current" >
44+ <condition property =" src_90_jcl_dir" value =" src_90_current" else = " src_90_latest " >
4545 <equals arg1=" ${ JCL_VERSION } " arg2=" current" />
4646 </condition >
47- <property name =" src_90_jcl_dir" value =" src_90_latest" />
4847 <property name =" src_90_jcl" location =" ${ src_90_jcl_dir } " />
49- <condition property =" addExports_90_jcl" value =" --add-exports java.management/sun.management=ALL-UNNAMED" >
48+ <condition property =" addExports_90_jcl" value =" --add-exports java.management/sun.management=ALL-UNNAMED" else = " --add-exports jdk.management.agent/jdk.internal.agent=ALL-UNNAMED " >
5049 <equals arg1=" ${ JCL_VERSION } " arg2=" current" />
5150 </condition >
52- <property name =" addExports_90_jcl" value =" --add-exports jdk.management.agent/jdk.internal.agent=ALL-UNNAMED" />
5351
54- <condition property =" is_JDK_VERSION_8" >
52+ <condition property =" is_JDK_VERSION_8" >
5553 <equals arg1=" ${ JDK_VERSION } " arg2=" 8" />
5654 </condition >
5755
5856 <property name =" src_access" location =" ${ TEST_ROOT } /functional/UnsafeAccess/src" if : set =" is_JDK_VERSION_8" />
59- <condition property =" src_access_dir" value =" ${ TEST_ROOT } /functional/UnsafeAccess/src_110" unless : set =" is_JDK_VERSION_8" >
57+ <condition property =" src_access_dir" value =" ${ TEST_ROOT } /functional/UnsafeAccess/src_110" else = " ${ TEST_ROOT } /functional/UnsafeAccess/src_170 " unless : set =" is_JDK_VERSION_8" >
6058 <matches string =" ${ JDK_VERSION } " pattern =" ^1[1-6]$$" />
6159 </condition >
62- <property name =" src_access_dir" value =" ${ TEST_ROOT } /functional/UnsafeAccess/src_170" unless : set =" is_JDK_VERSION_8" />
6360 <property name =" src_access" location =" ${ src_access_dir } " unless : set =" is_JDK_VERSION_8" />
6461
65- <condition property =" addModules" value =" --add-modules java.se.ee" >
62+ <condition property =" addModules" value =" --add-modules java.se.ee" else = " " >
6663 <matches string =" ${ JDK_VERSION } " pattern =" ^(9|10)$$" />
6764 </condition >
68- <property name =" addModules" value =" " />
6965 <property name =" LIB" value =" asm_all,javassist,testng,jcommander,commons_cli,jaxb_api,asmtools" />
7066 <import file =" ${ TEST_ROOT } /TKG/scripts/getDependencies.xml" />
7167
@@ -86,27 +82,24 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
8682 <copy overwrite =" true" file =" ${ NoSuchMethod_src } /java/lang/String.java.hide" tofile =" ${ NoSuchMethod_src } /java/lang/String.java" />
8783 <copy overwrite =" true" file =" ${ NoSuchMethod_src } /AppLoaderCallee.java.fake" tofile =" ${ NoSuchMethod_src } /AppLoaderCallee.java" />
8884 <!-- Compile the fake string impl and AppLoader caller with it -->
89- <condition property =" is_JDK_VERSION_8" >
90- <equals arg1=" ${ JDK_VERSION } " arg2=" 8" />
91- </condition >
9285
9386 <javac srcdir =" ${ NoSuchMethod_src } " destdir =" ${ build } " includes =" **/String.java,*AppLoaderCaller2.java" fork =" true"
94- debug=" on" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" if : set =" is_JDK_VERSION_8" >
87+ debug=" on" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" if : set =" is_JDK_VERSION_8" >
9588 <src path =" ${ src_access } " />
9689 <classpath >
97- <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
98- <pathelement location =" ${ LIB_DIR } /testng.jar" />
99- <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
90+ <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
91+ <pathelement location =" ${ LIB_DIR } /testng.jar" />
92+ <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
10093 </classpath >
10194 </javac >
10295 <javac srcdir =" ${ NoSuchMethod_src } " destdir =" ${ build } " includes =" **/String.java,*AppLoaderCaller2.java" fork =" true"
103- debug=" on" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" unless : set =" is_JDK_VERSION_8" >
96+ debug=" on" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" unless : set =" is_JDK_VERSION_8" >
10497 <compilerarg line =" --patch-module java.base=${ NoSuchMethod_src } /java/lang" />
10598 <src path =" ${ src_access } " />
10699 <classpath >
107- <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
108- <pathelement location =" ${ LIB_DIR } /testng.jar" />
109- <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
100+ <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
101+ <pathelement location =" ${ LIB_DIR } /testng.jar" />
102+ <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
110103 </classpath >
111104 </javac >
112105 <!-- remove our fake java.lang.string impl -->
@@ -159,9 +152,6 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
159152 <pathelement location =" ${ LIB_DIR } /testng.jar" />
160153 </classpath >
161154 </javac >
162- <condition property =" is_JDK_VERSION_8" >
163- <equals arg1=" ${ JDK_VERSION } " arg2=" 8" />
164- </condition >
165155
166156 <javac srcdir =" ${ src } " destdir =" ${ build } " debug =" true" fork =" true" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" if : set =" is_JDK_VERSION_8" >
167157 <src path =" ${ src } " />
@@ -175,23 +165,21 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
175165 <!-- requires special compilation methods -->
176166 <exclude name =" **/NoSuchMethod/**" />
177167 <classpath >
178- <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
179- <pathelement location =" ${ LIB_DIR } /testng.jar" />
180- <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
181- <pathelement location =" ${ TEST_JDK_HOME } /lib/tools.jar" />
182- <pathelement location =" ${ LIB_DIR } /commons-cli.jar" />
183- <pathelement location =" ${ LIB_DIR } /javassist.jar" />
168+ <pathelement location =" ${ LIB_DIR } /asm-all.jar" />
169+ <pathelement location =" ${ LIB_DIR } /testng.jar" />
170+ <pathelement location =" ${ LIB_DIR } /jcommander.jar" />
171+ <pathelement location =" ${ TEST_JDK_HOME } /lib/tools.jar" />
172+ <pathelement location =" ${ LIB_DIR } /commons-cli.jar" />
173+ <pathelement location =" ${ LIB_DIR } /javassist.jar" />
184174 </classpath >
185175 </javac >
186- <condition property =" src_version_dir" value =" src_110" unless : set =" is_JDK_VERSION_8" >
176+ <condition property =" src_version_dir" value =" src_110" else = " src_170 " unless : set =" is_JDK_VERSION_8" >
187177 <equals arg1=" ${ JDK_VERSION } " arg2=" 11" />
188178 </condition >
189- <property name =" src_version_dir" value =" src_170" unless : set =" is_JDK_VERSION_8" />
190179 <property name =" src_version" location =" ${ src_version_dir } " unless : set =" is_JDK_VERSION_8" />
191- <condition property =" addExports_version" value =" " unless : set =" is_JDK_VERSION_8" >
180+ <condition property =" addExports_version" value =" " else = " --add-exports java.base/jdk.internal.access=ALL-UNNAMED " unless : set =" is_JDK_VERSION_8" >
192181 <equals arg1=" ${ JDK_VERSION } " arg2=" 11" />
193182 </condition >
194- <property name =" addExports_version" value =" --add-exports java.base/jdk.internal.access=ALL-UNNAMED" unless : set =" is_JDK_VERSION_8" />
195183
196184 <property name =" addExports" value =" --add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/com.ibm.oti.util=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED --add-exports java.base/com.ibm.jit.crypto=ALL-UNNAMED --add-exports java.base/com.ibm.jit=ALL-UNNAMED --add-exports java.base/com.ibm.oti.reflect=ALL-UNNAMED --add-exports java.base/openj9.internal.tools.attach.target=ALL-UNNAMED --add-exports jdk.attach/com.ibm.tools.attach.attacher=ALL-UNNAMED" unless : set =" is_JDK_VERSION_8" />
197185 <echo unless : set =" is_JDK_VERSION_8" >===addExports: ${ addExports } </echo >
@@ -208,15 +196,37 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
208196 <fileset dir =" ${ LIB_DIR } /" includes =" jaxb-api.jar" />
209197 </path >
210198 <property name =" commonArgs" value =" ${ addExports } ${ addExports_90_jcl } ${ addExports_version } --add-modules openj9.sharedclasses" unless : set =" is_JDK_VERSION_8" />
199+ <condition property =" is_JDK_VERSION_11_to_18" >
200+ <matches string =" ${ JDK_VERSION } " pattern =" ^(1[1-8])$$" />
201+ </condition >
202+ <condition property =" is_JDK_VERSION_19_to_22" >
203+ <matches string =" ${ JDK_VERSION } " pattern =" ^(19|2[0-2])$$" />
204+ </condition >
211205 <condition property =" is_JDK_VERSION_match" >
212- <matches string =" ${ JDK_VERSION } " pattern =" ^(8|1[1-8])$$" />
206+ <matches string =" ${ JDK_VERSION } " pattern =" ^(8|1[1-8]|19|2[0-2] )$$" />
213207 </condition >
214208
215209 <!-- Java 11-18 -->
216- <javac srcdir =" ${ srcpath } " excludes =" ${ commonExcludes } " destdir =" ${ build } " debug =" true" fork =" true" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" classpathref =" build.cp" if : set =" is_JDK_VERSION_match " unless : set = " is_JDK_VERSION_8 " >
210+ <javac srcdir =" ${ srcpath } " excludes =" ${ commonExcludes } " destdir =" ${ build } " debug =" true" fork =" true" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" classpathref =" build.cp" if : set =" is_JDK_VERSION_11_to_18 " >
217211 <compilerarg line =' ${ commonArgs } ' />
218212 </javac >
219- <!-- Java 23+ (SecurityManage and Thread functions removed) -->
213+ <!-- Java 19-22 (SecurityManager removed) -->
214+ <javac srcdir =" ${ srcpath } " excludes =" ${ commonExcludes } " destdir =" ${ build } " debug =" true" fork =" true" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" classpathref =" build.cp" if : set =" is_JDK_VERSION_19_to_22" >
215+ <compilerarg line =' ${ commonArgs } ' />
216+ <!-- exclude tests that depend on SecurityManager -->
217+ <exclude name =" org/openj9/test/java/security/Test_AccessController.java" />
218+ <exclude name =" org/openj9/test/java/security/Test_AccessControlContext.java" />
219+ <exclude name =" org/openj9/test/java/lang/Test_Class_SM.java" />
220+ <exclude name =" org/openj9/test/java/lang/Test_System_SM.java" />
221+ <exclude name =" org/openj9/test/java/lang/Test_Thread_SM.java" />
222+ <exclude name =" org/openj9/test/java/lang/Test_ThreadGroup_SM.java" />
223+ <exclude name =" org/openj9/test/java/lang/invoke/Test_MethodHandleInfo_SM.java" />
224+ <exclude name =" org/openj9/test/java/lang/Test_ClassLoader_SM.java" />
225+ <exclude name =" org/openj9/test/java/lang/Test_J9VMInternals_SM.java" />
226+ <exclude name =" org/openj9/test/java/lang/Test_J9VMInternalsImpl_SM.java" />
227+ <exclude name =" org/openj9/test/vm/Test_VM.java" />
228+ </javac >
229+ <!-- Java 23+ (SecurityManager and Thread functions removed) -->
220230 <javac srcdir =" ${ srcpath } " excludes =" ${ commonExcludes } " destdir =" ${ build } " debug =" true" fork =" true" executable =" ${ compiler.javac } " includeAntRuntime =" false" encoding =" ISO-8859-1" classpathref =" build.cp" unless : set =" is_JDK_VERSION_match" >
221231 <compilerarg line =' ${ commonArgs } ' />
222232 <!-- exclude tests that depend on SecurityManager or Thread functions -->
0 commit comments