Omer Frenkel has submitted this change and it was merged.

Change subject: core: remove unneeded code which might produce NPE
......................................................................


core: remove unneeded code which might produce NPE

VdsEventListener#processOnVmPoweringUp contained block of code in a if
clause that could never be executed as all the commands that implement
the IVdsAsyncCommand interface returned null in their
getAutoStartVdsId method, thus the condition in the if statement was
always false.

Because of a race which is similar to the one which was fixed by
Icaca2a3, the check inside the if-condition could produce NPE.

So in this patch this block of code is removed. The signature of
VdsEventListener#processOnVmPoweringUp and IVdsAsyncCommand interface
were cleaned up by removing things which are not needed anymore.

Change-Id: Iffef34726c7feb87be1436c003eded2e226d7e5d
Bug-Url: https://bugzilla.redhat.com/1134701
Signed-off-by: Arik Hadas <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IVdsAsyncCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IVdsEventListener.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
5 files changed, 4 insertions(+), 47 deletions(-)

Approvals:
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffef34726c7feb87be1436c003eded2e226d7e5d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to