From e8c7069f734b7886cbe0e8dfec4452a4fdfe20b3 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 Signed-off-by: Daan Hoogland This closes #362 --- .../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 3aec7a43bc5..34ede035af1 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 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager { 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()); }