Itamar Heim has submitted this change and it was merged.
Change subject: restapi: Empty String Validation (#1005296)
......................................................................
restapi: Empty String Validation (#1005296)
The generic input validation method in the API - validateParameters() uses reflection
to invoke isSetX() for the given field. In the particular case of when the filed is
a string, .isEmpty() check should be added. This is what this patch does.
This fix is done in the context of a specific bug - 1005296 - which complains
about empty <address> field passing validation when creating a new storage
server connection
Bug-Url:
http://bugzilla.redhat.com/1005296
Change-Id: Ib0556725ad2ddc607d587c079bad451e4b74972d
Signed-off-by: Ori Liel <oliel(a)redhat.com>
(cherry picked from commit 0107892b7c0b3a6c0ccad0da0c077a1966fc1f8a)
---
M
backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/util/ReflectionHelper.java
1 file changed, 25 insertions(+), 2 deletions(-)
Approvals:
Ori Liel: Verified; Looks good to me, approved
Juan Hernandez: Looks good to me, but someone else must approve
--
To view, visit
http://gerrit.ovirt.org/24545
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0556725ad2ddc607d587c079bad451e4b74972d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ori Liel <oliel(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server