Skip to content

Commit 8a99df7

Browse files
committed
findbugs volumeInfo is known to not be null
Signed-off-by: Daan Hoogland <daan@onecht.net> This closes apache#515
1 parent e8984d1 commit 8a99df7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ public void deleteAsync(DataStore dataStore, DataObject dataObject, AsyncComplet
235235
long usedBytes = storagePool.getUsedBytes();
236236
long capacityIops = storagePool.getCapacityIops();
237237

238-
usedBytes -= volumeInfo != null ? volumeInfo.getSize() : 0;
239-
capacityIops += volumeInfo != null ? volumeInfo.getMaxIops() : 0;
238+
usedBytes -= volumeInfo.getSize();
239+
capacityIops += volumeInfo.getMaxIops();
240240

241241
storagePool.setUsedBytes(usedBytes < 0 ? 0 : usedBytes);
242242
storagePool.setCapacityIops(capacityIops < 0 ? 0 : capacityIops);

0 commit comments

Comments
 (0)