Mike Kolesnik has submitted this change and it was merged.
Change subject: engine: Code cleanup for device refresh treatment
......................................................................
engine: Code cleanup for device refresh treatment
Performed some clean ups in VdsUpdateRunTimeInfo code which treats
devices refreshment, to make code easier to read and understand:
1. Don't use toString() on objects sent to log.xxxFormat() method since
this is what happens anyway.
2. Moved lines of code closer to where they're really needed.
3. Used Set instead of HashSet in reference declaration.
4. Inlined some variables that were used only in one place.
5. Used Entities.businessEntitiesById() method instead of manual map
building.
6. Used StringUtils.defaultString(xxx) instead of variations of
StringUtils.defaultIfEmpty(xxx, "").
7. Changed code to "fail early" instead of nesting (5 levels of nesting
is excessive).
8. Reordered conditions so that positive case is first.
9. General formatting (removed unecessary line breaks, added some where
needed).
Change-Id: I978b46912f095d636ea0c4f1c58d3bb14083d855
Bug-Url:
https://bugzilla.redhat.com/872165
Signed-off-by: Mike Kolesnik <mkolesni(a)redhat.com>
---
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
1 file changed, 38 insertions(+), 39 deletions(-)
Approvals:
Mike Kolesnik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/11699
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I978b46912f095d636ea0c4f1c58d3bb14083d855
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>