Arik Hadas has uploaded a new change for review. Change subject: core: cleanup AddVmPoolWithVmsCommand#getJobMessageProperties ......................................................................
core: cleanup AddVmPoolWithVmsCommand#getJobMessageProperties - fix indentation - replace simple if statements with ternary if - replace "" with StringUtils.Empty Change-Id: I1513f901b7c5ef2b3d215ff119e0f69240c9411a Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java 1 file changed, 7 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/83/11983/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java index ad160eb..02671e0 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommand.java @@ -83,19 +83,14 @@ public Map<String, String> getJobMessageProperties() { if (jobProperties == null) { jobProperties = new HashMap<String, String>(); - VmPool vmPool = getParameters().getVmPool(); - String vmPoolName; - if (vmPool != null) { - vmPoolName = vmPool.getVmPoolName(); - } else { - vmPoolName = ""; - } + VmPool vmPool = getParameters().getVmPool(); + String vmPoolName = vmPool != null ? vmPool.getVmPoolName() : StringUtils.EMPTY; jobProperties.put(VdcObjectType.VmPool.name().toLowerCase(), vmPoolName); - Guid vmTemplateId = getVmTemplateId(); - String templateName = getVmTemplateName(); - if (StringUtils.isEmpty(templateName)) { - templateName = vmTemplateId == null ? "" : vmTemplateId.toString(); - } + Guid vmTemplateId = getVmTemplateId(); + String templateName = getVmTemplateName(); + if (StringUtils.isEmpty(templateName)) { + templateName = vmTemplateId == null ? StringUtils.EMPTY : vmTemplateId.toString(); + } jobProperties.put(VdcObjectType.VmTemplate.name().toLowerCase(), templateName); } return jobProperties; -- To view, visit http://gerrit.ovirt.org/11983 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1513f901b7c5ef2b3d215ff119e0f69240c9411a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches