Alissa Bonas has posted comments on this change. Change subject: engine: Host name validation cleanup ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java Line 196: getReturnValue().getFault().setMessage(returnValue.getVdsError().getMessage()); Line 197: getReturnValue().getExecuteFailedMessages().add(returnValue.getVdsError().getMessage()); Line 198: } Line 199: Line 200: public boolean validateVdsName(final VDS vds) { vds.getName can be potential NPE due to vds=null... this method is public so I'd make this check. Especially when the 2 other commands calling this code are passing it as is without checking that it's not null. Line 201: final String vdsName = vds.getName(); Line 202: final int maxVdsNameLength = Config.<Integer> GetValue(ConfigValues.MaxVdsNameLength); Line 203: if (vdsName == null || vdsName.isEmpty()) { Line 204: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NAME_MAY_NOT_BE_EMPTY); -- To view, visit http://gerrit.ovirt.org/11189 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5288bfd8020c8339d9d8870c6551b63351be79e4 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@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