Skip to content

Commit

Permalink
Merge BETA_JAVA23 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jarthana authored Sep 18, 2024
2 parents 11d1f99 + 212fb34 commit 740b3b5
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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-21 -Pbree-libs -Papi-check -Pjavadoc\
-Ptest-on-javase-23 -Pbree-libs -Papi-check -Pjavadoc\
-Dmaven.test.failure.ignore=true\
-Dcompare-version-with-baselines.skip=false \
-Dproject.build.sourceEncoding=UTF-8 \
Expand Down
6 changes: 3 additions & 3 deletions org.eclipse.jdt.debug.jdi.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, 2022 Eclipse Foundation and others.
Copyright (c) 2012, 2024 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 @@ -59,7 +59,7 @@
</build>
<profiles>
<profile>
<id>test-on-javase-21</id>
<id>test-on-javase-23</id>
<build>
<plugins>
<plugin>
Expand All @@ -76,7 +76,7 @@
<configuration>
<toolchains>
<jdk>
<id>JavaSE-21</id>
<id>JavaSE-23</id>
</jdk>
</toolchains>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2022 IBM Corporation and others.
* Copyright (c) 2000, 2024 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -751,8 +751,7 @@ private void launchJavaTarget() {

commandLine.add("-classpath");
commandLine.add(fClassPath);
commandLine.add("-Xdebug");
commandLine.add("-Xnoagent");
addDebugOptions(commandLine);
commandLine.add("-Djava.compiler=NONE");
commandLine.add("-Xrunjdwp:transport=dt_socket,address=" + fBackEndPort + ",suspend=y,server=y");
injectVMArgs(commandLine);
Expand Down Expand Up @@ -795,8 +794,7 @@ private void launchSunTarget() {
}
commandLine.add("-classpath");
commandLine.add(fClassPath);
commandLine.add("-Xdebug");
commandLine.add("-Xnoagent");
addDebugOptions(commandLine);
commandLine.add("-Djava.compiler=NONE");
commandLine.add("-Xrunjdwp:transport=dt_socket,address=" + fBackEndPort + ",suspend=y,server=y");
injectVMArgs(commandLine);
Expand Down Expand Up @@ -830,8 +828,7 @@ private void launchIBMTarget() {

commandLine.add("-classpath");
commandLine.add(fClassPath);
commandLine.add("-Xdebug");
commandLine.add("-Xnoagent");
addDebugOptions(commandLine);
commandLine.add("-Djava.compiler=NONE");
commandLine.add("-Xrunjdwp:transport=dt_socket,address=" + fBackEndPort + ",suspend=y,server=y");
injectVMArgs(commandLine);
Expand All @@ -844,6 +841,26 @@ private void launchIBMTarget() {
}
}

private void addDebugOptions(Vector<String> commandLine) {
int vmVersion = 0;
try {
String versionString = System.getProperty("java.specification.version");
if (versionString != null) {
String[] nums = versionString.split("\\.");
if (nums.length > 0) {
vmVersion = Integer.parseInt(nums[0]);
}
}
} catch (Exception e) {
// Ignore
}
if (vmVersion < 22) {
commandLine.add("-Xdebug");
}
if (vmVersion < 23) {
commandLine.add("-Xnoagent");
}
}
protected String getMainClassName() {
return "org.eclipse.debug.jdi.tests.program.MainClass";
}
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.debug.tests; singleton:=true
Bundle-Version: 3.12.500.qualifier
Bundle-Version: 3.12.550.qualifier
Bundle-ClassPath: javadebugtests.jar
Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
Bundle-Vendor: %providerName
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.jdt.debug.tests/build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2003, 2014 IBM Corporation and others.
# Copyright (c) 2003, 2024 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -26,7 +26,7 @@ bin.includes = plugin.xml,\
java8/,\
java9/,\
java16_/,\
java22/
java23/
source.javadebugtests.jar = test plugin/,\
tests/,\
console tests/
Expand Down
8 changes: 4 additions & 4 deletions 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, 2023 Eclipse Foundation and others.
Copyright (c) 2012, 2024 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 All @@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.debug.tests</artifactId>
<version>3.12.500-SNAPSHOT</version>
<version>3.12.550-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<testSuite>${project.artifactId}</testSuite>
Expand Down Expand Up @@ -48,7 +48,7 @@
</build>
<profiles>
<profile>
<id>test-on-javase-21</id>
<id>test-on-javase-23</id>
<build>
<plugins>
<plugin>
Expand All @@ -65,7 +65,7 @@
<configuration>
<toolchains>
<jdk>
<id>JavaSE-21</id>
<id>JavaSE-23</id>
</jdk>
</toolchains>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class JavaProjectHelper {
public static final String JAVA_SE_9_EE_NAME = "JavaSE-9";
public static final String JAVA_SE_16_EE_NAME = "JavaSE-16";
public static final String JAVA_SE_21_EE_NAME = "JavaSE-21";
public static final String JAVA_SE_22_EE_NAME = "JavaSE-22";
public static final String JAVA_SE_23_EE_NAME = "JavaSE-23";

/**
* path to the test src for 'testprograms'
Expand Down Expand Up @@ -97,9 +97,9 @@ public class JavaProjectHelper {
*/
public static final IPath TEST_21_SRC_DIR = new Path("java21");
/**
* path to the 22 test source
* path to the 23 test source
*/
public static final IPath TEST_22_SRC_DIR = new Path("java22");
public static final IPath TEST_23_SRC_DIR = new Path("java23");

/**
* path to the compiler error java file
Expand Down Expand Up @@ -181,12 +181,12 @@ public static boolean isJava21_Compatible() {
}

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
public static final String NINE_PROJECT_NAME = "Nine";
public static final String ONESIX_PROJECT_NAME = "One_Six";
public static final String TWENTYONE_PROJECT_NAME = "Two_One";
public static final String TWENTYTWO_PROJECT_NAME = "Two_Two";
public static final String TWENTYTHREE_PROJECT_NAME = "Two_Three";
public static final String BOUND_JRE_PROJECT_NAME = "BoundJRE";
public static final String CLONE_SUFFIX = "Clone";

Expand Down Expand Up @@ -236,7 +236,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
private static boolean loaded9 = false;
private static boolean loaded16_ = false;
private static boolean loaded21 = false;
private static boolean loaded22 = false;
private static boolean loaded23 = false;
private static boolean loadedEE = false;
private static boolean loadedJRE = false;
private static boolean loadedMulti = false;
Expand Down Expand Up @@ -617,19 +617,22 @@ synchronized void assert21Project() {
}

/**
* Creates the Java 21 compliant project
* Creates the Java 23 compliant project
*/
synchronized void assert22Project() {
synchronized void assert23Project() {
IJavaProject jp = null;
ArrayList<ILaunchConfiguration> cfgs = new ArrayList<>(1);
try {
if (!loaded22) {
jp = createProject(TWENTYTWO_PROJECT_NAME, JavaProjectHelper.TEST_22_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_22_EE_NAME, false);
if (!loaded23) {
jp = createProject(TWENTYTHREE_PROJECT_NAME, JavaProjectHelper.TEST_23_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_23_EE_NAME, false);
jp.setOption(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
jp.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_23);
jp.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_23);
cfgs.add(createLaunchConfiguration(jp, "Main1"));
cfgs.add(createLaunchConfiguration(jp, "Main2"));
loaded22 = true;
loaded23 = true;
waitForBuild();
assertNoErrorMarkersExist(jp.getProject());
}
} catch (Exception e) {
try {
Expand All @@ -642,7 +645,7 @@ synchronized void assert22Project() {
} catch (CoreException ce) {
// ignore
}
handleProjectCreationException(e, TWENTYTWO_PROJECT_NAME, jp);
handleProjectCreationException(e, TWENTYTHREE_PROJECT_NAME, jp);
}
}

Expand Down Expand Up @@ -943,13 +946,13 @@ protected IJavaProject get21Project() {
}

/**
* Returns the 'Two_One' project, used for Java 21 tests.
* Returns the 'Two_Three' project, used for Java 23 tests.
*
* @return the test project
*/
protected IJavaProject get22Project() {
assert22Project();
return getJavaProject(TWENTYTWO_PROJECT_NAME);
protected IJavaProject get23Project() {
assert23Project();
return getJavaProject(TWENTYTHREE_PROJECT_NAME);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public AutomatedSuite() {
addTest(new TestSuite(ConfigurationEncodingTests.class));
addTest(new TestSuite(LaunchConfigurationManagerTests.class));
addTest(new TestSuite(LaunchConfigurationTests.class));
if (JavaProjectHelper.isJava22_Compatible()) {
if (JavaProjectHelper.isJava23_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 @@ -26,7 +26,7 @@ public InstanceMainMethodsTests(String name) {

@Override
protected IJavaProject getProjectContext() {
return super.get22Project();
return super.get23Project();
}

public void testStaticMainWithoutArgs() throws Exception {
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.launching/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.launching; singleton:=true
Bundle-Version: 3.23.0.qualifier
Bundle-Version: 3.23.50.qualifier
Bundle-Activator: org.eclipse.jdt.internal.launching.LaunchingPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ public static String getCompilerCompliance(IVMInstall2 vMInstall) {
String version = vMInstall.getJavaVersion();
if (version == null) {
return null;
} else if (version.startsWith(JavaCore.VERSION_23)) {
return JavaCore.VERSION_23;
} else if (version.startsWith(JavaCore.VERSION_22)) {
return JavaCore.VERSION_22;
} else if (version.startsWith(JavaCore.VERSION_21)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,10 @@ public URL getDefaultJavadocLocation(File installLocation) {
*/
public static URL getDefaultJavadocLocation(String version) {
try {
if (version.startsWith(JavaCore.VERSION_22)) {
// To modify to version 22 after the release
if (version.startsWith(JavaCore.VERSION_23)) {
// To modify to version 23 after the release
return new URI("https://docs.oracle.com/en/java/javase/23/docs/api/").toURL(); //$NON-NLS-1$
} else if (version.startsWith(JavaCore.VERSION_22)) {
return new URI("https://docs.oracle.com/en/java/javase/22/docs/api/").toURL(); //$NON-NLS-1$
} else if (version.startsWith(JavaCore.VERSION_21)) {
return new URL("https://docs.oracle.com/en/java/javase/21/docs/api/"); //$NON-NLS-1$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
mappings.put(JavaSE_1_8, new String[] { JavaSE_1_7 });
mappings.put(JavaSE_9, new String[] { JavaSE_1_8 });
mappings.put(JavaSE_10, new String[] { JavaSE_9 });
mappings.put(JavaSE_10_Plus, new String[] { JavaSE_22 });
mappings.put(JavaSE_10_Plus, new String[] { JavaSE_23 });
mappings.put(JavaSE_11, new String[] { JavaSE_10 });
mappings.put(JavaSE_12, new String[] { JavaSE_11 });
mappings.put(JavaSE_13, new String[] { JavaSE_12 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3385,8 +3385,11 @@ private static void updateCompliance(IVMInstall vm) {
} else if (javaVersion.startsWith(JavaCore.VERSION_22)
&& (javaVersion.length() == JavaCore.VERSION_22.length() || javaVersion.charAt(JavaCore.VERSION_22.length()) == '.')) {
compliance = JavaCore.VERSION_22;
} else if (javaVersion.startsWith(JavaCore.VERSION_23)
&& (javaVersion.length() == JavaCore.VERSION_23.length() || javaVersion.charAt(JavaCore.VERSION_23.length()) == '.')) {
compliance = JavaCore.VERSION_23;
} else {
compliance = JavaCore.VERSION_22; // use latest by default
compliance = JavaCore.VERSION_23; // use latest by default
}

Hashtable<String, String> options= JavaCore.getOptions();
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.launching/plugin.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2000, 202 IBM Corporation and others.
# Copyright (c) 2000, 2024 IBM Corporation and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.launching/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.launching</artifactId>
<version>3.23.0-SNAPSHOT</version>
<version>3.23.50-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<build>
Expand Down
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
This is an implementation of an early-draft specification developed under the Java
Community Process (JCP) and is made available for testing and evaluation purposes
only. The code is not compatible with any specification of the JCP.
Contributors:
Igor Fedorenko - initial implementation
-->
Expand Down

0 comments on commit 740b3b5

Please sign in to comment.