Daniel Erez has uploaded a new change for review. Change subject: core: NPE when executing RunVmOnceCommand from rest ......................................................................
core: NPE when executing RunVmOnceCommand from rest RunVmOnceCommand -> reportCompleted: 'getParameters().getRunAndPause()' can be null when starting a VM from the rest-api. Hence, an NPE is thrown. ['runAndPause' variable has been changed to Boolean in: Ib1fe46a9946f7914095310ddac9ab1a9e5a6564b] Change-Id: Id9a1b2b290c2c642ed3f1891582ac679a3a336c9 Bug-Url: https://bugzilla.redhat.com/974999 Signed-off-by: Daniel Erez <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/16601/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java index 230fdb7..6f4eb38 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java @@ -74,7 +74,8 @@ ExecutionContext executionContext = getExecutionContext(); executionContext.setShouldEndJob(true); boolean success = - getParameters().getRunAndPause() && getVmDynamicDao().get(getVmId()).getStatus() == VMStatus.Paused; + Boolean.TRUE.equals(getParameters().getRunAndPause()) + && getVmDynamicDao().get(getVmId()).getStatus() == VMStatus.Paused; ExecutionHandler.endJob(executionContext, success); } -- To view, visit http://gerrit.ovirt.org/16601 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9a1b2b290c2c642ed3f1891582ac679a3a336c9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
