diff options
| author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-29 14:44:51 +0000 |
|---|---|---|
| committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-29 14:44:51 +0000 |
| commit | 71712155a5c0a02ebcaf714ceaa7ffa0342139c2 (patch) | |
| tree | 5dc3769ed6c5b58f7b38af9606cdb98758ba698c /libjava | |
| parent | f7d1f9d49f3cbd7599821248c5d1cb1f45294d57 (diff) | |
| download | ppe42-gcc-71712155a5c0a02ebcaf714ceaa7ffa0342139c2.tar.gz ppe42-gcc-71712155a5c0a02ebcaf714ceaa7ffa0342139c2.zip | |
Somehow this didnt got commited due to full hard disk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73040 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/java/net/URLStreamHandler.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libjava/java/net/URLStreamHandler.java b/libjava/java/net/URLStreamHandler.java index 61b466cce6d..9198370d7ad 100644 --- a/libjava/java/net/URLStreamHandler.java +++ b/libjava/java/net/URLStreamHandler.java @@ -480,12 +480,8 @@ public abstract class URLStreamHandler if (host.length() != 0) sb.append("//").append(host); - // 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. - boolean port_needed = port > 0 && port != getDefaultPort(); - if (port_needed) + // Append port if port was in URL spec. + if (port != -1) sb.append(':').append(port); sb.append(file); |

