Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4074245

java.net.URL.setURLStreamHandlerFactory() doesn't clear handlers cache

XMLWordPrintable

    • 1.1.5
    • generic
    • generic
    • Verified

        This could be bad for HotJava under JavaOS, if we ever decide to use
        setURLStreamHandlerFactory (and we might). JavaOS uses the http protocol
        before HotJava gets to run, so the http handler would already have been
        recorded in java.net.URL.handlers.

        The fix is trivial. Add this line to java.net.URL:

            public static synchronized void setURLStreamHandlerFactory(URLStreamHandlerF
        actory fac) {
                if (factory != null) {
                    throw new Error("factory already defined");
                }
                SecurityManager security = System.getSecurityManager();
                if (security != null) {
                    security.checkSetFactory();
                }
        --> handlers = new Hashtable()
                factory = fac;
            }

        A Pumpkin fix would be desirable

              brenaudsunw Benjamin Renaud (Inactive)
              bfootesunw Bill Foote (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: