You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/01/23 02:44:57 UTC

git commit: updated refs/heads/master to 206c35c

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 <mi...@citrix.com>
Authored: Wed Jan 22 17:44:21 2014 -0800
Committer: Min Chen <mi...@citrix.com>
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<ObjectContent> objContent = retrieveMoRefProperties(mor, props);
 
-        T propertyValue = null;
+        Object propertyValue = null;
         if (objContent != null && objContent.size() > 0) {
             List<DynamicProperty> 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<? extends Object> 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<ObjectContent> retrieveMoRefProperties(ManagedObjectReference mObj, List<String> props) throws Exception {