You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jacob Barrett (Jira)" <ji...@apache.org> on 2019/12/05 06:44:01 UTC

[jira] [Commented] (GEODE-7542) Break dependency on JavaWorkArounds

    [ 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)