diff --git a/api/src/com/cloud/agent/api/storage/OVFHelper.java b/api/src/com/cloud/agent/api/storage/OVFHelper.java index 167d5d4fe4b..85d4030b215 100644 --- a/api/src/com/cloud/agent/api/storage/OVFHelper.java +++ b/api/src/com/cloud/agent/api/storage/OVFHelper.java @@ -113,7 +113,7 @@ public class OVFHelper { String allocationUnits = disk.getAttribute("ovf:capacityAllocationUnits"); od._diskId = disk.getAttribute("ovf:diskId"); od._fileRef = disk.getAttribute("ovf:fileRef"); - od._populatedSize = Long.parseLong(disk.getAttribute("ovf:populatedSize") == null ? "0" : disk.getAttribute("ovf:populatedSize")); + od._populatedSize = NumberUtils.toLong(disk.getAttribute("ovf:populatedSize")); if ((od._capacity != 0) && (allocationUnits != null)) {