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: Patch: java.net.URLStreamHandler


Hi,

On Tue, 2003-10-28 at 22:15, Jeff Sturm wrote:
> On Tue, 28 Oct 2003, Tom Tromey wrote:
> > Michael> The attached patch fixes a mauve failure. JDK prints the port number always
> > Michael> if it was present in the URL spec, even if its equal to the default port.
> > Michael> This patch fixes this.
> >
> > Could you look into the history of this piece of code a little?
> > I remember it going in as a bug fix at some point; I'd like to
> > understand why it now seems to be incorrect.
> 
> See below.  Essentaially Michael's patch will revert back to the pre-merge
> behavior.

Yes almost, except for the important "bug" fix.

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.

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).

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

Cheers,

Mark


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