diff options
author | Jay Arthanareeswaran | 2018-02-15 10:21:22 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2018-02-15 10:31:58 +0000 |
commit | b970fee63ce679d80b7e665b70dcbd93d014a258 (patch) | |
tree | 2e2a05fc33b986f8d1db92aaefcbad0fac19939c /org.eclipse.jdt.core.tests.builder | |
parent | fdfafc4255f4c74cef970e0798fa2c02a50dd255 (diff) | |
download | eclipse.jdt.core-b970fee63ce679d80b7e665b70dcbd93d014a258.tar.gz eclipse.jdt.core-b970fee63ce679d80b7e665b70dcbd93d014a258.tar.xz eclipse.jdt.core-b970fee63ce679d80b7e665b70dcbd93d014a258.zip |
Revert "Bug 490103 - [1.9] JREContainer should work without anyI20180216-0415I20180215-2000
physical"
This reverts commits:
1e07a149262601f724e34444775f518eaaad79c5
188fa56efe8177767cc56dcd855b230ba7fb1280
2ed5e9f0108829acbbe3e972fb83419bf7505793
Change-Id: I54c70c37dcba29110ef2bce6f5f8e818ecd3ba69
Signed-off-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
Diffstat (limited to 'org.eclipse.jdt.core.tests.builder')
2 files changed, 6 insertions, 33 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java index 30a26713df..b60fa4a25f 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/BuildpathTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -30,23 +30,11 @@ import java.io.FileInputStream; import java.io.IOException; import java.util.*; -import javax.lang.model.SourceVersion; - @SuppressWarnings({"unchecked", "rawtypes"}) public class BuildpathTests extends BuilderTests { -private boolean jre9 = false; - public BuildpathTests(String name) { super(name); - try { - SourceVersion valueOf = SourceVersion.valueOf("RELEASE_9"); - if (valueOf != null) { - this.jre9 = true; - } - } catch(Exception e) { - //nothing to do - } } public static Test suite() { @@ -104,13 +92,7 @@ public void testClasspathFileChange() throws JavaModelException { buffer.append(" <classpathentry kind=\"src\" path=\"src2\"/>\n"); // add src2 on classpath through resource change //$NON-NLS-1$ String[] classlibs = Util.getJavaClassLibs(); for (int i = 0; i < classlibs.length; i++) { - if (classlibs[i].endsWith("jrt-fs.jar")) { - IPath path = new Path(classlibs[i]); - path = path.removeLastSegments(2); - buffer.append(" <classpathentry kind=\"jrt\" path=\"").append(path.toOSString()).append("\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ - } else { - buffer.append(" <classpathentry kind=\"lib\" path=\"").append(classlibs[i]).append("\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ - } + buffer.append(" <classpathentry kind=\"lib\" path=\"").append(classlibs[i]).append("\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$ } buffer.append(" <classpathentry kind=\"output\" path=\"bin\"/>\n"); //$NON-NLS-1$ buffer.append("</classpath>"); //$NON-NLS-1$ @@ -783,7 +765,7 @@ public void testMissingLibrary4() throws JavaModelException { } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=172345 public void testIncompatibleJdkLEvelOnProject() throws JavaModelException { - if (this.jre9) return; + // Create project IPath projectPath = env.addProject("Project"); IJavaProject project = env.getJavaProject(projectPath); @@ -840,7 +822,7 @@ public void testIncompatibleJdkLEvelOnProject() throws JavaModelException { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=172345 public void testIncompatibleJdkLEvelOnWksp() throws JavaModelException { - if (this.jre9) return; + // Save preference JavaModelManager manager = JavaModelManager.getJavaModelManager(); IEclipsePreferences preferences = manager.getInstancePreferences(); diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java index c2ccd230ec..86a3ee2b17 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/TestingEnvironment.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2018 IBM Corporation and others. + * Copyright (c) 2000, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,7 +20,6 @@ import org.eclipse.jdt.core.tests.util.Util; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.core.ClasspathEntry; -import org.eclipse.jdt.internal.core.JavaModelManager; import org.eclipse.jdt.internal.core.JavaProject; import org.eclipse.jdt.internal.core.nd.indexer.Indexer; @@ -297,15 +296,7 @@ public void addClassFolder(IPath projectPath, IPath classFolderPath, boolean isE public void addExternalJars(IPath projectPath, String[] jars, boolean isExported) throws JavaModelException { for (int i = 0, max = jars.length; i < max; i++) { String jar = jars[i]; - if (JavaModelManager.isJrtInstallation(jar) || jar.endsWith("jrt-fs.jar")) { - IPath path = new Path(jar); - if (jar.endsWith("jrt-fs.jar")) { - path = path.removeLastSegments(2); - } - addEntry(projectPath, JavaCore.newJrtEntry(path, null, null, null, null, isExported)); - } else { - addEntry(projectPath, JavaCore.newLibraryEntry(new Path(jar), null, null, isExported)); - } + addEntry(projectPath, JavaCore.newLibraryEntry(new Path(jar), null, null, isExported)); } } |