--- /home/tromey/gnu/Nightly/classpath/classpath/java/net/URL.java 2004-11-17 02:24:08.000000000 -0700 +++ java/net/URL.java 2004-11-17 02:16:31.000000000 -0700 @@ -857,6 +857,24 @@ { ph = factory.createURLStreamHandler(protocol); } + else if (protocol.equals("core")) + { + ph = new gnu.java.net.protocol.core.Handler(); + } + else if (protocol.equals("file")) + { + // This is an interesting case. It's tempting to think that we + // could call Class.forName ("gnu.java.net.protocol.file.Handler") to + // get the appropriate class. Unfortunately, if we do that the + // program will never terminate, because getURLStreamHandler 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". + ph = new gnu.java.net.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.