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 90887 Details for
Bug 220542
Trailing separator in classpath entry lost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
220542.txt (text/plain), 3.01 KB, created by
Jerome Lanneluc
on 2008-02-27 11:48:07 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-02-27 11:48:07 EST
Size:
3.01 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.395 >diff -u -r1.395 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 26 Feb 2008 10:11:46 -0000 1.395 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 27 Feb 2008 16:40:35 -0000 >@@ -279,10 +279,14 @@ > } > } > >- // keep device only if it was specified (this is because File.getCanonicalPath() converts '/lib/classed.zip' to 'd:/lib/classes/zip') >+ // keep device only if it was specified (this is because File.getCanonicalPath() converts '/lib/classes.zip' to 'd:/lib/classes/zip') > if (externalPath.getDevice() == null) { > result = result.setDevice(null); > } >+ // keep trailing separator only if it was specified (this is because File.getCanonicalPath() converts 'd:/lib/classes/' to 'd:/lib/classes') >+ if (externalPath.hasTrailingSeparator()) { >+ result = result.addTrailingSeparator(); >+ } > // if (JavaModelManager.VERBOSE) { > // System.out.println("JAVA MODEL - Canonical path is " + result.toString()); > // } >#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.169 >diff -u -r1.169 ClasspathTests.java >--- src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 26 Feb 2008 10:11:58 -0000 1.169 >+++ src/org/eclipse/jdt/core/tests/model/ClasspathTests.java 27 Feb 2008 16:40:36 -0000 >@@ -696,11 +696,11 @@ > this.deleteProject("P"); > } > } >-/** >- * Test that a classpath entry for an external jar is externalized >+/* >+ * Ensure that a classpath entry for an external jar is externalized > * properly. > */ >-public void testClasspathExternalize() throws CoreException { >+public void testExternalize1() throws CoreException { // was testClasspathExternalize > try { > IJavaProject project= this.createJavaProject("P", new String[] {}, new String[] {getExternalJCLPathString()}, ""); > IClasspathEntry[] classpath= project.getRawClasspath(); >@@ -725,6 +725,15 @@ > this.deleteProject("P"); > } > } >+/* >+ * Ensures that a classpath entry for an external library is externalized properly. >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=220542 ) >+ */ >+public void testExternalize2() throws CoreException { >+ String externalLibPath = getExternalFolderPath("externalLib") + File.separator; >+ IClasspathEntry entry = JavaCore.newLibraryEntry(new Path(externalLibPath), null, null); >+ assertEquals("Unexpected external path", externalLibPath, entry.getPath().toOSString()); >+} > /** > * Move a root and ensure the classpath is not updated (i.e. entry not renamed). > */
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
Actions:
View
|
Diff
Attachments on
bug 220542
: 90887