Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > not really working

Thread Tools not really working

Stanimir Stamenkov
Posts: n/a
The method does its job exactly
as described in the method documentation, but seems it has really no
usage that way.

I want to relativize:


The result from the URI.relativize() method is an absolute URI. It
works as expected only when the path component of the base URI is
prefix of the path of the URI to relativize, i.e. the above base needs
to be:

Doing this test I've noticed another thing which should be considered
erroneous behavior according to the algorithm to resolve relative URIs.
If the base is:

and the URI to relativize:

the result is still:


while I expect it to be:


The documentation for the URI class also describes

> Relativization, finally, is the inverse of resolution: For any two
> normalized URIs u and v,
> u.relativize(u.resolve(v)).equals(v) and
> u.resolve(u.relativize(v)).equals(v) .

While I couldn't figure exactly what's the meaning of the above tests
they both fail using:

u =
v =

and the first fails when:

u =
v =

I've made my tests using the Sun's Java 1.4 on Windows.


Reply With Quote
Stanimir Stamenkov
Posts: n/a
/Stanimir Stamenkov/:

> I want to relativize:
> /linked_resource
> against:
> /resource

Here's a related issue at the Sun's Bug Database:

"Bug ID: 6226081 URI should be able to relativize paths with partial
roots" <>


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
really interesting... or really dull. (depends on your attitude) Java 2 09-01-2006 04:38 PM
OT : But help really really needed re: Domain Name selling, hosting etc. problem nc HTML 1 02-03-2005 07:24 PM
REALLY REALLY WERID PROBLEM!!!!pls take a look Amir ASP .Net 3 01-23-2004 06:01 PM
really really mysterious IE6 problem--secure site ultraviolet353 Computer Support 7 11-22-2003 07:56 PM
MR. ED REALLY, REALLY LOVES THE D60 !!! Annika1980 Digital Photography 9 10-28-2003 04:53 PM