diff options
| author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-18 00:59:33 +0000 |
|---|---|---|
| committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-18 00:59:33 +0000 |
| commit | 15d27402f51cf831d82aa31271f5c01855b4f2cf (patch) | |
| tree | 4c44aaa3ed1ee1b4f15732664c05cfc9214e1fa9 /libjava/classpath/java/net/URL.java | |
| parent | 820206ad46c6fc0131d5771ec1051267022e875d (diff) | |
| download | gcc-15d27402f51cf831d82aa31271f5c01855b4f2cf.tar.gz | |
Imported GNU Classpath gcj-import-20051117.
* gnu/java/net/protocol/file/Connection.java: Removed, fully merged.
* sources.am: Regenerated.
* Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107153 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/net/URL.java')
| -rw-r--r-- | libjava/classpath/java/net/URL.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libjava/classpath/java/net/URL.java b/libjava/classpath/java/net/URL.java index 627dbc391e9..1d947a0b46a 100644 --- a/libjava/classpath/java/net/URL.java +++ b/libjava/classpath/java/net/URL.java @@ -408,10 +408,7 @@ public final class URL implements Serializable // The 1.2 doc specifically says these are copied to the new URL. host = context.host; port = context.port; - file = context.file; userInfo = context.userInfo; - if (file == null || file.length() == 0) - file = "/"; authority = context.authority; } } @@ -423,10 +420,13 @@ public final class URL implements Serializable protocol = context.protocol; host = context.host; port = context.port; - file = context.file; userInfo = context.userInfo; - if (file == null || file.length() == 0) - file = "/"; + if (spec.indexOf(":/", 1) < 0) + { + file = context.file; + if (file == null || file.length() == 0) + file = "/"; + } authority = context.authority; } else // Protocol NOT specified in spec. and no context available. |
