mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8288468: Avoid redundant HashMap.get call in NegotiateAuthentication.firstToken
Reviewed-by: dfuchs, jpai
This commit is contained in:
parent
8fc8fdca96
commit
ce5024f66f
1 changed files with 2 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue