From 9ba4e9cb869cc5743e5b80de63e4c37a161263f1 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 14 Jun 2015 17:04:53 +0200 Subject: [PATCH] Fix findbugs warning in OvmResourceBase.java CreatePrivateTemplateAnswer constructor takes long as physicalSize parameter, Long was being created instead Signed-off-by: Rohit Yadav This closes #423 --- .../ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java index 736f2eef8ee..7e542d5c787 100644 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java @@ -1072,7 +1072,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { String secondaryStorageMountPath = uri.getHost() + ":" + uri.getPath(); String installPath = "template/tmpl/" + accountId + "/" + templateId; Map res = OvmStoragePool.createTemplateFromVolume(_conn, secondaryStorageMountPath, installPath, volumePath, wait); - return new CreatePrivateTemplateAnswer(cmd, true, null, res.get("installPath"), Long.valueOf(res.get("virtualSize")), Long.valueOf(res.get("physicalSize")), + return new CreatePrivateTemplateAnswer(cmd, true, null, res.get("installPath"), Long.valueOf(res.get("virtualSize")), Long.parseLong(res.get("physicalSize")), res.get("templateFileName"), ImageFormat.RAW); } catch (Exception e) { s_logger.debug("Create template failed", e);