aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/URL.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@gcc.gnu.org>2000-05-19 17:55:34 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-05-19 17:55:34 +0000
commit6c80c45e3010bfe992b41dd8800d2c4b65e0d5ef (patch)
tree88cf0d32aea197ea8e8198e1206b04c820308615 /libjava/java/net/URL.java
parent021c89ed68c151c45021fccf1bb5338ee817314c (diff)
downloadgcc-6c80c45e3010bfe992b41dd8800d2c4b65e0d5ef.zip
gcc-6c80c45e3010bfe992b41dd8800d2c4b65e0d5ef.tar.gz
gcc-6c80c45e3010bfe992b41dd8800d2c4b65e0d5ef.tar.bz2
Jumbo patch:
* Imported beans and serialization * Updated IA-64 port * Miscellaneous bug fixes From-SVN: r34028
Diffstat (limited to 'libjava/java/net/URL.java')
-rw-r--r--libjava/java/net/URL.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java
index f80a52f..5931eef 100644
--- a/libjava/java/net/URL.java
+++ b/libjava/java/net/URL.java
@@ -329,6 +329,20 @@ public final class URL implements Serializable
// If a non-default factory has been set, use it to find the protocol.
if (factory != null)
handler = factory.createURLStreamHandler(protocol);
+ else if (protocol.equals ("file"))
+ {
+ // This is an interesting case. It's tempting to think that we
+ // could call Class.forName ("gnu.gcj.protocol.file.Handler") to
+ // get the appropriate class. Unfortunately, if we do that the
+ // program will never terminate, because setURLStreamHandler is
+ // eventually called by Class.forName.
+ //
+ // Treating "file" as a special case is the minimum that will
+ // fix this problem. If other protocols are required in a
+ // statically linked application they will need to be handled in
+ // the same way as "file".
+ handler = new gnu.gcj.protocol.file.Handler ();
+ }
// Non-default factory may have returned null or a factory wasn't set.
// Use the default search algorithm to find a handler for this protocol.