Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jdt.debug.tests/java16_/a/b/c/RecordTests.java23
-rw-r--r--org.eclipse.jdt.debug.tests/pom.xml1
-rw-r--r--org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java16
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java42
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java7
-rw-r--r--org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RecordBreakpointTests.java46
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java3
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java8
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java3
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java3
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java3
-rw-r--r--org.eclipse.jdt.launching/plugin.properties4
-rw-r--r--org.eclipse.jdt.launching/plugin.xml3
-rw-r--r--org.eclipse.jdt.launching/pom.xml4
14 files changed, 137 insertions, 29 deletions
diff --git a/org.eclipse.jdt.debug.tests/java16_/a/b/c/RecordTests.java b/org.eclipse.jdt.debug.tests/java16_/a/b/c/RecordTests.java
new file mode 100644
index 000000000..c9a11866b
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/java16_/a/b/c/RecordTests.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package a.b.c;
+record R(int i, String s) {}
+
+public class RecordTests {
+
+ public static void main(String[] args) {
+ RecordTests dt = new RecordTests();
+ }
+
+}
diff --git a/org.eclipse.jdt.debug.tests/pom.xml b/org.eclipse.jdt.debug.tests/pom.xml
index 195bb52b2..f64d9f2cd 100644
--- a/org.eclipse.jdt.debug.tests/pom.xml
+++ b/org.eclipse.jdt.debug.tests/pom.xml
@@ -5,6 +5,7 @@
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
+
Contributors:
Igor Fedorenko - initial implementation
diff --git a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
index c1656b871..b412ed4c2 100644
--- a/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
+++ b/org.eclipse.jdt.debug.tests/test plugin/org/eclipse/jdt/debug/testplugin/JavaProjectHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -63,6 +63,7 @@ public class JavaProjectHelper {
public static final String JAVA_SE_1_7_EE_NAME = "JavaSE-1.7";
public static final String JAVA_SE_1_8_EE_NAME = "JavaSE-1.8";
public static final String JAVA_SE_9_EE_NAME = "JavaSE-9";
+ public static final String JAVA_SE_16_EE_NAME = "JavaSE-16";
/**
* path to the test src for 'testprograms'
@@ -85,6 +86,10 @@ public class JavaProjectHelper {
* path to the 9 test source
*/
public static final IPath TEST_9_SRC_DIR = new Path("java9");
+ /**
+ * path to the 16 test source
+ */
+ public static final IPath TEST_16_SRC_DIR = new Path("java16_");
/**
* path to the compiler error java file
@@ -139,6 +144,15 @@ public class JavaProjectHelper {
}
/**
+ * Returns if the currently running VM is version compatible with Java 16
+ *
+ * @return <code>true</code> if a Java 16 (or greater) VM is running <code>false</code> otherwise
+ */
+ public static boolean isJava16_Compatible() {
+ return isCompatible(16);
+ }
+
+ /**
* Returns if the current running system is compatible with the given Java minor version
*
* @param ver the version to test - either 4, 5, 6, 7 or 8
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
index ab32cb61d..dec4564bc 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java
@@ -187,6 +187,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
public static final String ONE_SEVEN_PROJECT_NAME = "OneSeven";
public static final String ONE_EIGHT_PROJECT_NAME = "OneEight";
public static final String NINE_PROJECT_NAME = "Nine";
+ public static final String ONESIX_PROJECT_NAME = "One_Six";
public static final String BOUND_JRE_PROJECT_NAME = "BoundJRE";
public static final String CLONE_SUFFIX = "Clone";
@@ -239,6 +240,7 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
private static boolean loaded17 = false;
private static boolean loaded18 = false;
private static boolean loaded9 = false;
+ private static boolean loaded16_ = false;
private static boolean loadedEE = false;
private static boolean loadedJRE = false;
private static boolean loadedMulti = false;
@@ -270,6 +272,8 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
loaded18 = pro.exists();
pro = ResourcesPlugin.getWorkspace().getRoot().getProject(NINE_PROJECT_NAME);
loaded9 = pro.exists();
+ pro = ResourcesPlugin.getWorkspace().getRoot().getProject(ONESIX_PROJECT_NAME);
+ loaded16_ = pro.exists();
pro = ResourcesPlugin.getWorkspace().getRoot().getProject(BOUND_JRE_PROJECT_NAME);
loadedJRE = pro.exists();
pro = ResourcesPlugin.getWorkspace().getRoot().getProject(BOUND_EE_PROJECT_NAME);
@@ -537,6 +541,34 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
}
/**
+ * Creates the Java 16 compliant project
+ */
+ synchronized void assert16_Project() {
+ IJavaProject jp = null;
+ ArrayList<ILaunchConfiguration> cfgs = new ArrayList<>(1);
+ try {
+ if (!loaded16_) {
+ jp = createProject(ONESIX_PROJECT_NAME, JavaProjectHelper.TEST_16_SRC_DIR.toString(), JavaProjectHelper.JAVA_SE_16_EE_NAME, false);
+ cfgs.add(createLaunchConfiguration(jp, "RecordTests"));
+ loaded16_ = true;
+ waitForBuild();
+ }
+ } 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, ONESIX_PROJECT_NAME, jp);
+ }
+ }
+
+ /**
* Creates the 'BoundJRE' project used for the JRE testing
*/
synchronized void assertBoundJreProject() {
@@ -760,6 +792,16 @@ public abstract class AbstractDebugTest extends TestCase implements IEvaluation
*
* @return the test project
*/
+ protected IJavaProject get16_Project() {
+ assert16_Project();
+ return getJavaProject(ONESIX_PROJECT_NAME);
+ }
+
+ /**
+ * Returns the 'DebugTests' project.
+ *
+ * @return the test project
+ */
protected IJavaProject get14Project() {
assert14Project();
return getJavaProject(ONE_FOUR_PROJECT_NAME);
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
index ff5a25399..b1b583aef 100644
--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AutomatedSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,6 +38,7 @@ import org.eclipse.jdt.debug.tests.breakpoints.MethodBreakpointTests15;
import org.eclipse.jdt.debug.tests.breakpoints.MiscBreakpointsTests;
import org.eclipse.jdt.debug.tests.breakpoints.PatternBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.PreLaunchBreakpointTest;
+import org.eclipse.jdt.debug.tests.breakpoints.RecordBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.RunToLineTests;
import org.eclipse.jdt.debug.tests.breakpoints.SpecialExceptionBreakpointTests;
import org.eclipse.jdt.debug.tests.breakpoints.SuspendVMBreakpointsTests;
@@ -384,5 +385,9 @@ public class AutomatedSuite extends DebugSuite {
addTest(new TestSuite(AlternateStratumTests.class));
}
addTest(new TestSuite(ConditionalBreakpointsTests.class));
+
+ if (JavaProjectHelper.isJava16_Compatible()) {
+ addTest(new TestSuite(RecordBreakpointTests.class));
+ }
}
}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RecordBreakpointTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RecordBreakpointTests.java
new file mode 100644
index 000000000..4e651bd8c
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/breakpoints/RecordBreakpointTests.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2021 IBM Corporation and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.debug.tests.breakpoints;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.debug.core.IJavaClassPrepareBreakpoint;
+import org.eclipse.jdt.debug.tests.AbstractDebugTest;
+
+public class RecordBreakpointTests extends AbstractDebugTest {
+
+ public RecordBreakpointTests(String name) {
+ super(name);
+ }
+
+ /**
+ * Returns the project context for the current test - each test must implement this method
+ */
+ @Override
+ protected IJavaProject getProjectContext() {
+ return get16_Project();
+ }
+ public void testRecordClassBreakpoint() throws Exception {
+
+ try {
+ // create a classLoad breakpoint to test
+ IJavaClassPrepareBreakpoint classPrepareBreakpoint = createClassPrepareBreakpoint("a.b.c.RecordTests");
+ assertEquals("wrong type name", "a.b.c.RecordTests", classPrepareBreakpoint.getTypeName());
+ } catch (Exception e) {
+ throw e;
+ } finally {
+ removeAllBreakpoints();
+ }
+ }
+
+}
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
index de55b1fa1..27c8f899d 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
@@ -7,9 +7,6 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- * 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:
* IBM Corporation - initial API and implementation
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index ab8994f3e..0615bf961 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2020 IBM Corporation and others.
+ * Copyright (c) 2000, 2021 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,9 +7,6 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- * 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:
* IBM Corporation - initial API and implementation
@@ -850,8 +847,7 @@ public class StandardVMType extends AbstractVMInstallType {
public static URL getDefaultJavadocLocation(String version) {
try {
if (version.startsWith(JavaCore.VERSION_16)) {
- // TODO: Needs an update after Java 16 release
- return new URL("https://docs.oracle.com/en/java/javase/15/docs/api/"); //$NON-NLS-1$
+ return new URL("https://docs.oracle.com/en/java/javase/16/docs/api/"); //$NON-NLS-1$
} else if (version.startsWith(JavaCore.VERSION_15)) {
return new URL("https://docs.oracle.com/en/java/javase/15/docs/api/"); //$NON-NLS-1$
} else if (version.startsWith(JavaCore.VERSION_14)) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
index 3f6e8de39..1263e3424 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
@@ -7,9 +7,6 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- * 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:
* IBM Corporation - initial API and implementation
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
index db58fd304..ef0056c90 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
@@ -7,9 +7,6 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- * 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:
* IBM Corporation - initial API and implementation
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
index 904806fdf..e01afd6b6 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
@@ -7,9 +7,6 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- * 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:
* IBM Corporation - initial API and implementation
diff --git a/org.eclipse.jdt.launching/plugin.properties b/org.eclipse.jdt.launching/plugin.properties
index 294869a11..117a8b104 100644
--- a/org.eclipse.jdt.launching/plugin.properties
+++ b/org.eclipse.jdt.launching/plugin.properties
@@ -7,10 +7,6 @@
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
-# 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:
# IBM Corporation - initial API and implementation
###############################################################################
diff --git a/org.eclipse.jdt.launching/plugin.xml b/org.eclipse.jdt.launching/plugin.xml
index ad6aff05a..31b2d5bab 100644
--- a/org.eclipse.jdt.launching/plugin.xml
+++ b/org.eclipse.jdt.launching/plugin.xml
@@ -9,9 +9,6 @@
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
- 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:
IBM Corporation - initial API and implementation
diff --git a/org.eclipse.jdt.launching/pom.xml b/org.eclipse.jdt.launching/pom.xml
index 9eead603d..60f7ac5a1 100644
--- a/org.eclipse.jdt.launching/pom.xml
+++ b/org.eclipse.jdt.launching/pom.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2020 Eclipse Foundation and others.
+ Copyright (c) 2012, 2021 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
http://www.eclipse.org/org/documents/edl-v10.php
-
+
Contributors:
Igor Fedorenko - initial implementation
-->

Back to the top