RFR: 8288468: Avoid redundant HashMap.get call in NegotiateAuthentication.firstToken
Jaikiran Pai
jpai at openjdk.java.net
Wed Jun 15 13:21:15 UTC 2022
On Mon, 13 Jun 2022 20:01:27 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> Instead of separate `HashMap.get`+`remove` call, we can use single `HashMap.remove` call and use its return value.
> https://github.com/openjdk/jdk/blob/53a0acee06eb32fba700967c9a34d37ea42f7a99/src/java.base/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java#L219-L225
> It makes code a bit cleaner and faster.
Marked as reviewed by jpai (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/9145
More information about the net-dev
mailing list