Moti Asayag has posted comments on this change.

Change subject: core: filter duplicate requests to run the same vm
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/36009/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVMActionRunner.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVMActionRunner.java:

Line 24:     protected List<VdcActionParametersBase> 
validateParameters(List<VdcActionParametersBase> parameters) {
Line 25:         Set<VdcActionParametersBase> set = new TreeSet<>(new 
Comparator<VdcActionParametersBase>() {
Line 26:             @Override
Line 27:             public int compare(VdcActionParametersBase parameters1, 
VdcActionParametersBase parameters2) {
Line 28:                 Guid vmId1 = ((VmOperationParameterBase) 
parameters1).getVmId();
this causes findbugs error due to problematic upcast.

How can we assure any command which invokes RunVMActionRunner will have as a 
parameters class at least VmOperationParameterBase ?
Line 29:                 Guid vmId2 = ((VmOperationParameterBase) 
parameters2).getVmId();
Line 30:                 return vmId1 != null && vmId1.equals(vmId2) ? 0 : 1;
Line 31:             }
Line 32:         });


-- 
To view, visit http://gerrit.ovirt.org/36009
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I91320cfd50fc7a12b01afae2885a783c0516a6df
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to