CLOUDSTACK-3877 Unable to Resize Volume (kvm, vmware)

This commit is contained in:
Rajesh Battala 2013-07-27 20:28:03 +05:30 committed by Devdeep Singh
parent 8edf6b3467
commit 63fea5e94e

View File

@ -241,7 +241,12 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
pstmt.setLong(1, volumeId);
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
return HypervisorType.getType(rs.getString(1));
String hypervisor;
if (rs.getString(1) != null)
hypervisor = rs.getString(1);
else
hypervisor = rs.getString(2);
return HypervisorType.getType(hypervisor);
}
return HypervisorType.None;
} catch (SQLException e) {