8229867: Re-examine synchronization usages in http and https protocol handlers

Reviewed-by: chegar, alanb, michaelm
This commit is contained in:
Daniel Fuchs 2020-10-13 14:22:11 +00:00
parent 6fe209b564
commit 65393a093c
18 changed files with 964 additions and 562 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -225,7 +225,10 @@ public class NTLMAuthentication extends AuthenticationInfo {
* @return true if all goes well, false if no headers were set.
*/
@Override
public synchronized boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) {
public boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) {
// no need to synchronize here:
// already locked by s.n.w.p.h.HttpURLConnection
assert conn.isLockHeldByCurrentThread();
try {
String response;