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

Populate handlers while holding streamHandlerLock

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b22
    • Verification:
      Not verified

      Backports

        Description

        The recent JDK-8213942 fix adjusted the synchronization logic for the handlers Hashtable. A minor enhancement can be made to improve synchronization.

        One thread may release at/around this section while another thread then clears the handlers table in setURLStreamHandlerFactory method :

        1418 if (handler2 != null) {
        1419 // The handler from the factory must be given more
        1420 // importance. Discard the default handler that
        1421 // this thread created.
        1422 handler = handler2;
        1423 }
        1424 } ===========> HERE
        1425
        1426 // Insert this handler into the hashtable
        1427 if (handler != null) {
        1428 handlers.put(protocol, handler);
        1429 }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                coffeys Sean Coffey
                Reporter:
                coffeys Sean Coffey
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: