8288468: Avoid redundant HashMap.get call in NegotiateAuthentication.firstToken

Reviewed-by: dfuchs, jpai
This commit is contained in:
Andrey Turbanov 2022-06-16 16:03:05 +00:00
parent 8fc8fdca96
commit ce5024f66f

View File

@ -218,10 +218,7 @@ class NegotiateAuthentication extends AuthenticationInfo {
negotiator = null;
HashMap<String, Negotiator> cachedMap = getCache();
if (cachedMap != null) {
negotiator = cachedMap.get(getHost());
if (negotiator != null) {
cachedMap.remove(getHost()); // so that it is only used once
}
negotiator = cachedMap.remove(getHost()); // so that it is only used once
}
if (negotiator == null) {
negotiator = Negotiator.getNegotiator(hci);