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 759D210807 for ; Thu, 23 Jan 2014 01:44:58 +0000 (UTC) Received: (qmail 30062 invoked by uid 500); 23 Jan 2014 01:44:58 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 30041 invoked by uid 500); 23 Jan 2014 01:44:57 -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 30034 invoked by uid 99); 23 Jan 2014 01:44:57 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 01:44:57 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7D5198AC181; Thu, 23 Jan 2014 01:44:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mchen@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 206c35c Date: Thu, 23 Jan 2014 01:44:57 +0000 (UTC) Updated Branches: refs/heads/master 1b89ae7ac -> 206c35c62 Vmware is broken due to commit b20add810e5751f53946f695b6223a8016f104a5. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/206c35c6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/206c35c6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/206c35c6 Branch: refs/heads/master Commit: 206c35c620a8e7a707f371e5a9e5dfd795912f5b Parents: 1b89ae7 Author: Min Chen Authored: Wed Jan 22 17:44:21 2014 -0800 Committer: Min Chen Committed: Wed Jan 22 17:44:21 2014 -0800 ---------------------------------------------------------------------- .../com/cloud/hypervisor/vmware/util/VmwareClient.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/206c35c6/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java ---------------------------------------------------------------------- diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java index e81665f..9284569 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java @@ -263,12 +263,12 @@ public class VmwareClient { props.add(propertyName); List objContent = retrieveMoRefProperties(mor, props); - T propertyValue = null; + Object propertyValue = null; if (objContent != null && objContent.size() > 0) { List dynamicProperty = objContent.get(0).getPropSet(); if (dynamicProperty != null && dynamicProperty.size() > 0) { DynamicProperty dp = dynamicProperty.get(0); - propertyValue = (T)dp.getVal(); + propertyValue = dp.getVal(); /* * If object is ArrayOfXXX object, then get the XXX[] by * invoking getXXX() on the object. @@ -276,17 +276,17 @@ public class VmwareClient { * ArrayOfManagedObjectReference.getManagedObjectReference() * returns ManagedObjectReference[] array. */ - Class dpCls = propertyValue.getClass(); + Class dpCls = propertyValue.getClass(); String dynamicPropertyName = dpCls.getName(); if (dynamicPropertyName.indexOf("ArrayOf") != -1) { String methodName = "get" + dynamicPropertyName.substring(dynamicPropertyName.indexOf("ArrayOf") + "ArrayOf".length(), dynamicPropertyName.length()); - Method getMorMethod = dpCls.getDeclaredMethod(methodName, (Class)null); - propertyValue = (T)getMorMethod.invoke(propertyValue, (Object[])null); + Method getMorMethod = dpCls.getDeclaredMethod(methodName, null); + propertyValue = getMorMethod.invoke(propertyValue, (Object[])null); } } } - return propertyValue; + return (T)propertyValue; } private List retrieveMoRefProperties(ManagedObjectReference mObj, List props) throws Exception {