DaanHoogland closed pull request #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): 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 static Long getDiskVirtualSize(Long capacity, String allocationUnits, Str 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)) { ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services