Integrated: 8287924: Avoid redundant HashMap.containsKey call in EnvHelp.mapToHashtable
Andrey Turbanov
aturbanov at openjdk.java.net
Thu Jun 9 20:33:06 UTC 2022
On Sat, 4 Jun 2022 17:28:33 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> No need to separately perform HashMap.containsKey before HashMap.remove call. If key is present - it will be removed anyway. If it's not present, nothing will be deleted.
> https://github.com/openjdk/jdk/blob/a6fc485a22484b70daf170e981432c0856b9d93d/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java#L735-L741
This pull request has now been integrated.
Changeset: 900d967d
Author: Andrey Turbanov <aturbanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/900d967da52afca9b239d8a58aa81b48b9fe0a78
Stats: 5 lines in 1 file changed: 0 ins; 2 del; 3 mod
8287924: Avoid redundant HashMap.containsKey call in EnvHelp.mapToHashtable
Reviewed-by: sspitsyn, cjplummer
-------------
PR: https://git.openjdk.org/jdk/pull/9031
More information about the serviceability-dev
mailing list