Tal Nisan has posted comments on this change. Change subject: core: Template's empty string as a disk alias fix ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/34256/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java: Line 410: } Line 411: Line 412: // Check that all the template's allocated disk's aliases are not an empty string. Line 413: Iterator<DiskImage> it = diskInfoDestinationMap.values().iterator(); Line 414: while (it.hasNext()) { > IMHO, it'll be more elegant to use an enhanced for loop: Can't it be also null? I'd use StringUtils.isEmpty() for that matter Line 415: if (it.next().getDiskAlias().isEmpty()) { Line 416: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_TEMPLATE_CANNOT_BE_CREATED_WITH_EMPTY_DISK_ALIAS); Line 417: } Line 418: } -- To view, visit http://gerrit.ovirt.org/34256 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If20fcbe3ae6507ba1f39c6e336928fb647efeb1e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Idan Shaby <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vered Volansky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
