Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pipeline {
}
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk25-latest'
jdk 'openjdk-jdk26-latest'
}
environment {
NON_MODULAR_JAVA_HOME = tool(type:'jdk', name:'temurin-jdk8-latest')
Expand All @@ -21,7 +21,7 @@ pipeline {
xvnc(useXauthority: true) {
sh """
mvn clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Ptest-on-javase-25 -Pbree-libs -Papi-check -Pjavadoc\
-Ptest-on-javase-26 -Pbree-libs -Papi-check -Pjavadoc\
-Dmaven.test.failure.ignore=true\
-Dcompare-version-with-baselines.skip=false \
-Dproject.build.sourceEncoding=UTF-8 \
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.tests/JDT Debug Test Suite.launch
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<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"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-26"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.jdt.debug.tests.AutomatedSuite"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jdt.debug.tests"/>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.tests/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ bin.includes = plugin.xml,\
java16_/,\
java23/,\
java24/,\
java25/,\
java26/,\
multirelease/
source.javadebugtests.jar = test plugin/,\
tests/,\
Expand Down
28 changes: 27 additions & 1 deletion org.eclipse.jdt.debug.tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2024 Eclipse Foundation and others.
Copyright (c) 2012, 2026 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
Expand Down Expand Up @@ -117,5 +117,31 @@
</plugins>
</build>
</profile>
<profile>
<id>test-on-javase-26</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<id>JavaSE-26</id>
</jdk>
</toolchains>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class JavaProjectHelper {
public static final String JAVA_SE_23_EE_NAME = "JavaSE-23";
public static final String JAVA_SE_24_EE_NAME = "JavaSE-24";
public static final String JAVA_SE_25_EE_NAME = "JavaSE-25";
public static final String JAVA_SE_26_EE_NAME = "JavaSE-26";

/**
* path to the test src for 'testprograms'
Expand Down Expand Up @@ -112,6 +113,11 @@ public class JavaProjectHelper {
*/
public static final IPath TEST_25_SRC_DIR = new Path("java25");

/**
* path to the 26 test source
*/
public static final IPath TEST_26_SRC_DIR = new Path("java26");

/**
* path to the multirelease test source
*/
Expand Down Expand Up @@ -223,6 +229,15 @@ public static boolean isJava25_Compatible() {
return isCompatible(25);
}

/**
* Returns if the currently running VM is version compatible with Java 26
*
* @return <code>true</code> if a Java 26 (or greater) VM is running <code>false</code> otherwise
*/
public static boolean isJava26_Compatible() {
return isCompatible(26);
}

/**
* Returns if the current running system is compatible with the given Java minor version
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
public static final String TWENTYTHREE_PROJECT_NAME = "Two_Three";
public static final String TWENTYFOUR_PROJECT_NAME = "Two_Four";
public static final String TWENTYFIVE_PROJECT_NAME = "Two_Five";
public static final String TWENTYSIX_PROJECT_NAME = "Two_Six";
public static final String BOUND_JRE_PROJECT_NAME = "BoundJRE";
public static final String MR_PROJECT_NAME = "MR";
public static final String CLONE_SUFFIX = "Clone";
Expand Down Expand Up @@ -256,11 +257,13 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
private static boolean loaded23 = false;
private static boolean loaded24 = false;
private static boolean loaded25 = false;
private static boolean loaded26 = false;
private static boolean loadedEE = false;
private static boolean loadedJRE = false;
private static boolean loadedMulti = false;
private static boolean loadedMR;
private static boolean welcomeClosed = false;
protected boolean isJRE26plus = false;

/**
* Constructor
Expand All @@ -270,6 +273,10 @@ public AbstractDebugTest(String name) {
// set error dialog to non-blocking to avoid hanging the UI during test
ErrorDialog.AUTOMATED_MODE = true;
SafeRunnable.setIgnoreErrors(true);
String javaVersion = System.getProperty("java.version");
if (javaVersion.startsWith("26")) {
isJRE26plus = true;
}
}

@Override
Expand Down Expand Up @@ -371,6 +378,11 @@ synchronized void assert14Project() {
handleProjectCreationException(e, ONE_FOUR_PROJECT_CLOSED_NAME, jp);
}
jp = createProject(ONE_FOUR_PROJECT_NAME, JavaProjectHelper.TEST_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_1_8_EE_NAME, false);
if (isJRE26plus) {
// these files cannot be compiled against 26+
jp.getProject().getFile("src/AppletImpl.java").delete(true, null);
jp.getProject().getFile("src/RunnableAppletImpl.java").delete(true, null);
}
IPackageFragmentRoot src = jp.findPackageFragmentRoot(new Path(ONE_FOUR_PROJECT_NAME).append(JavaProjectHelper.SRC_DIR).makeAbsolute());
assertNotNull("The 'src' package fragment root should not be null", src);
File root = JavaTestPlugin.getDefault().getFileInPlugin(new Path("testjars"));
Expand Down Expand Up @@ -750,7 +762,7 @@ synchronized void assert25Project() {
try {
if (!loaded25) {
jp = createProject(TWENTYFIVE_PROJECT_NAME, JavaProjectHelper.TEST_25_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_25_EE_NAME, false);
jp.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
jp.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED);
jp.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_25);
jp.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_25);
jp.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_25);
Expand All @@ -775,6 +787,36 @@ synchronized void assert25Project() {
}
}

synchronized void assert26Project() {
IJavaProject jp = null;
ArrayList<ILaunchConfiguration> cfgs = new ArrayList<>(1);
try {
if (!loaded26) {
jp = createProject(TWENTYSIX_PROJECT_NAME, JavaProjectHelper.TEST_26_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_26_EE_NAME, false);
jp.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.DISABLED);
jp.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_26);
jp.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_26);
jp.setOption(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_26);
cfgs.add(createLaunchConfiguration(jp, "Main1"));
cfgs.add(createLaunchConfiguration(jp, "Main2"));
loaded26 = true;
waitForBuild();
assertNoErrorMarkersExist(jp.getProject());
}
} catch (Exception e) {
try {
if (jp != null) {
jp.getProject().delete(true, true, null);
for (int i = 0; i < cfgs.size(); i++) {
cfgs.get(i).delete();
}
}
} catch (CoreException ce) {
// ignore
}
handleProjectCreationException(e, TWENTYSIX_PROJECT_NAME, jp);
}
}
/**
* Creates the 'BoundJRE' project used for the JRE testing
*/
Expand Down Expand Up @@ -1111,6 +1153,16 @@ protected IJavaProject get25Project() {
return getJavaProject(TWENTYFIVE_PROJECT_NAME);
}

/**
* Returns the 'Two_Six' project, used for Java 26 tests.
*
* @return the test project
*/
protected IJavaProject get26Project() {
assert26Project();
return getJavaProject(TWENTYSIX_PROJECT_NAME);
}

/**
* Returns the 'BoundJRE' project
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public AutomatedSuite() {
addTest(new TestSuite(ConfigurationEncodingTests.class));
addTest(new TestSuite(LaunchConfigurationManagerTests.class));
addTest(new TestSuite(LaunchConfigurationTests.class));
if (JavaProjectHelper.isJava25_Compatible()) {
if (JavaProjectHelper.isJava26_Compatible()) {
addTest(new TestSuite(InstanceMainMethodsTests.class));
}
addTest(new TestSuite(ProjectClasspathVariableTests.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public void testFileConditionalBreakpointforTrue() throws Exception {
mainThread = launchToBreakpoint(typeName);
mainThread.getTopStackFrame().stepInto();

if (JavaProjectHelper.isJava25_Compatible()) {
if (isJRE26plus) {
bp2 = createConditionalLineBreakpoint(374, "java.io.File", "true", true);
} else if (JavaProjectHelper.isJava25_Compatible()) {
bp2 = createConditionalLineBreakpoint(369, "java.io.File", "true", true);
} else {
bp2 = createConditionalLineBreakpoint(364, "java.io.File", "true", true);
Expand All @@ -77,7 +79,9 @@ public void testFileConditionalBreakpointforTrue() throws Exception {
waiter.waitForEvent();
assertTrue("Thread should be suspended", mainThread.isSuspended());
hitLine = mainThread.getStackFrames()[0].getLineNumber();
if (JavaProjectHelper.isJava25_Compatible()) {
if (isJRE26plus) {
assertEquals("Didn't suspend at the expected line", 374, hitLine);
} else if (JavaProjectHelper.isJava25_Compatible()) {
assertEquals("Didn't suspend at the expected line", 369, hitLine);
} else {
assertEquals("Didn't suspend at the expected line", 364, hitLine);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,35 @@ public class ModuleOptionsTests extends AbstractDebugTest {
+ "jdk.unsupported.desktop," //
+ "jdk.xml.dom";

private static final String ASSUMED_DEFAULT_MODULES_26 = "java.base," //
+ "java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging," //
+ "java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi," //
+ "java.scripting,java.security.jgss,java.security.sasl,java.smartcardio," //
+ "java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto," //
+ "jdk.accessibility,jdk.attach,jdk.compiler,jdk.dynalink,jdk.httpserver," //
+ "jdk.incubator.vector,"
+ "jdk.jartool,jdk.javadoc,jdk.jconsole,jdk.jdi," //
+ "jdk.jfr," //
+ "jdk.jshell,jdk.management," //
+ "jdk.management.jfr," //
+ "jdk.net,jdk.nio.mapmode," //
+ "jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported," //
+ "jdk.unsupported.desktop," //
+ "jdk.xml.dom";

private static final String ASSUMED_DEFAULT_MODULES_9_ON_26 = "java.se," //
+ "jdk.accessibility,jdk.attach,jdk.compiler,jdk.dynalink,jdk.httpserver," //
+ "jdk.incubator.vector," //
+ "jdk.jartool,jdk.javadoc,jdk.jconsole,jdk.jdi," //
+ "jdk.jfr," //
+ "jdk.jshell," //
+ "jdk.management," //
+ "jdk.management.jfr," //
+ "jdk.net," //
+ "jdk.nio.mapmode," //
+ "jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported," //
+ "jdk.unsupported.desktop," //
+ "jdk.xml.dom";
private IVMInstall defaultVM9;

public ModuleOptionsTests(String name) {
Expand Down Expand Up @@ -162,7 +191,11 @@ public void testLimitModules_release9() throws Exception {
List<String> defaultModules = getDefaultModules(javaProject);
String expectedModules;
String moduleList = String.join(",", defaultModules);
assertEquals(ASSUMED_DEFAULT_MODULES_9, moduleList);
if (Runtime.version().feature() >= 26) {
assertEquals(ASSUMED_DEFAULT_MODULES_9_ON_26, moduleList);
} else {
assertEquals(ASSUMED_DEFAULT_MODULES_9, moduleList);
}
switch (moduleList) {
case ASSUMED_DEFAULT_MODULES_9:
expectedModules = //
Expand All @@ -173,11 +206,22 @@ public void testLimitModules_release9() throws Exception {
+ "jdk.net," //
+ "jdk.nio.mapmode," //
// + "jdk.packager,jdk.packager.services,jdk.plugin.dom,"
// + "jdk.scripting.nashorn,"
// + "jdk.scripting.nashorn,"
+ "jdk.sctp,"
+ "jdk.security.auth,jdk.security.jgss,jdk.unsupported," //
+ "jdk.unsupported.desktop,jdk.xml.dom";
break;
case ASSUMED_DEFAULT_MODULES_9_ON_26:
expectedModules = "java.instrument,java.net.http,java.scripting,java.sql.rowset,java.xml.crypto," //
+ "jdk.accessibility,jdk.dynalink,jdk.httpserver,jdk.incubator.vector," //
+ "jdk.jartool,jdk.jconsole,jdk.jshell," //
+ "jdk.management.jfr," //
+ "jdk.net," //
+ "jdk.nio.mapmode," //
+ "jdk.sctp," //
+ "jdk.security.auth,jdk.security.jgss,jdk.unsupported," //
+ "jdk.unsupported.desktop,jdk.xml.dom";
break;
default:
fail("Unknown set of default modules " + moduleList);
return;
Expand Down Expand Up @@ -222,6 +266,13 @@ public void testLimitModules1() throws Exception {
+ "jdk.unsupported.desktop," //
+ "jdk.xml.dom";
break;
case ASSUMED_DEFAULT_MODULES_26:
expectedModules = "java.instrument,java.net.http,java.scripting,java.smartcardio,java.sql.rowset,java.xml.crypto,"
+ "jdk.accessibility," + "jdk.dynalink," + "jdk.httpserver," + "jdk.incubator.vector,"
+ "jdk.jartool,jdk.jconsole,jdk.jshell," + "jdk.management.jfr," + "jdk.net," + "jdk.nio.mapmode," + "jdk.sctp,"
+ "jdk.security.auth,jdk.security.jgss,jdk.unsupported," + "jdk.unsupported.desktop,"
+ "jdk.xml.dom";
break;
default:
fail("Unknown set of default modules " + moduleList);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public InstanceMainMethodsTests(String name) {

@Override
protected IJavaProject getProjectContext() {
return super.get25Project();
return super.get26Project();
}

public void testStaticMainWithoutArgs() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public void testGetJavaLaunchShortcutsForSpecificResource() {
* tests that the applet shortcut is found for a resource that extends applet
*/
public void testGetAppletLaunchShortcutsForSpecificResource() {
if (isJRE26plus) {
return;
}
assertNotNull("The launch configuration manager cannot be null", fLCM);
IResource resource = getResource("AppletImpl.java");
assertNotNull("The resource AppletImpl must exist", resource);
Expand All @@ -121,6 +124,9 @@ public void testGetAppletLaunchShortcutsForSpecificResource() {
* test that the correct shortcuts are returned for a resource which is an applet and has a main method
*/
public void testGetLaunchShortcutsForSpecificResource() {
if (isJRE26plus) {
return;
}
assertNotNull("The launch configuration manager cannot be null", fLCM);
IResource resource = getResource("RunnableAppletImpl.java");
assertNotNull("The resource RunnableAppletImpl must exist", resource);
Expand Down Expand Up @@ -197,6 +203,9 @@ public void testGetDefaultLaunchGroupForDebugMode() {
* in this test the applet and local java types should be found
*/
public void testGetApplicableLaunchConfigurationTypes() {
if (isJRE26plus) {
return;
}
assertNotNull("The launch configuration manager cannot be null", fLCM);
IResource resource = getResource("RunnableAppletImpl.java");
assertNotNull("The resource RunnableAppletImpl must exist", resource);
Expand All @@ -208,6 +217,9 @@ public void testGetApplicableLaunchConfigurationTypes() {
* tests that configuration applicable to specific resources can be found
*/
public void testGetApplicableLaunchConfigurationsForResource() {
if (isJRE26plus) {
return;
}
assertNotNull("The launch configuration manager cannot be null", fLCM);
IResource resource = getResource("RunnableAppletImpl.java");
assertNotNull("The resource RunnableAppletImpl must exist", resource);
Expand Down
Loading
Loading