URL.java (getURLStreamHandler): Compile fixes.
authorMichael Koch <konqueror@gmx.de>
Sat, 27 Sep 2003 13:09:19 +0000 (13:09 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Sat, 27 Sep 2003 13:09:19 +0000 (13:09 +0000)
2003-09-27  Michael Koch  <konqueror@gmx.de>

* java/net/URL.java (getURLStreamHandler): Compile fixes.

From-SVN: r71853

libjava/ChangeLog
libjava/java/net/URL.java

index 8cd4e1e013e28f5072c13472b3c0902d3b2c7965..88c212ad430973a95075e027eb7c1480b9e59762 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-27  Michael Koch  <konqueror@gmx.de>
+
+       * java/net/URL.java (getURLStreamHandler): Compile fixes.
+
 2003-09-27  Michael Koch  <konqueror@gmx.de>
 
        * java/net/URL.java (getURLStreamHandler):
index 0e0f3186945e8e34666abf78159536be35ff97c0..0713c49a2c039591ee982b932ea6df439b645d26 100644 (file)
@@ -106,6 +106,11 @@ import java.util.StringTokenizer;
   * caching behavior is disabled.  This property is specific to this
   * implementation.  Sun's JDK may or may not do protocol caching, but it
   * almost certainly does not examine this property.
+  * <p>
+  * Please also note that an application can install its own factory for
+  * loading protocol handlers (see setURLStreamHandlerFactory).  If this is
+  * done, then the above information is superseded and the behavior of this
+  * class in loading protocol handlers is dependent on that factory.
   *
   * @author Aaron M. Renn <arenn@urbanophile.com>
   * @author Warren Levy <warrenl@cygnus.com>
@@ -751,7 +756,7 @@ public final class URL implements Serializable
   private static synchronized URLStreamHandler
     getURLStreamHandler (String protocol)
   {
-    URLStreamHandler ph;
+    URLStreamHandler ph = null;
 
     // First, see if a protocol handler is in our cache.
     if (cache_handlers)
@@ -797,7 +802,7 @@ public final class URL implements Serializable
        propVal = propVal + "gnu.gcj.protocol|sun.net.www.protocol";
 
        // Finally loop through our search path looking for a match.
-       StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|");
+       StringTokenizer pkgPrefix = new StringTokenizer (propVal, "|");
         
        do
           {