Moti Asayag has posted comments on this change. Change subject: core: Remove StringHelper from utils package ......................................................................
Patch Set 1: (2 inline comments) .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateReader.java Line 72: } Line 73: }); Line 74: image.setId(OvfParser.GetImageGrupIdFromImageFile(node.SelectSingleNode( Line 75: "rasd:HostResource", _xmlNS).InnerText)); Line 76: if (!StringUtils.isBlank(node.SelectSingleNode("rasd:Parent", _xmlNS).InnerText)) { This is a change in the behaviour than just a refactor: StringHelper allows blanks by the next implementation: public static boolean isNullOrEmpty(String string) { return string == null || string.isEmpty(); } Therefore it seems that a proper replacement should be using StringUtils.isNotEmpty() and loosing the negation from the condition. Same goes for all the other isBlank replacements. Line 77: image.setParentId(new Guid(node.SelectSingleNode("rasd:Parent", _xmlNS).InnerText)); Line 78: } Line 79: if (!StringUtils.isBlank(node.SelectSingleNode("rasd:Template", _xmlNS).InnerText)) { Line 80: image.setit_guid(new Guid(node.SelectSingleNode("rasd:Template", _xmlNS).InnerText)); .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/pm/VdsFenceOptions.java Line 57: * @param fencingOptions Line 58: * The fencing options. Line 59: */ Line 60: public VdsFenceOptions(String agent, String fencingOptions) { Line 61: if (!StringUtils.isEmpty(agent)) { s/!StringUtils.isEmpty/StringUtils.isNotEmpty Line 62: this.fenceAgent = agent; Line 63: this.fencingOptions = fencingOptions; Line 64: } Line 65: InitCache(); -- To view, visit http://gerrit.ovirt.org/11609 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I16721000ed04f04a5c5ccb0651e83e523ac9f6c2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches