Re: RFR: 8287924: Avoid redundant HashMap.containsKey call in EnvHelp.mapToHashtable

2022-06-08 Thread Chris Plummer
On Sat, 4 Jun 2022 17:28:33 GMT, Andrey Turbanov 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/a6fc485a22484b70daf170e9

Re: RFR: 8287924: Avoid redundant HashMap.containsKey call in EnvHelp.mapToHashtable

2022-06-08 Thread Serguei Spitsyn
On Sat, 4 Jun 2022 17:28:33 GMT, Andrey Turbanov 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/a6fc485a22484b70daf170e9

RFR: 8287924: Avoid redundant HashMap.containsKey call in EnvHelp.mapToHashtable

2022-06-07 Thread Andrey Turbanov
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/rem