From 424b8e0f7a7dc417d09233e8d01d6470db2b4002 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 7 Jun 2015 11:38:04 +0200 Subject: [PATCH] Fix findbugs high priority warning VmwareStorageManagerImpl.java:1023, RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE, Priority: High Redundant nullcheck of datastoreVolumePath, which is known to be non-null in com.cloud.hypervisor.vmware.manager.VmwareStorageManagerImpl.getVolumePathInDatastore(DatastoreMO, String) Assertion is not used in runtime, correct way is throw and handle exception without killing app --- .../hypervisor/vmware/manager/VmwareStorageManagerImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java index 3aec7a43bc5c..34ede035af1f 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java @@ -1019,7 +1019,6 @@ private Pair copyVolumeToSecStorage(VmwareHostService hostServic private String getVolumePathInDatastore(DatastoreMO dsMo, String volumeFileName) throws Exception { String datastoreVolumePath = dsMo.searchFileInSubFolders(volumeFileName, true); - assert (datastoreVolumePath != null) : "Virtual disk file missing from datastore."; if (datastoreVolumePath == null) { throw new CloudRuntimeException("Unable to find file " + volumeFileName + " in datastore " + dsMo.getName()); }