From 2dabfc905bced597f07ad0fb4f870e709dacfc68 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 --- .../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 736f2eef8ee5..7e542d5c787b 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 @@ protected CreatePrivateTemplateAnswer execute(final CreatePrivateTemplateFromVol 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);