classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] RFC: prevent URL degeneration


From: Robert Schuster
Subject: Re: [cp-patches] RFC: prevent URL degeneration
Date: Mon, 10 Oct 2005 10:56:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20051005

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
first: I am sorry, I thought I tested this but I just saw that my test setup was
flawed (hardcoded JamVM path, have not used my latest Classpath).

Jeroen Frijters wrote:
> Robert Schuster wrote:
> 
>>2005-10-07  Robert Schuster  <address@hidden>
>>
>>    * java/net/URLStreamHandler.java:
>>    (toExternalForm): Remove superfluous leading slashes from URL
>>    paths.
> 
> 
> This patch introduces several Mauve regressions for me (on Windows):
> 
> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 1)

This test declared that these two URLs point to the same location:
file:////c:/pub/files/foobar.txt
file://c:/pub/files/foobar.txt

> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 19)
Same here:
file:////hpjavant/bgee/foobar.txt
file://hpjavant/bgee/foobar.txt

> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 31)
file:///hpjavant/bgee/foobar.txt
file:/hpjavant/bgee/foobar.txt

This test is IMHO overly strict because both URLs point to the same resource.
The first one has a "" host name while the second one has an ommitted host field
(seen by missing leading "//"). Chris' suggested me to code URL.toString() in a
a way that it uses the first form.

At this point I ran out of time to investigate more testcase. But I think these
findings provide enough stuff to argue about them.

cu
Robert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDSizAG9cfwmwwEtoRAl4/AKCSxhqC64mnXsVJBMWDtHuibw9a7wCfd+Zo
alr4SqKs14xr3NxQ1wcUCcc=
=M7nI
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]