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 - v3


From: Mark Wielaard
Subject: Re: [cp-patches] RFC: prevent URL degeneration - v3
Date: Fri, 14 Oct 2005 23:41:57 +0200

Hi Robert,

On Tue, 2005-10-11 at 00:47 +0200, Robert Schuster wrote:
> I liked Marks suggestion but refined it a bit:
> 
> The "//" + authority variant is only used if ambiguity would occur, that means
> if the file part starts with "//".

Indeed. Better then my suggestion.

> 2005-10-11  Robert Schuster  <address@hidden>
> 
>         * java/net/URLStreamHandler.java:
>         (toExternalForm): Use "//" + authority format when file part starts
>         with two slashes.
> 
> This time I carefully tested with mauve. It 'breaks':
> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 1)
> got file:////c:/pub/files/foobar.txt but expected
> file://c:/pub/files/foobar.txt
> 
> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(string) (number 19)
> got file:////hpjavant/bgee/foobar.txt but expected
> file://hpjavant/bgee/foobar.txt
> 
> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file)
> (number 45)
> got file:////hpjavant/bgee/foobar.txt but expected
> file://hpjavant/bgee/foobar.txt
> 
> FAIL: gnu.testlet.java.net.URL.URLTest: new URL(protocol, host, file)
> (number 53)
> got file:////hpjavant/bgee/foobar.txt but expected
> file://hpjavant/bgee/foobar.txt
> 
> Furthermore this is exactly the bug which causes trouble [...]
> Comments?

I agree that this is precisely the ambiguity that results in problems
when using real URLs. These "tests" expect to get a broken URL where the
'host' part is replaced by either the drive letter or the first part of
the path. I cannot believe that is ever helping anybody.

I checked the mauve results with your patch applied and didn't see any
other regressions.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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