From b69c37862c30e231e4ec3622a73ea619c9ad9fbc Mon Sep 17 00:00:00 2001 From: Nicolas Vazquez Date: Fri, 13 Apr 2018 06:19:30 -0300 Subject: [PATCH] [Vmware] Fix for OVF parsing error (#2567) --- api/src/com/cloud/agent/api/storage/OVFHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {