Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 06E6511F1D for ; Tue, 20 May 2014 04:56:26 +0000 (UTC) Received: (qmail 1973 invoked by uid 500); 20 May 2014 04:56:25 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 1938 invoked by uid 500); 20 May 2014 04:56:25 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 1931 invoked by uid 99); 20 May 2014 04:56:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2014 04:56:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A63A7936E2E; Tue, 20 May 2014 04:56:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: muralireddy@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 965346c Date: Tue, 20 May 2014 04:56:25 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master ef2012677 -> 965346cad 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/965346ca Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/965346ca Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/965346ca Branch: refs/heads/master Commit: 965346cad15a03d8cf7ffc12460ffd8ecaf35bf1 Parents: ef20126 Author: Murali Reddy Authored: Tue May 20 10:21:01 2014 +0530 Committer: Murali Reddy Committed: Tue May 20 10:26:12 2014 +0530 ---------------------------------------------------------------------- server/src/com/cloud/api/ApiDBUtils.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/965346ca/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) {