-
Bug
-
Resolution: Fixed
-
P4
-
12
-
b22
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8214358 | 11.0.3-oracle | Sean Coffey | P4 | Resolved | Fixed | master |
JDK-8217141 | 11.0.3 | Sean Coffey | P4 | Resolved | Fixed | master |
JDK-8214379 | 11.0.2 | Sean Coffey | P4 | Resolved | Fixed | b05 |
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 }
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 }
- backported by
-
JDK-8214358 Populate handlers while holding streamHandlerLock
-
- Resolved
-
-
JDK-8214379 Populate handlers while holding streamHandlerLock
-
- Resolved
-
-
JDK-8217141 Populate handlers while holding streamHandlerLock
-
- Resolved
-
- relates to
-
JDK-8213942 URLStreamHandler initialization race
-
- Closed
-