Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6875D19C88 for ; Wed, 6 Apr 2016 21:10:57 +0000 (UTC) Received: (qmail 10499 invoked by uid 500); 6 Apr 2016 21:10:57 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 10444 invoked by uid 500); 6 Apr 2016 21:10:57 -0000 Mailing-List: contact dev-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 dev@cloudstack.apache.org Received: (qmail 10427 invoked by uid 99); 6 Apr 2016 21:10:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 21:10:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9D58DDFC74; Wed, 6 Apr 2016 21:10:56 +0000 (UTC) From: jburwell To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: [4.7] vmware: improve support for disks Content-Type: text/plain Message-Id: <20160406211056.9D58DDFC74@git1-us-west.apache.org> Date: Wed, 6 Apr 2016 21:10:56 +0000 (UTC) Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1365#discussion_r58782564 --- Diff: utils/src/main/java/org/apache/cloudstack/utils/volume/VirtualMachineDiskInfo.java --- @@ -39,4 +38,11 @@ public void setDiskDeviceBusName(String diskDeviceBusName) { public void setDiskChain(String[] diskChain) { this.diskChain = diskChain; } + + public String getControllerFromDeviceBusName() { + if (StringUtils.isEmpty(diskDeviceBusName) || !diskDeviceBusName.contains(":")) { + return null; --- End diff -- Return an empty string rather than null to avoid potential NPEs. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---