Skip to content

Commit 537fa18

Browse files
committed
Fix for OVF parsing error
1 parent 5d05da2 commit 537fa18

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)