Change in ovirt-engine[master]: core: fix NPE on add vm template ctor

ofrenkel at redhat.com ofrenkel at redhat.com
Sun Aug 18 11:42:29 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: core: fix NPE on add vm template ctor
......................................................................


core: fix NPE on add vm template ctor

AddVmTemplateCommand ctor is using masterVm from parameters,
without checking for null, this can happen when command is created
during backend recovery - so added a null check.
this is ok because the parameter is not needed in end action.

in addition the 'isVmInDb' member initialized on endAction in order
unlockVm will be called if source vm is in db.

Change-Id: I9b870a89c337a47110aaa7d20d027ad8ef06cfe8
Bug-Url: https://bugzilla.redhat.com/994860
Signed-off-by: Omer Frenkel <ofrenkel at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Omer Frenkel: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b870a89c337a47110aaa7d20d027ad8ef06cfe8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list