Change in ovirt-engine[master]: engine: fix NPE when trying to export not existing template

ofrenkel at redhat.com ofrenkel at redhat.com
Sun Apr 7 09:38:50 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: engine: fix NPE when trying to export not existing template
......................................................................


engine: fix NPE when trying to export not existing template

The fix is all about checking whether the template exists before trying
to get its storage pool id.

This patch contains two other changes:
1. the description of the command moved from #canDoAction to the
constructor which is a more appropriate place to initialize things.
2. add a check that the template exists as the first thing that is
checked in #canDoAction(). this check is already made at
MoveOrCopyTemplateCommand#canDoAction but it is taking place too late -
we should address this issue but in a different patch in order to keep
this one simple fix.

Change-Id: I757672ec2f989f4dc1bc5403878c5cbee69f9cf0
Bug-Url: https://bugzilla.redhat.com/928365
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
1 file changed, 6 insertions(+), 3 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I757672ec2f989f4dc1bc5403878c5cbee69f9cf0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>



More information about the Engine-commits mailing list