8214295: Populate handlers while holding streamHandlerLock

Reviewed-by: chegar
This commit is contained in:
Sean Coffey 2018-11-27 11:09:53 +00:00
parent efcfec81ce
commit 6e905c8389

View File

@ -1421,13 +1421,12 @@ public final class URL implements java.io.Serializable {
// this thread created.
handler = handler2;
}
}
// Insert this handler into the hashtable
if (handler != null) {
handlers.put(protocol, handler);
// Insert this handler into the hashtable
if (handler != null) {
handlers.put(protocol, handler);
}
}
return handler;
}