You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/07/12 10:29:00 UTC

git commit: updated refs/heads/4.2 to f3a2fc2

Updated Branches:
  refs/heads/4.2 22c6df0ba -> f3a2fc22b


CLOUDSTACK-3485: NPE while getting instance ID from Asyn Job when
publishing async job events on eventbus

handing case where instance id is null in the asyn job, while publishing
asyn job events on to event bus


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f3a2fc22
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f3a2fc22
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f3a2fc22

Branch: refs/heads/4.2
Commit: f3a2fc22bf21b8a7019d10f4a864f7427332a9b6
Parents: 22c6df0
Author: Murali Reddy <mu...@gmail.com>
Authored: Fri Jul 12 13:57:53 2013 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Fri Jul 12 13:57:53 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiDBUtils.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3a2fc22/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index 073e4c2..49a6eba 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -1279,9 +1279,11 @@ public class ApiDBUtils {
     }
 
     public static String findJobInstanceUuid(AsyncJob job){
-        if ( job == null )
+        if ( job == null || job.getInstanceId() == null)
             return null;
+
         String jobInstanceId = null;
+
         if (job.getInstanceType() == AsyncJob.Type.Volume) {
             VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
             if (volume != null) {