Douglas Schilling Landgraf has posted comments on this change. Change subject: restapi: ProductInfo use ProductRPMVersion ......................................................................
Patch Set 3: (1 inline comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/VersionHelper.java Line 15: Line 16: version.setFullVersion(text); Line 17: version.setMajor(Integer.parseInt(parts[0])); Line 18: version.setMinor(Integer.parseInt(parts[1])); Line 19: Thanks Ravi, that's a good point. However, if we don't have a valid major, minor and build from my point of view looks like a corrupted installation or bad instance of oVirt Engine. In case like this, should we return what to restapi? -1 or message "sorry, cannot find version/major/minor"? Or just leave throw the exception showing the problem? Line 20: if (parts[2].contains("-")) { Line 21: version.setBuild(Integer.parseInt(parts[2].split("-")[0])); Line 22: } else { Line 23: version.setBuild(Integer.parseInt(parts[2])); -- To view, visit http://gerrit.ovirt.org/13420 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5c03460ef1af943278ab6f5171c042afdf4d392 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@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