Skip to content

Commit b69c378

Browse files
nvazquezDaanHoogland
authored andcommitted
[Vmware] Fix for OVF parsing error (#2567)
1 parent e71d4d4 commit b69c378

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/src/com/cloud/agent/api/storage/OVFHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public List<DatadiskTO> getOVFVolumeInfo(final String ovfFilePath) {
113113
String allocationUnits = disk.getAttribute("ovf:capacityAllocationUnits");
114114
od._diskId = disk.getAttribute("ovf:diskId");
115115
od._fileRef = disk.getAttribute("ovf:fileRef");
116-
od._populatedSize = Long.parseLong(disk.getAttribute("ovf:populatedSize") == null ? "0" : disk.getAttribute("ovf:populatedSize"));
116+
od._populatedSize = NumberUtils.toLong(disk.getAttribute("ovf:populatedSize"));
117117

118118
if ((od._capacity != 0) && (allocationUnits != null)) {
119119

0 commit comments

Comments
 (0)