From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: core: CommandsFactory generics
......................................................................
core: CommandsFactory generics
CommandsFactory#commandsCache holds instances of both command and
query classes. Its generic specification is just plain wrong, and the
code only works due to the runtime type erasure.
Any class returned from this class' methods is either used regardless
of its generic specification, or instantiated and then cast to the
right type, making the generic specification somewhat of a mute
point.
This patch replaces it with a straight-forward Class<?> in order to
both avoid the confusion of the first paragraph and set up the
following patches.
Change-Id: I79d387829d524d8285dddad370a54e427ca3ff5e
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandsFactory.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandCtorsTest.java
3 files changed, 16 insertions(+), 20 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Ravi Nori: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/77109
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I79d387829d524d8285dddad370a54e427ca3ff5e
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>