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

URLClassLoader: Circumstance under which new URLs wiil be created is not clear.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 7
    • 6
    • core-libs
    • None
    • generic
    • generic

      URLClassLoader: Circumstance under which new URLs will be created is not clear.

      From the spec (6-b96):
      ----------------------------------------------------------------
      public URLClassLoader(URL[] urls,
                            ClassLoader parent,
                            URLStreamHandlerFactory factory)
      ...
      The factory argument will be used as the stream handler factory to obtain protocol handlers when creating new jar URLs.
      ...
      ----------------------------------------------------------------

      There are no words about when and why new URLs must be created. So implementor can avoid creation of new URLs at all. So factory parameter is useless from developer point of view, because developer haven't got any information if factory will be used or not.
      Thus without having documented in the spec when and/or why new URLs is going to be created it is not possible to create any particular URLStreamHandlerFactory (USHF) implementation to be passed to 3-argument UCL's constructor as a parameter value.

            chegar Chris Hegarty
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: