Hello Ravi Nori,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/33615

to review the following change.

Change subject: core : Fix NPE in CommandBase buildCommandEntity
......................................................................

core : Fix NPE in CommandBase buildCommandEntity

When execution context is null CommandBase
buildCommandEntity throws a NPE.

Change-Id: I6f6a2b7e0727a22a9649d0b305000f59eb4236a1
Bug-Url: https://bugzilla.redhat.com/1147971
Signed-off-by: Ravi Nori <rn...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/33615/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 1b2b8f6..04091e0 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -2190,8 +2190,8 @@
     private CommandEntity buildCommandEntity(Guid parentCommandId, boolean 
callBackEnabled) {
         return CommandEntity.buildCommandEntity(getCommandId(),
                 parentCommandId,
-                getExecutionContext().getJob() == null ? Guid.Empty : 
getExecutionContext().getJob().getId(),
-                getExecutionContext().getStep() == null ? Guid.Empty : 
getExecutionContext().getStep().getId(),
+                getExecutionContext() == null || 
getExecutionContext().getJob() == null ? Guid.Empty : 
getExecutionContext().getJob().getId(),
+                getExecutionContext() == null || 
getExecutionContext().getStep() == null ? Guid.Empty : 
getExecutionContext().getStep().getId(),
                 getActionType(),
                 getParameters(),
                 commandStatus,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f6a2b7e0727a22a9649d0b305000f59eb4236a1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to