Ori Liel 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>
---
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
Juan Hernandez: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/23999
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0556725ad2ddc607d587c079bad451e4b74972d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <oliel(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ori Liel <oliel(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server