Skip to content

Commit

Permalink
Revert "Merge Master to Beta Java 21 (#286)"
Browse files Browse the repository at this point in the history
This reverts commit a0d53fa.
  • Loading branch information
SarikaSinha committed Aug 1, 2023
1 parent a0d53fa commit bab855b
Show file tree
Hide file tree
Showing 79 changed files with 448 additions and 879 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.jdi.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: JDI Tests
Bundle-SymbolicName: org.eclipse.jdt.debug.jdi.tests; singleton:=true
Bundle-Version: 1.1.100.qualifier
Bundle-Version: 1.1.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: Eclipse
Require-Bundle: org.junit,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.jdi.tests/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.debug.jdi.tests</artifactId>
<version>1.1.100-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public void testJDIInvokeMethodFail() {
Exception good = null;
Exception oops = null;
try {
fType.invokeMethod(thread, inv2, new ArrayList<>(), 0);
fType.invokeMethod(thread, inv2, new ArrayList<Value>(), 0);
} catch (InvocationException exc) {
good = exc;
} catch (Exception exc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ public void testGetInstanceCountsNullAttrib() {
public void testGetInstanceCountsUnsupported() {
if(is16OrGreater()) {
try {
fVM.instanceCounts(new ArrayList<>());
fVM.instanceCounts(new ArrayList<ReferenceType>());
}
catch(UnsupportedOperationException uoe) {
fail("Threw unsupported exception in 1.6 VM");
}
}
else {
try {
fVM.instanceCounts(new ArrayList<>());
fVM.instanceCounts(new ArrayList<ReferenceType>());
fail("No exception for non 1.6 VM");
}
catch(UnsupportedOperationException uoe) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public void testJDIInvokeMethodFail() {
Method inv = ct.concreteMethodByName("invoke4", "()J");
Exception good = null, oops = null;
try {
fObject.invokeMethod(thread, inv, new ArrayList<>(), 0);
fObject.invokeMethod(thread, inv, new ArrayList<Value>(), 0);
} catch (ClassNotLoadedException exc) {
oops = exc;
} catch (IncompatibleThreadStateException exc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.sun.jdi.ReferenceType;
import com.sun.jdi.StackFrame;
import com.sun.jdi.ThreadReference;
import com.sun.jdi.Value;
import com.sun.jdi.event.ThreadDeathEvent;
import com.sun.jdi.event.ThreadStartEvent;
import com.sun.jdi.request.ThreadDeathRequest;
Expand Down Expand Up @@ -193,7 +194,7 @@ public void testJDIStop() {
threadDeathClass.newInstance(
thread,
constructor,
new java.util.LinkedList<>(),
new java.util.LinkedList<Value>(),
ClassType.INVOKE_SINGLE_THREADED);
threadDeath.disableCollection();
// This object is going to be used for the lifetime of the VM.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.sun.jdi.event.AccessWatchpointEvent;
import com.sun.jdi.event.ModificationWatchpointEvent;
import com.sun.jdi.event.WatchpointEvent;
import com.sun.jdi.request.EventRequest;
import com.sun.jdi.request.EventRequestManager;

/**
Expand Down Expand Up @@ -79,9 +80,9 @@ public void localTearDown() {
// Delete the event requests we created in this test
EventRequestManager requestManager = fVM.eventRequestManager();
requestManager.deleteEventRequests(
new ArrayList<>(requestManager.accessWatchpointRequests()));
new ArrayList<EventRequest>(requestManager.accessWatchpointRequests()));
requestManager.deleteEventRequests(
new ArrayList<>(requestManager.modificationWatchpointRequests()));
new ArrayList<EventRequest>(requestManager.modificationWatchpointRequests()));

// Set the value of the "fBool" field back to its original value
resetField();
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.100.qualifier
Bundle-Version: 3.12.0.qualifier
Bundle-ClassPath: javadebugtests.jar
Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
Bundle-Vendor: %providerName
Expand Down
1 change: 0 additions & 1 deletion org.eclipse.jdt.debug.tests/forceQualifierUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# To force a version qualifier update, add the bug here
Bug 530709 - Comparator errors in jdt debug and jdt ui in I20180204-2000
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/1184
36 changes: 0 additions & 36 deletions org.eclipse.jdt.debug.tests/java16_/a/b/c/RecordInnerTests.java

This file was deleted.

2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug.tests/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.debug.tests</artifactId>
<version>3.12.100-SNAPSHOT</version>
<version>3.12.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class FinalBreakpointLocations {
public int bar = 0;
public static final int foo = 0;
public final int foo = 0;
public final FinalBreakpointLocations ft1 = new FinalBreakpointLocations() {
public void method() {
System.out.println("ft1"); //bp here
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021, 2023 IBM Corporation and others.
* 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
Expand Down Expand Up @@ -58,18 +58,4 @@ public void testRecordLineBreakpoint() throws Exception {
}
}

public void testInnerRecordLineBreakpoint() throws Exception {

try {
// create a classLoad breakpoint to test
IJavaLineBreakpoint lineBreakpoint = createLineBreakpoint(18, "a.b.c.RecordInnerTests");
assertEquals("wrong type name", "a.b.c.RecordInnerTests", lineBreakpoint.getTypeName());
assertEquals("Breakpoint not at line number 18", 18, lineBreakpoint.getLineNumber());
} catch (Exception e) {
throw e;
} finally {
removeAllBreakpoints();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ private void testOutput(String mainTypeName, String vmArgs, String programArgs,
workingCopy.setAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, env);

IVMInstall vm = JavaRuntime.getVMInstall(get14Project());
assertNotNull("should be able to get a VM install from the 1.4 project", vm);
assertNotNull("shold be able to get the default VM install from the 1.4 project", vm);
if (fUseArgfile) {
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(JavaRuntime.getExecutionEnvironmentsManager().getEnvironment("JavaSE-9")).toString());
assertTrue("test requires a JVM >= 9", JavaRuntime.isModularJava(vm));
}
//workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(vm).toPortableString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void testJRELibResolution() throws CoreException {
assertNotNull("no default JRE", vm);
LibraryLocation[] libs = JavaRuntime.getLibraryLocations(vm);
assertTrue("no default libs", libs.length > 0);
assertEquals("Should resolve to location of local JRE", libs[0].getSystemLibraryPath().toOSString().toLowerCase(), resolved[0].getPath().toOSString().toLowerCase());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
*******************************************************************************/
package org.eclipse.jdt.debug.tests.sourcelookup;

import java.io.File;
import java.util.Arrays;
import java.util.function.Predicate;
import java.util.Objects;
import java.util.stream.Stream;

import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.IPath;
Expand All @@ -33,10 +29,6 @@
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.launching.JavaSourceLookupDirector;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
import org.junit.After;

/**
* Tests for bug 565462.
Expand All @@ -46,33 +38,10 @@ public class Bug565462Tests extends AbstractDebugTest {
private static final String MODULE_JRE_PROJECT_NAME = "ModuleJREProject";
private static final String NON_MODULE_JRE_PROJECT_NAME = "NonModuleJREProject";

private IExecutionEnvironment javaSE11;
private IVMInstall defaultJavaSE11VM;

public Bug565462Tests(String name) {
super(name);
}

@Override
protected void setUp() throws Exception {
super.setUp();
this.javaSE11 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment("JavaSE-11");
this.defaultJavaSE11VM = javaSE11.getDefaultVM();
Predicate<IVMInstall> hasSource = vm -> vm != null && vm.getInstallLocation() != null && new File(vm.getInstallLocation(), "lib/src.zip").isFile();
if (!hasSource.test(defaultJavaSE11VM)) {
Stream.of(javaSE11.getCompatibleVMs()).filter(Objects::nonNull).filter(hasSource)
.findAny()
.ifPresent(javaSE11::setDefaultVM);
}
assertTrue("Default VM doesn't have source", hasSource.test(javaSE11.getDefaultVM()));
}

@After
public void tearDown() throws Exception {
javaSE11.setDefaultVM(defaultJavaSE11VM);
super.tearDown();
}

/**
* Test for bug 565462.
*
Expand Down Expand Up @@ -109,11 +78,8 @@ public void testFindDuplicatesBug565462() throws Exception {
director.setFindDuplicates(true);

String className = "java/lang/Class.java";
File srcFile = new File(JavaRuntime.computeVMInstall(configuration).getInstallLocation(), "lib/src.zip");
assertTrue(srcFile.getAbsolutePath() + " doesn't exist", srcFile.isFile());
Object[] foundElements = director.findSourceElements(className);
assertEquals("Expected only 1 match for class " + className + " in " + JavaRuntime.computeVMInstall(configuration).getInstallLocation() + " but found: " + Arrays.toString(foundElements), 1, foundElements.length);

assertEquals("Expected only 1 match for class " + className + ", but found: " + Arrays.toString(foundElements), 1, foundElements.length);
}

private static void removeModuleAttribute(IJavaProject javaProject) throws JavaModelException {
Expand Down

0 comments on commit bab855b

Please sign in to comment.