Skip to content

Commit c43f08e

Browse files
rootalexandru-bagu
authored andcommitted
fix hypervisor cast to string exception
1 parent 02f80d3 commit c43f08e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ public DataStore initialize(Map<String, Object> dsInfos) {
132132
Long zoneId = (Long)dsInfos.get("zoneId");
133133
String url = (String)dsInfos.get("url");
134134
String providerName = (String)dsInfos.get("providerName");
135-
String hypervisorType = (String)dsInfos.get("hypervisorType");
135+
Object hypervisorTypeObj = dsInfos.get("hypervisorType");
136+
String hypervisorType = "";
137+
if(hypervisorTypeObj != null) {
138+
hypervisorType = hypervisorTypeObj.toString();
139+
}
136140
if (clusterId != null && podId == null) {
137141
throw new InvalidParameterValueException("Cluster id requires pod id");
138142
}

0 commit comments

Comments
 (0)