This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Patch: java.net.URLStreamHandler
- From: Mark Wielaard <mark at klomp dot org>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: java-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2003 23:54:17 +0100
- Subject: Re: FYI: Patch: java.net.URLStreamHandler
- References: <E1AEnny-0002he-00@majestix.konqueror.de>
Hi,
On Wed, 2003-10-29 at 12:48, Michael Koch wrote:
> I commited now a slightly different patch to java.net.URLStreamHandler. I
> hope everyone is okay with it after the discussion yesterday.
No, your original patch was correct. This patch doesn't work correctly
for URLs constructed with a zero port.
As I said in my previous mail Eclipse creates such URLs.
See for example what the following gives with your new patch:
new URL("file", null, 0, "somedir/somefile").toString();
Please change it back to read:
if (port > 0).
BTW. The above example should also make the comment (that your new patch
now also removes) more clear. Another solution would be to not print the
port number when the host field is null, but we choose not to do this
since we think that is not according to spec (even though some
implementations seem to do it that way).
Cheers,
Mark