Change in ovirt-engine[master]: core: make VdcQueryReturnValue#getReturnValue generic

Omer Frenkel has submitted this change and it was merged. Change subject: core: make VdcQueryReturnValue#getReturnValue generic ...................................................................... core: make VdcQueryReturnValue#getReturnValue generic VdcQueryReturnValue#getReturnValue method wasn't generic, so we needed to have explicit casting which required @SuppressWarnings("unchecked") annotation which makes the code dirty or add unchecked warning if the annotation is missing. This patch changes this method to be generic, and the returned object is casted to the returned type of the method - this way the annotation appears only within this method and the rest of the code is cleaner. In this patch I changed the classes within org.ovirt.engine.core.bll package to take advantage of this change. Latter patches should change the rest of the classes, and do the same change in VDSReturnValue#getReturnValue. This patch also contains minor refactoring in VdcQueryReturnValue: 1. remove '_' prefix from class fields 2. move the constructor to be before the other class methods Change-Id: I57b6ce5fc4b5d6bab1481f9bfb9d7861ba09a615 Signed-off-by: Arik Hadas <ahadas@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromSnapshotCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddWatchdogCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllVmsAndVmPoolsQuery.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetUnregisteredDisksQuery.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVmTemplatesByStoragePoolIdQuery.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmFromImportExportCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateFromImportExportCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UserCommandBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryReturnValue.java 14 files changed, 29 insertions(+), 34 deletions(-) Approvals: Omer Frenkel: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/18026 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57b6ce5fc4b5d6bab1481f9bfb9d7861ba09a615 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Arik Hadas <ahadas@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzaslavs@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server
participants (1)
-
ofrenkel@redhat.com