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 9402510D68 for ; Mon, 19 Aug 2013 22:26:39 +0000 (UTC) Received: (qmail 85439 invoked by uid 500); 19 Aug 2013 22:26:38 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 85395 invoked by uid 500); 19 Aug 2013 22:26:38 -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 85255 invoked by uid 99); 19 Aug 2013 22:26:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Aug 2013 22:26:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 942638C01FC; Mon, 19 Aug 2013 22:26:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: commits@cloudstack.apache.org Date: Mon, 19 Aug 2013 22:26:41 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/7] git commit: updated refs/heads/master to 4fd09cb CLOUDSTACK-4363: fix possible NPE, if copy volume failed. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0040c4ad Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0040c4ad Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0040c4ad Branch: refs/heads/master Commit: 0040c4adef4f7b92aa63737a8f2c5405a07fabda Parents: 1c96898 Author: Edison Su Authored: Sat Aug 17 17:33:04 2013 -0700 Committer: Edison Su Committed: Mon Aug 19 15:25:20 2013 -0700 ---------------------------------------------------------------------- .../src/org/apache/cloudstack/storage/volume/VolumeObject.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0040c4ad/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java ---------------------------------------------------------------------- diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java index b24b715..f5a1276 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java @@ -335,7 +335,11 @@ public class VolumeObject implements VolumeInfo { return this.volumeVO.getPath(); } else { DataObjectInStore objInStore = this.objectInStoreMgr.findObject(this, dataStore); - return objInStore.getInstallPath(); + if (objInStore != null) { + return objInStore.getInstallPath(); + } else { + return null; + } } }