From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: core: CommandsFactory computeIfAbsent
......................................................................
core: CommandsFactory computeIfAbsent
Use the JDK's Map#computeIfAbsent method instead of reinventing the
wheel.
Besides making the code a tad more elegant, in the edge case where
two threads try to load the same command for the first time, this
variation of code should perform a tad faster, as the findClass
lambda is guaranteed to execute only once.
Change-Id: I85d7c02f3c984919b1a73bd913e0b57f992bc3b8
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandsFactory.java
1 file changed, 7 insertions(+), 10 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Ravi Nori: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/77110
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85d7c02f3c984919b1a73bd913e0b57f992bc3b8
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>