Skip to content

Commit 110b0ce

Browse files
authored
Merge BETA_JAVA25 to Master
#779
2 parents 4efdb8a + 6bfe8e6 commit 110b0ce

File tree

16 files changed

+119
-24
lines changed

16 files changed

+119
-24
lines changed

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pipeline {
1010
}
1111
tools {
1212
maven 'apache-maven-latest'
13-
jdk 'openjdk-jdk24-latest'
13+
jdk 'openjdk-jdk25-latest'
1414
}
1515
environment {
1616
NON_MODULAR_JAVA_HOME = tool(type:'jdk', name:'temurin-jdk8-latest')
@@ -21,7 +21,7 @@ pipeline {
2121
xvnc(useXauthority: true) {
2222
sh """
2323
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
24-
-Ptest-on-javase-24 -Pbree-libs -Papi-check -Pjavadoc\
24+
-Ptest-on-javase-25 -Pbree-libs -Papi-check -Pjavadoc\
2525
-Dmaven.test.failure.ignore=true\
2626
-Dcompare-version-with-baselines.skip=false \
2727
-Dproject.build.sourceEncoding=UTF-8 \

org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<booleanAttribute key="default" value="true"/>
1414
<booleanAttribute key="includeOptional" value="true"/>
1515
<stringAttribute key="location" value="${workspace_loc}/../debug-junit-workspace"/>
16+
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
1617
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
1718
<listEntry value="/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java"/>
1819
</listAttribute>
@@ -24,13 +25,14 @@
2425
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
2526
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
2627
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
28+
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
2729
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
28-
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
30+
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-25"/>
2931
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jdt.debug.tests.AutomatedSuite"/>
3032
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
3133
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.debug.tests"/>
3234
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
33-
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx1024m"/>
35+
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx1024m&#10;-javaagent:${workspace_loc:org.eclipse.jdt.launching}/lib/javaagent-shaded.jar"/>
3436
<stringAttribute key="pde.version" value="3.3"/>
3537
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
3638
<booleanAttribute key="run_in_ui_thread" value="true"/>

org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.jdt.debug.tests; singleton:=true
5-
Bundle-Version: 3.12.750.qualifier
5+
Bundle-Version: 3.12.800.qualifier
66
Bundle-ClassPath: javadebugtests.jar
77
Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
88
Bundle-Vendor: %providerName

org.eclipse.jdt.debug.tests/build.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ bin.includes = plugin.xml,\
2727
java9/,\
2828
java16_/,\
2929
java23/,\
30-
java24/
30+
java24/,\
31+
java25/
3132
source.javadebugtests.jar = test plugin/,\
3233
tests/,\
3334
console tests/
File renamed without changes.
File renamed without changes.

org.eclipse.jdt.debug.tests/pom.xml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</parent>
1919
<groupId>org.eclipse.jdt</groupId>
2020
<artifactId>org.eclipse.jdt.debug.tests</artifactId>
21-
<version>3.12.750-SNAPSHOT</version>
21+
<version>3.12.800-SNAPSHOT</version>
2222
<packaging>eclipse-test-plugin</packaging>
2323
<properties>
2424
<testSuite>${project.artifactId}</testSuite>
@@ -91,5 +91,31 @@
9191
</plugins>
9292
</build>
9393
</profile>
94+
<profile>
95+
<id>test-on-javase-25</id>
96+
<build>
97+
<plugins>
98+
<plugin>
99+
<groupId>org.apache.maven.plugins</groupId>
100+
<artifactId>maven-toolchains-plugin</artifactId>
101+
<executions>
102+
<execution>
103+
<phase>validate</phase>
104+
<goals>
105+
<goal>toolchain</goal>
106+
</goals>
107+
</execution>
108+
</executions>
109+
<configuration>
110+
<toolchains>
111+
<jdk>
112+
<id>JavaSE-25</id>
113+
</jdk>
114+
</toolchains>
115+
</configuration>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
</profile>
94120
</profiles>
95121
</project>

org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public class JavaProjectHelper {
6767
public static final String JAVA_SE_21_EE_NAME = "JavaSE-21";
6868
public static final String JAVA_SE_23_EE_NAME = "JavaSE-23";
6969
public static final String JAVA_SE_24_EE_NAME = "JavaSE-24";
70+
public static final String JAVA_SE_25_EE_NAME = "JavaSE-25";
7071

7172
/**
7273
* path to the test src for 'testprograms'
@@ -105,6 +106,10 @@ public class JavaProjectHelper {
105106
* path to the 24 test source
106107
*/
107108
public static final IPath TEST_24_SRC_DIR = new Path("java24");
109+
/**
110+
* path to the 25 test source
111+
*/
112+
public static final IPath TEST_25_SRC_DIR = new Path("java25");
108113

109114
/**
110115
* path to the compiler error java file
@@ -203,10 +208,20 @@ public static boolean isJava24_Compatible() {
203208
return isCompatible(24);
204209
}
205210

211+
/**
212+
* Returns if the currently running VM is version compatible with Java 25
213+
*
214+
* @return <code>true</code> if a Java 25 (or greater) VM is running <code>false</code> otherwise
215+
*/
216+
public static boolean isJava25_Compatible() {
217+
return isCompatible(25);
218+
}
219+
206220
/**
207221
* Returns if the current running system is compatible with the given Java minor version
208222
*
209-
* @param ver the version to test - either 4, 5, 6, 7 or 8
223+
* @param ver
224+
* the version to test - within [ 8 ... JavaCore.latestSupportedJavaVersion() ]
210225
* @return <code>true</code> if compatible <code>false</code> otherwise
211226
*/
212227
static boolean isCompatible(int ver) {

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
182182
public static final String TWENTYONE_PROJECT_NAME = "Two_One";
183183
public static final String TWENTYTHREE_PROJECT_NAME = "Two_Three";
184184
public static final String TWENTYFOUR_PROJECT_NAME = "Two_Four";
185+
public static final String TWENTYFIVE_PROJECT_NAME = "Two_Five";
185186
public static final String BOUND_JRE_PROJECT_NAME = "BoundJRE";
186187
public static final String CLONE_SUFFIX = "Clone";
187188

@@ -243,6 +244,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
243244
private static boolean loaded21 = false;
244245
private static boolean loaded23 = false;
245246
private static boolean loaded24 = false;
247+
private static boolean loaded25 = false;
246248
private static boolean loadedEE = false;
247249
private static boolean loadedJRE = false;
248250
private static boolean loadedMulti = false;
@@ -665,8 +667,6 @@ synchronized void assert24Project() {
665667
jp.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_24);
666668
jp.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_24);
667669
jp.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_24);
668-
cfgs.add(createLaunchConfiguration(jp, "Main1"));
669-
cfgs.add(createLaunchConfiguration(jp, "Main2"));
670670
cfgs.add(createLaunchConfiguration(jp, "Main21"));
671671
loaded24 = true;
672672
waitForBuild();
@@ -687,6 +687,40 @@ synchronized void assert24Project() {
687687
}
688688
}
689689

690+
/**
691+
* Creates the Java 25 compliant project
692+
*/
693+
synchronized void assert25Project() {
694+
IJavaProject jp = null;
695+
ArrayList<ILaunchConfiguration> cfgs = new ArrayList<>(1);
696+
try {
697+
if (!loaded25) {
698+
jp = createProject(TWENTYFIVE_PROJECT_NAME, JavaProjectHelper.TEST_25_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_25_EE_NAME, false);
699+
jp.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
700+
jp.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_25);
701+
jp.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_25);
702+
jp.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_25);
703+
cfgs.add(createLaunchConfiguration(jp, "Main1"));
704+
cfgs.add(createLaunchConfiguration(jp, "Main2"));
705+
loaded25 = true;
706+
waitForBuild();
707+
assertNoErrorMarkersExist(jp.getProject());
708+
}
709+
} catch (Exception e) {
710+
try {
711+
if (jp != null) {
712+
jp.getProject().delete(true, true, null);
713+
for (int i = 0; i < cfgs.size(); i++) {
714+
cfgs.get(i).delete();
715+
}
716+
}
717+
} catch (CoreException ce) {
718+
// ignore
719+
}
720+
handleProjectCreationException(e, TWENTYFIVE_PROJECT_NAME, jp);
721+
}
722+
}
723+
690724
/**
691725
* Creates the 'BoundJRE' project used for the JRE testing
692726
*/
@@ -1003,6 +1037,16 @@ protected IJavaProject get24Project() {
10031037
return getJavaProject(TWENTYFOUR_PROJECT_NAME);
10041038
}
10051039

1040+
/**
1041+
* Returns the 'Two_Five' project, used for Java 25 tests.
1042+
*
1043+
* @return the test project
1044+
*/
1045+
protected IJavaProject get25Project() {
1046+
assert25Project();
1047+
return getJavaProject(TWENTYFIVE_PROJECT_NAME);
1048+
}
1049+
10061050
/**
10071051
* Returns the 'BoundJRE' project
10081052
*

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public AutomatedSuite() {
200200
addTest(new TestSuite(ConfigurationEncodingTests.class));
201201
addTest(new TestSuite(LaunchConfigurationManagerTests.class));
202202
addTest(new TestSuite(LaunchConfigurationTests.class));
203-
if (JavaProjectHelper.isJava24_Compatible()) {
203+
if (JavaProjectHelper.isJava25_Compatible()) {
204204
addTest(new TestSuite(InstanceMainMethodsTests.class));
205205
}
206206
addTest(new TestSuite(ProjectClasspathVariableTests.class));

0 commit comments

Comments
 (0)