From 7873080bb822627868a36ba5b50ef6033af2f21b Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 7 Jun 2015 11:44:28 +0200 Subject: [PATCH] Fix 2 findbugs high priority warnings VmwareResource.java:315, MS_SHOULD_BE_FINAL, Priority: High com.cloud.hypervisor.vmware.resource.VmwareResource.s_serviceContext isn't final but should be VmwareResource.java:331, MS_SHOULD_BE_FINAL, Priority: High com.cloud.hypervisor.vmware.resource.VmwareResource.s_powerStatesTable isn't final but should be --- .../com/cloud/hypervisor/vmware/resource/VmwareResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 87264125fde7..83c17dc88e13 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -312,7 +312,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa protected DiskControllerType _rootDiskController = DiskControllerType.ide; protected ManagedObjectReference _morHyperHost; - protected static ThreadLocal s_serviceContext = new ThreadLocal(); + protected static final ThreadLocal s_serviceContext = new ThreadLocal(); protected String _hostName; protected List _cmdMBeans = new ArrayList(); @@ -328,7 +328,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa protected static HashMap s_powerStatesTable; static { - s_powerStatesTable = new HashMap(); + final s_powerStatesTable = new HashMap(); s_powerStatesTable.put(VirtualMachinePowerState.POWERED_ON, PowerState.PowerOn); s_powerStatesTable.put(VirtualMachinePowerState.POWERED_OFF, PowerState.PowerOff); s_powerStatesTable.put(VirtualMachinePowerState.SUSPENDED, PowerState.PowerOn);