GitHub user rovarga opened a pull request:
https://github.com/apache/karaf/pull/367
Use Map.computeIfAbsent() in map population
Instead of performing two lookups, perform a computeIfAbsent(),
which perform a fused lookup-or-put.
Signed-off-by: Robert Varga <[email protected]>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rovarga/karaf compute-if
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/karaf/pull/367.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #367
----
commit f1877b0ba0bf3af8fc2145d2f26c4795771214ab
Author: Robert Varga <[email protected]>
Date: 2017-09-14T15:01:32Z
Use Map.computeIfAbsent() in map population
Instead of performing two lookups, perform a computeIfAbsent(),
which perform a fused lookup-or-put.
Signed-off-by: Robert Varga <[email protected]>
----
---