summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--java/net/URLStreamHandler.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9773c20a5..bc104b3c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+2002-12-24 Mark Wielaard <mark@klomp.org>
+
+ * java/net/URLStreamHandler.java (toExternalForm): Ignore port
+ if zero or smaller.
+
2002-12-24 Daryl Lee <dolee@sources.redhat.com>
+
* java/io/PipedWriter.java: corrected connect(); test to check if
already connected was invalid.
diff --git a/java/net/URLStreamHandler.java b/java/net/URLStreamHandler.java
index b051869b5..2c853d4fe 100644
--- a/java/net/URLStreamHandler.java
+++ b/java/net/URLStreamHandler.java
@@ -438,7 +438,7 @@ public abstract class URLStreamHandler
// 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.
- boolean port_needed = port >= 0 && port != getDefaultPort();
+ boolean port_needed = port > 0 && port != getDefaultPort();
if (port_needed)
sb.append(':').append(port);