Skip to content

Commit 9eff27a

Browse files
committed
findbugs: static member should be final
Signed-off-by: Daan Hoogland <daan@onecht.net> This closes apache#495
1 parent 871ba9c commit 9eff27a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
313313
protected DiskControllerType _rootDiskController = DiskControllerType.ide;
314314

315315
protected ManagedObjectReference _morHyperHost;
316-
protected static ThreadLocal<VmwareContext> s_serviceContext = new ThreadLocal<VmwareContext>();
316+
protected final static ThreadLocal<VmwareContext> s_serviceContext = new ThreadLocal<VmwareContext>();
317317
protected String _hostName;
318318

319319
protected List<PropertyMapDynamicBean> _cmdMBeans = new ArrayList<PropertyMapDynamicBean>();
@@ -327,9 +327,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
327327

328328
protected VirtualRoutingResource _vrResource;
329329

330-
protected static HashMap<VirtualMachinePowerState, PowerState> s_powerStatesTable;
330+
protected final static HashMap<VirtualMachinePowerState, PowerState> s_powerStatesTable = new HashMap<VirtualMachinePowerState, PowerState>();
331331
static {
332-
s_powerStatesTable = new HashMap<VirtualMachinePowerState, PowerState>();
333332
s_powerStatesTable.put(VirtualMachinePowerState.POWERED_ON, PowerState.PowerOn);
334333
s_powerStatesTable.put(VirtualMachinePowerState.POWERED_OFF, PowerState.PowerOff);
335334
s_powerStatesTable.put(VirtualMachinePowerState.SUSPENDED, PowerState.PowerOn);

0 commit comments

Comments
 (0)