Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 159347 Details for
Bug 294360
Duplicate entries in Classpath Resolution when importing dependencies from parent project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch with test
patch_294360.txt (text/plain), 4.35 KB, created by
Jay Arthanareeswaran
on 2010-02-17 12:45:19 EST
(
hide
)
Description:
Patch with test
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-02-17 12:45:19 EST
Size:
4.35 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaProject.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v >retrieving revision 1.427 >diff -u -r1.427 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 8 Jul 2009 07:12:08 -0000 1.427 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 17 Feb 2010 17:34:18 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 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 >@@ -2644,8 +2644,8 @@ > if (result.rawReverseMap.get(resolvedPath = resolvedEntry.getPath()) == null) { > result.rawReverseMap.put(resolvedPath, rawEntry); > result.rootPathToResolvedEntries.put(resolvedPath, resolvedEntry); >+ resolvedEntries.add(resolvedEntry); > } >- resolvedEntries.add(resolvedEntry); > if (resolvedEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY && ExternalFoldersManager.isExternalFolderPath(resolvedPath)) { > externalFoldersManager.addFolder(resolvedPath); // no-op if not an external folder or if already registered > } >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ClasspathTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java,v >retrieving revision 1.206 >diff -u -r1.206 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 3 Feb 2010 06:38:02 -0000 1.206 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 17 Feb 2010 17:34:26 -0000 >@@ -6026,7 +6026,7 @@ > } > } > /** >- * Additional test for bug 300136 - Test that the the errors are reported when the >+ * Additional test for bug 300136 - Test that the errors are reported when the > * optional attribute is not used. > * > * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=300136" >@@ -6069,5 +6069,52 @@ > JavaCore.removeClasspathVariable("INVALID_LIB", null); > } > } >+/** >+ * @bug 294360:Duplicate entries in Classpath Resolution when importing dependencies from parent project >+ * Test that duplicate entries are not added to the resolved classpath >+ * >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=294360" >+ * @throws Exception >+ */ >+public void testBug294360a() throws Exception { >+ try { >+ IJavaProject p = createJavaProject("P"); >+ addExternalLibrary(p, getExternalResourcePath("lib.jar"), new String[0], >+ new String[] { >+ "META-INF/MANIFEST.MF", >+ "Manifest-Version: 1.0\n", >+ }, >+ JavaCore.VERSION_1_4); >+ IClasspathEntry[] classpath = new IClasspathEntry[2]; >+ classpath[0] = JavaCore.newLibraryEntry(new Path(getExternalResourcePath("lib.jar")), null, null); >+ ContainerInitializer.setInitializer(new DefaultContainerInitializer(new String[] {"P", getExternalResourcePath("lib.jar")})); >+ classpath[1] = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.core.tests.model.TEST_CONTAINER")); >+ setClasspath(p, classpath); >+ >+ StringBuffer buffer = new StringBuffer( >+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + >+ "<classpath>\n" + >+ " <classpathentry kind=\"con\" path=\"org.eclipse.jdt.core.tests.model.TEST_CONTAINER\"/>\n" + >+ " <classpathentry kind=\"lib\" path=\""+ getExternalResourcePath("lib.jar") + "\">\n" + >+ " <attributes>\n" + >+ " <attribute name=\"optional\" value=\"true\"/>\n" + >+ " </attributes>\n" + >+ " </classpathentry>\n" + >+ " <classpathentry kind=\"output\" path=\"\"/>\n" + >+ "</classpath>\n"); >+ >+ editFile( >+ "/P/.classpath", >+ buffer.toString() >+ ); >+ >+ IClasspathEntry[] resolvedClasspath = p.getResolvedClasspath(true); >+ assertClasspathEquals(resolvedClasspath, >+ ""+ getExternalPath() + "lib.jar[CPE_LIBRARY][K_BINARY][isExported:false]"); >+ } finally { >+ deleteProject("P"); >+ deleteExternalResource("lib.jar"); >+ } >+} > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jarthana
:
review?
Actions:
View
|
Diff
Attachments on
bug 294360
: 159347