Change in ovirt-engine[ovirt-engine-3.4]: restapi: Don't use method names to infer types

Itamar Heim has submitted this change and it was merged. Change subject: restapi: Don't use method names to infer types ...................................................................... restapi: Don't use method names to infer types Currently when we randomly populate objects in order to run tests, we infer the types of objects contained in lists from the names of the methods. For example, lets say that we have an object that has a "getNics()" method that returns a list of "Nics" objects. We use the word after the "get" prefix to infer the type. In this case we infer that the type will be "Nics". But doing this has the dissadvantage that we force ourselves to use method names (and thus tag names in the XML representation) that match the type names. There was no reasonable alternative in Java 6, but in Java 7 we can obtain the type of the elements of the list directly. This is what we do in this patch. Change-Id: Iadc9827c3885d7b9e39611b006a1b02eefa5c9f0 Bug-Url: https://bugzilla.redhat.com/1051041 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit 19b0310a1107dee0df60d2871fc24b24d2d3a474) --- M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/MappingTestHelper.java 1 file changed, 3 insertions(+), 64 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/23624 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadc9827c3885d7b9e39611b006a1b02eefa5c9f0 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Shahar Havivi <shavivi@redhat.com> Gerrit-Reviewer: Itamar Heim <iheim@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Shahar Havivi <shavivi@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
iheim@redhat.com