Patch: java.net.URLStreamHandler

Mark Wielaard mark@klomp.org
Tue Oct 28 22:11:00 GMT 2003


Hi,

I see, I can be much more clear then I was. Sorry. Next try :)

On Tue, 2003-10-28 at 22:54, Mark Wielaard wrote:
> I introduced this in
> http://gcc.gnu.org/ml/java-patches/2002-q4/msg00277.html
> Since at that time there were no Mauve regressions I didn't notice the
> subtle difference that was introduced. The Java Class Libraries Book
> does say that the port number is used if explicitly specified.

And Michael his patch follows more closely what is in the spec, so it
should go in.

> The bug fix that Tom is probably refering to was for Eclipse which does
> explicitly specifies the port, but specifies it as zero (for file URLs).
> http://gcc.gnu.org/ml/java-patches/2002-q4/msg00497.html
> 
> But Michael his patch does keep this property (although the ChangeLog
> entry implies that it doesn't).

I still like the patch. But it would be nice to explicitly mention the
port == 0 case in either the code or the ChangeLog entry. Since it is an
deliberate decision.

> > IMHO the comment should also have been killed at the time of
> > merging with classpath.
> 
> Why? The comment explains observed behaviour of another implementation
> which we think is not according to spec. I think it is helpfull since it
> explains the rational we use for not following this behaviour.

Seems that only the last few sentences of the comment were in the patch.
Hopefully when you read it in full it does make sense:

    // Note that this produces different results from JDK 1.2 as JDK 1.2
    // ignores a non-default port if host is null or "".  That is inconsistent
    // with the spec since the result of this method is spec'ed so it can be
    // used to construct a new URL that is equivalent to the original.

Cheers,

Mark



More information about the Java-patches mailing list