[
https://issues.apache.org/jira/browse/GEODE-7542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16988526#comment-16988526
]
Jacob Barrett commented on GEODE-7542:
--------------------------------------
The workaround is also more performant on post Java 9 JDKs where the common
case is that the entry already exists in the map. Doing the {{get}} then
{{computeIfAbsent}} will get the existing value faster than just a call to
{{computeIfAbsent}}. There is obviously a slight decrease in performance for
the case were the key is not in the map since it will check twice. If your use
case expects the key to be in the map more than not then you should keep this
optimization.
I would move this utility class into the `geode-common` module and packages and
use it from there.
> Break dependency on JavaWorkArounds
> -----------------------------------
>
> Key: GEODE-7542
> URL: https://issues.apache.org/jira/browse/GEODE-7542
> Project: Geode
> Issue Type: Improvement
> Components: membership
> Reporter: Ernest Burghardt
> Priority: Major
>
> this work around exists only for pre-Java9 JDKs, fwiw...
--
This message was sent by Atlassian Jira
(v8.3.4#803005)