Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338565 - [common] URIUtil.append doesn't work as expected (on windows)
Summary: [common] URIUtil.append doesn't work as expected (on windows)
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.components-inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 12:35 EST by Ian Bull CLA
Modified: 2019-05-12 12:40 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2011-03-01 12:35:51 EST
When using URIUtil.append(new URI("file:///c:/foo", "bar");

It returned
"file:/c:/foo/bar" instead of
"file:///c:/foo/bar" (notice the extra slashes).

This fine, until you try to make relative URIs from this.  In that case, the devices are different.

Here is a snippet that demonstrates what I mean:

public static void main(String[] args) throws URISyntaxException {
    URI uri1 = new URI("file:///c:/foo");
    URI uri2 = URIUtil.append(uri1, "bar");

    // Expected output: ..
    System.out.println(URIUtil.makeRelative(uri1, uri2));
    // Actual output: file:///c:/foo  <-- an absolte URI?
}
Comment 1 Eclipse Genie CLA 2019-05-12 12:40:28 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.