Skip to content

Commit 206c35c

Browse files
committed
Vmware is broken due to commit b20add8.
1 parent 1b89ae7 commit 206c35c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,30 +263,30 @@ public <T> T getDynamicProperty(ManagedObjectReference mor, String propertyName)
263263
props.add(propertyName);
264264
List<ObjectContent> objContent = retrieveMoRefProperties(mor, props);
265265

266-
T propertyValue = null;
266+
Object propertyValue = null;
267267
if (objContent != null && objContent.size() > 0) {
268268
List<DynamicProperty> dynamicProperty = objContent.get(0).getPropSet();
269269
if (dynamicProperty != null && dynamicProperty.size() > 0) {
270270
DynamicProperty dp = dynamicProperty.get(0);
271-
propertyValue = (T)dp.getVal();
271+
propertyValue = dp.getVal();
272272
/*
273273
* If object is ArrayOfXXX object, then get the XXX[] by
274274
* invoking getXXX() on the object.
275275
* For Ex:
276276
* ArrayOfManagedObjectReference.getManagedObjectReference()
277277
* returns ManagedObjectReference[] array.
278278
*/
279-
Class<? extends Object> dpCls = propertyValue.getClass();
279+
Class dpCls = propertyValue.getClass();
280280
String dynamicPropertyName = dpCls.getName();
281281
if (dynamicPropertyName.indexOf("ArrayOf") != -1) {
282282
String methodName = "get" + dynamicPropertyName.substring(dynamicPropertyName.indexOf("ArrayOf") + "ArrayOf".length(), dynamicPropertyName.length());
283283

284-
Method getMorMethod = dpCls.getDeclaredMethod(methodName, (Class<?>)null);
285-
propertyValue = (T)getMorMethod.invoke(propertyValue, (Object[])null);
284+
Method getMorMethod = dpCls.getDeclaredMethod(methodName, null);
285+
propertyValue = getMorMethod.invoke(propertyValue, (Object[])null);
286286
}
287287
}
288288
}
289-
return propertyValue;
289+
return (T)propertyValue;
290290
}
291291

292292
private List<ObjectContent> retrieveMoRefProperties(ManagedObjectReference mObj, List<String> props) throws Exception {

0 commit comments

Comments
 (0)