/[classpath]/classpath/java/net/URL.java
ViewVC logotype

Diff of /classpath/java/net/URL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by mkoch, Sat Sep 27 12:41:56 2003 UTC revision 1.19 by mkoch, Sat Sep 27 13:13:02 2003 UTC
# Line 769  public final class URL implements Serial Line 769  public final class URL implements Serial
769    private static synchronized URLStreamHandler    private static synchronized URLStreamHandler
770      getURLStreamHandler (String protocol)      getURLStreamHandler (String protocol)
771    {    {
772      URLStreamHandler ph;      URLStreamHandler ph = null;
773    
774      // First, see if a protocol handler is in our cache.      // First, see if a protocol handler is in our cache.
775      if (cache_handlers)      if (cache_handlers)
# Line 792  public final class URL implements Serial Line 792  public final class URL implements Serial
792      // If a non-default factory has been set, use it to find the protocol.      // If a non-default factory has been set, use it to find the protocol.
793      if (factory != null)      if (factory != null)
794        {        {
795          ph = factory.createURLStreamHandler (protocol);          ph = factory.createURLStreamHandler (protocol);
796        }        }
797    
798      // Non-default factory may have returned null or a factory wasn't set.      // Non-default factory may have returned null or a factory wasn't set.
# Line 802  public final class URL implements Serial Line 802  public final class URL implements Serial
802          // Finally loop through our search path looking for a match.          // Finally loop through our search path looking for a match.
803          StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|");          StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|");
804                    
805          while (pkgPrefix.hasMoreTokens())          do
806            {            {
807              String clsName = pkgPrefix.nextToken() + "." + protocol + ".Handler";              String clsName = pkgPrefix.nextToken() + "." + protocol + ".Handler";
808                    
# Line 820  public final class URL implements Serial Line 820  public final class URL implements Serial
820                  // Can't instantiate; handler still null, go on to next element.                  // Can't instantiate; handler still null, go on to next element.
821                }                }
822            }            }
823            while ((ph == null ||
824                    !(ph instanceof URLStreamHandler))
825                   && pkgPrefix.hasMoreTokens());
826        }        }
827    
828      // Update the hashtable with the new protocol handler.      // Update the hashtable with the new protocol handler.

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26