diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-19 17:55:34 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-19 17:55:34 +0000 |
commit | 51acace4cce1255942e3e3bd3a7ecbff7f5b9377 (patch) | |
tree | 88cf0d32aea197ea8e8198e1206b04c820308615 /libjava/java/net/URL.java | |
parent | 6e95df84d1be816955443d07c4935189b0341c63 (diff) | |
download | ppe42-gcc-51acace4cce1255942e3e3bd3a7ecbff7f5b9377.tar.gz ppe42-gcc-51acace4cce1255942e3e3bd3a7ecbff7f5b9377.zip |
Jumbo patch:
* Imported beans and serialization
* Updated IA-64 port
* Miscellaneous bug fixes
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/net/URL.java')
-rw-r--r-- | libjava/java/net/URL.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index f80a52f5878..5931eefa3fb 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. |