Change in ovirt-engine[master]: core: show descriptive error on illegal max value

Martin Peřina has submitted this change and it was merged. Change subject: core: show descriptive error on illegal max value ...................................................................... core: show descriptive error on illegal max value Show descriptive error on illegal max value in search engine. This patch fixes an issue when illegal negative max value is passed to the search engine. The problem was that the default value for the max parameter was -1 which was translated as "no max parameter given" so all records should be retrieved. Instead of that, the default value was changed to Integer.MAX_VALUE In addition, in case of RuntimeException, the exception was swallowed by SearchQuery::initQueryData method and therefor the error was not returned to the API call. I changed that such that a RuntimeException will be thrown again after writing to the log. Change-Id: I1821b4a8109da4c48c8d8d32c0c52dadd1603b78 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1352953 Signed-off-by: emesika <emesika@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SearchQuery.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/SearchParameters.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java 3 files changed, 8 insertions(+), 7 deletions(-) Approvals: Martin Peřina: Looks good to me, approved Eli Mesika: Verified Juan Hernandez: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/60917 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1821b4a8109da4c48c8d8d32c0c52dadd1603b78 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Martin Peřina <mperina@redhat.com> Gerrit-Reviewer: Ori Liel <oliel@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
mperina@redhat.com