From Tal Nisan <tnisan(a)redhat.com>:
Tal Nisan has submitted this change and it was merged.
Change subject: core: Avoid NPE when importing unregistered Template.
......................................................................
core: Avoid NPE when importing unregistered Template.
When importing an unregistered Template the initialization of this
Template is being done only in the validate method since it includes
several DB calls and OVF parsing.
Since the init function of ImportVmTemplateFromConfigurationCommand
executes updateMaxMemorySize which uses getVmTemplate()
we get an NPE and fail to register an unregistered Template.
The following fix uses the same technique which is used for
updateGraphicsDevices by checking if the vmBase is null, and if so
simply return.
Change-Id: If13d8aa654e72569d02cc18e91f19d4af7445ac7
Bug-Url:
https://bugzilla.redhat.com/1419364
Signed-off-by: Maor Lipchuk <mlipchuk(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Maor Lipchuk: Verified
Arik Hadas: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/71691
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If13d8aa654e72569d02cc18e91f19d4af7445ac7
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>