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



On Oct 29, 2003, at 9:48 AM, Jeff Sturm wrote:


On Wed, 29 Oct 2003, Bryce McKinlay wrote:
On Oct 29, 2003, at 8:11 AM, Michael Koch wrote:

The attached patch fixes a mauve failure. JDK prints the port number
always
if it was present in the URL spec, even if its equal to the default
port.
This patch fixes this.

Please review and comment.

Looks fine to me - but you should also remove the comment above this code, which will now be incorrect.

The comment seems to only describe the host == null or host.equals("")
cases. But the comment doesn't make much sense to me... Michael's patch
doesn't affect whether this URL is equivalent to the original.

Well, "http://foo:80/bar"; is arguably not equivalent to "http://foo/bar"; - since parsing it would create a URL where getPort() returns a different value. So, I think Michaels patch is right and the comment is either wrong, confusing, or both!


Regards

Bryce.



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