Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338792 - AliasManager compare method does not check host names of uri
Summary: AliasManager compare method does not check host names of uri
Status: CLOSED DUPLICATE of bug 192631
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Szymon Ptaszkiewicz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-03 07:26 EST by Martin Tauber CLA
Modified: 2012-03-12 10:34 EDT (History)
2 users (show)

See Also:


Attachments
proposed patch (1.10 KB, patch)
2011-03-03 08:16 EST, Martin Tauber CLA
sptaszkiewicz: iplog+
Details | Diff
Patch with test (10.70 KB, patch)
2012-03-09 09:16 EST, Szymon Ptaszkiewicz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Tauber CLA 2011-03-03 07:26:15 EST
Build Identifier: 20100917-0705

The AliasManager of the workspace does not check host names in the compare method.

I am using RSE to link remote file systems into my workspace. The remote filesystems look very much alike - most of the resources have the same paths e.g: hosta:/abc/def and hostb:/abc/def The AliasManager does not distinguish between these files, since it ignores the host. This results in strange behaviour. Files which are in fact on the first server suddenly occure on the second server in the package explorer view of the eclipse. Eclipse sometimes complains about files which it can't find, since it looks for them on the wrong server.

Reproducible: Always

Steps to Reproduce:
1. create a directory on host A (mkdir /user/martin/abc)
2. add a file to that directory (touch /user/martin/abc/A)
3. create a directory on host B which has exactly the same path
4. add a file to that directory with a different name to the first one (touch /user/martin/B)
5. open an fresh eclipse instance which uses RSE
6. create a project hosta
7. create a linked directory dira which links to the RSE filesystem on hosta (/user/martin/abc)
8. create a project hostb
9. create a linked directory dirb which links to the RSE filesystem on hostb (/user/martin/abc)
10. Open the package explorer and browse the workspace. The files are not where you would expect them to be.
Comment 1 Martin Tauber CLA 2011-03-03 08:16:35 EST
Created attachment 190259 [details]
proposed patch

proposed patch
Comment 2 Szymon Ptaszkiewicz CLA 2012-03-09 07:42:11 EST
Comment on attachment 190259 [details]
proposed patch

Thanks, Martin. The patch looks good.
Comment 3 Szymon Ptaszkiewicz CLA 2012-03-09 09:16:43 EST
Created attachment 212383 [details]
Patch with test
Comment 4 Szymon Ptaszkiewicz CLA 2012-03-12 10:34:25 EDT
It turned out to be a specific case of bug 192631.

*** This bug has been marked as a duplicate of bug 192631 ***