8288468: Avoid redundant HashMap.get call in NegotiateAuthentication.firstToken
Reviewed-by: dfuchs, jpai
This commit is contained in:
parent
8fc8fdca96
commit
ce5024f66f
@ -216,12 +216,9 @@ class NegotiateAuthentication extends AuthenticationInfo {
|
|||||||
*/
|
*/
|
||||||
private byte[] firstToken() throws IOException {
|
private byte[] firstToken() throws IOException {
|
||||||
negotiator = null;
|
negotiator = null;
|
||||||
HashMap <String, Negotiator> cachedMap = getCache();
|
HashMap<String, Negotiator> cachedMap = getCache();
|
||||||
if (cachedMap != null) {
|
if (cachedMap != null) {
|
||||||
negotiator = cachedMap.get(getHost());
|
negotiator = cachedMap.remove(getHost()); // so that it is only used once
|
||||||
if (negotiator != null) {
|
|
||||||
cachedMap.remove(getHost()); // so that it is only used once
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (negotiator == null) {
|
if (negotiator == null) {
|
||||||
negotiator = Negotiator.getNegotiator(hci);
|
negotiator = Negotiator.getNegotiator(hci);
|
||||||
|
Loading…
Reference in New Issue
Block a user