cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [cloudstack] branch 4.11 updated: [Vmware] Fix for OVF parsing error (#2567)
Date Fri, 13 Apr 2018 09:19:34 GMT
This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new b69c378  [Vmware] Fix for OVF parsing error (#2567)
b69c378 is described below

commit b69c37862c30e231e4ec3622a73ea619c9ad9fbc
Author: Nicolas Vazquez <nicovazquez90@gmail.com>
AuthorDate: Fri Apr 13 06:19:30 2018 -0300

    [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 167d5d4..85d4030 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)) {
 

-- 
To stop receiving notification emails like this one, please contact
dahn@apache.org.

Mime
View raw message