diff options
author | Michael Koch <mkoch@gcc.gnu.org> | 2004-09-24 06:51:59 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2004-09-24 06:51:59 +0000 |
commit | 5bb3fc271351cc0e0d99f85bf0a491078352e81f (patch) | |
tree | 493475f4231f981378d82dc0ffb1b3154b99c857 /libjava | |
parent | 9e54846fac74773abd332da983f911334baa2c41 (diff) | |
download | gcc-5bb3fc271351cc0e0d99f85bf0a491078352e81f.zip gcc-5bb3fc271351cc0e0d99f85bf0a491078352e81f.tar.gz gcc-5bb3fc271351cc0e0d99f85bf0a491078352e81f.tar.bz2 |
[multiple changes]
2004-09-24 Guilhem Lavaux <guilhem@kaffe.org>
* java/net/URL.java (URL): Delete whitespaces in the protocol string.
2004-09-24 Jeroen Frijters <jeroen@frijters.net>
* java/net/URL.java (URL(String,String,int,String,URLStreamHandler):
Don't set authority if host isn't specified.
From-SVN: r88015
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 9 | ||||
-rw-r--r-- | libjava/java/net/URL.java | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 1a43194..234a0f3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2004-09-24 Guilhem Lavaux <guilhem@kaffe.org> + + * java/net/URL.java (URL): Delete whitespaces in the protocol string. + +2004-09-24 Jeroen Frijters <jeroen@frijters.net> + + * java/net/URL.java (URL(String,String,int,String,URLStreamHandler): + Don't set authority if host isn't specified. + 2004-09-24 Michael Koch <konqueror@gmx.de> * gnu/java/nio/PipeImpl.java: Use VMPipe for native stuff. diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index 37ddc0f..bc891f4 100644 --- a/libjava/java/net/URL.java +++ b/libjava/java/net/URL.java @@ -284,7 +284,7 @@ public final class URL implements Serializable this.host = host; this.port = port; this.authority = (host != null) ? host : ""; - if (port >= 0) + if (port >= 0 && host != null) this.authority += ":" + port; int hashAt = file.indexOf('#'); @@ -427,6 +427,8 @@ public final class URL implements Serializable throw new MalformedURLException("Absolute URL required with null context"); + protocol = protocol.trim(); + if (ph != null) { SecurityManager s = System.getSecurityManager(); |