This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FYI: Patch: java.net.URLStreamHandler


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]