On Sat, 4 Jun 2022 17:28:33 GMT, Andrey Turbanov <aturba...@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 Looks good. Thanks, Serguei ------------- Marked as reviewed by sspitsyn (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/9031