diff options
author | Olivier Thomann | 2011-05-03 14:53:06 +0000 |
---|---|---|
committer | Olivier Thomann | 2011-05-03 14:53:06 +0000 |
commit | 744ca4937bcde02a39db37df803f65fc4cbcbe49 (patch) | |
tree | 38d197c67ee857ad56313cf2c0159934d7945afd | |
parent | 1882eb62bb94a584d473b60fc6a4f8000ae82649 (diff) | |
download | eclipse.jdt.core-744ca4937bcde02a39db37df803f65fc4cbcbe49.tar.gz eclipse.jdt.core-744ca4937bcde02a39db37df803f65fc4cbcbe49.tar.xz eclipse.jdt.core-744ca4937bcde02a39db37df803f65fc4cbcbe49.zip |
3.6 maintenance - Fixed bug 264301: AssertionFailedException resolving JavaProject classpath
6 files changed, 46 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF index fcc66b6523..d0426e4ebb 100644 --- a/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.core.tests.model;singleton:=true -Bundle-Version: 3.6.2.qualifier +Bundle-Version: 3.6.4.qualifier Bundle-ClassPath: jdtcoretestsmodel.jar Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java index 1b26949d75..391f44582a 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java @@ -22,6 +22,7 @@ import org.eclipse.core.resources.IncrementalProjectBuilder; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; @@ -576,6 +577,33 @@ public void testZIPArchive4() throws CoreException { } } /* + * Test that a path must have at least one segment + */ +public void test264301() throws CoreException { + String os = Platform.getOS(); + if (!Platform.OS_WIN32.equals(os)) { + return; + } + + try { + IJavaProject javaProject = createJavaProject("Test", new String[]{""}, new String[]{"/AttachSourceTests/test.jar"}, ""); + createFolder("/Test/test1"); + createFile("/Test/test1/Test.java", + "package test1;\n" + + "\n" + + "public class Test {}"); + IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(getFile("/AttachSourceTests/test.jar")); + try { + attachSource(root, "C:/", null); + assertTrue("Should not be there", false); + } catch(JavaModelException e) { + // expected exception + } + } finally { + deleteProject("Test"); + } +} +/* * Ensures that the source of a generic method can be retrieved. */ public void testGeneric1() throws JavaModelException { diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF index 3440518329..e105a4bd11 100644 --- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF +++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true -Bundle-Version: 3.6.3.qualifier +Bundle-Version: 3.6.4.qualifier Bundle-Activator: org.eclipse.jdt.core.JavaCore Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties index 942def63cf..4714040a46 100644 --- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties +++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties @@ -15,7 +15,7 @@ #Format: compiler.name = word1 word2 word3 compiler.name = Eclipse Compiler for Java(TM) #Format: compiler.version = 0.XXX[, other words (don't forget the comma if adding other words)] -compiler.version = 0.A77_R36x, 3.6.3 +compiler.version = 0.A78_R36x, 3.6.4 compiler.copyright = Copyright IBM Corp 2000, 2010. All rights reserved. ### progress diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html index 3d77bc6bb0..62efcce8d8 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -40,6 +40,19 @@ </td> </tr> </table> +<a name="v_A78_R36x"></a> +<hr><h1> +Eclipse Platform Build Notes<br> +Java development tools core</h1> +Eclipse SDK 3.6.4 - %date% - 3.6.4 +<br>Project org.eclipse.jdt.core v_A78_R36x +(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A78_R36x">cvs</a>). +<h2>What's new in this drop</h2> + +<h3>Problem Reports Fixed</h3> +<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264301">264301</a> +AssertionFailedException resolving JavaProject classpath + <a name="v_A77_R36x"></a> <hr><h1> Eclipse Platform Build Notes<br> diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java index 150768e245..318fc9cd67 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java @@ -87,7 +87,8 @@ public class ExternalFoldersManager { public static boolean isExternalFolderPath(IPath externalPath) { if (externalPath == null) return false; - if (ResourcesPlugin.getWorkspace().getRoot().getProject(externalPath.segment(0)).exists()) + String firstSegment = externalPath.segment(0); + if (firstSegment != null && ResourcesPlugin.getWorkspace().getRoot().getProject(firstSegment).exists()) return false; File externalFolder = externalPath.toFile(); if (externalFolder.isFile()) |