Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32B8817512 for ; Wed, 25 Mar 2015 17:31:43 +0000 (UTC) Received: (qmail 83503 invoked by uid 500); 25 Mar 2015 17:31:08 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 83471 invoked by uid 500); 25 Mar 2015 17:31:08 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 83462 invoked by uid 99); 25 Mar 2015 17:31:08 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 17:31:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73213E1872; Wed, 25 Mar 2015 17:31:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dahn@apache.org To: commits@cloudstack.apache.org Message-Id: <565a93d4452c447faf5fc69715086aa4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 340aa9f Date: Wed, 25 Mar 2015 17:31:08 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master a4c23b170 -> 340aa9ff0 findbugs: make default encoding explicit Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/340aa9ff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/340aa9ff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/340aa9ff Branch: refs/heads/master Commit: 340aa9ff0f11ee06af57e15c07684a21a62e76c2 Parents: a4c23b1 Author: Daan Hoogland Authored: Wed Mar 25 18:31:08 2015 +0100 Committer: Daan Hoogland Committed: Wed Mar 25 18:31:08 2015 +0100 ---------------------------------------------------------------------- .../ovm3/resources/Ovm3HypervisorResource.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/340aa9ff/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java index bb43e89..ea0d407 100644 --- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java +++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/Ovm3HypervisorResource.java @@ -17,6 +17,7 @@ package com.cloud.hypervisor.ovm3.resources; +import java.nio.charset.Charset; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -25,13 +26,14 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.log4j.Logger; + import org.apache.cloudstack.storage.command.AttachCommand; import org.apache.cloudstack.storage.command.CopyCommand; import org.apache.cloudstack.storage.command.CreateObjectCommand; import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; import org.apache.cloudstack.storage.command.StorageSubSystemCommand; -import org.apache.log4j.Logger; import com.cloud.agent.IAgentControl; import com.cloud.agent.api.Answer; @@ -89,11 +91,11 @@ import com.cloud.hypervisor.ovm3.objects.OvmObject; import com.cloud.hypervisor.ovm3.objects.Xen; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3Configuration; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3HypervisorNetwork; +import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3HypervisorSupport; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3StoragePool; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3VirtualRoutingSupport; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3VmGuestTypes; import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3VmSupport; -import com.cloud.hypervisor.ovm3.resources.helpers.Ovm3HypervisorSupport; import com.cloud.network.Networks.TrafficType; import com.cloud.resource.ServerResourceBase; import com.cloud.resource.hypervisor.HypervisorResource; @@ -124,13 +126,13 @@ public class Ovm3HypervisorResource extends ServerResourceBase implements private Ovm3VirtualRoutingSupport virtualroutingsupport; private Ovm3Configuration configuration; private Ovm3VmGuestTypes guesttypes; - private OvmObject ovmObject = new OvmObject(); + private final OvmObject ovmObject = new OvmObject(); /* * TODO: Add a network map, so we know which tagged interfaces we can remove * and switch to ConcurrentHashMap */ - private Map vmMap = new HashMap(); + private final Map vmMap = new HashMap(); @Override public Type getType() { @@ -379,7 +381,7 @@ public class Ovm3HypervisorResource extends ServerResourceBase implements storageHandler = new StorageSubsystemCommandHandlerBase(storageprocessor); virtualroutingsupport = new Ovm3VirtualRoutingSupport(c, configuration, virtualroutingresource); - this.setConfigParams(params); + setConfigParams(params); return true; } @@ -412,8 +414,8 @@ public class Ovm3HypervisorResource extends ServerResourceBase implements vm.setVmCpus(vmSpec.getCpus()); /* in mb not in bytes */ vm.setVmMemory(vmSpec.getMinRam() / 1024 / 1024); - vm.setVmUuid(UUID.nameUUIDFromBytes(vmSpec.getName().getBytes()) - .toString()); + vm.setVmUuid(UUID.nameUUIDFromBytes(vmSpec.getName(). + getBytes(Charset.defaultCharset())).toString()); vm.setVmName(vmName); String domType = guesttypes.getOvm3GuestType(vmSpec.getOs());