cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/4.4 to 5b525aa
Date Tue, 20 May 2014 08:20:37 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4 840938504 -> 5b525aadf


CLOUDSTACK-6712: NPE in findJobInstanceUuid() in ApiDBUtils


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

Branch: refs/heads/4.4
Commit: 5b525aadf32a4d57d0b8d398bf084fe452916963
Parents: 8409385
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Tue May 20 10:21:01 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Tue May 20 10:20:20 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b525aad/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 a953cd6..153d998 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -1442,6 +1442,12 @@ public class ApiDBUtils {
         String jobInstanceId = null;
         ApiCommandJobType jobInstanceType = EnumUtils.fromString(ApiCommandJobType.class,
job.getInstanceType(), ApiCommandJobType.None);
 
+        if (job.getInstanceId() == null) {
+            // when assert is hit, implement 'getInstanceId' of BaseAsyncCmd and return appropriate
instance id
+            assert (false);
+            return null;
+        }
+
         if (jobInstanceType == ApiCommandJobType.Volume) {
             VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
             if (volume != null) {


Mime
View raw message