From 8a99df77b66ecec574faccdd2cead9f0411b9fef Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Tue, 23 Jun 2015 22:39:51 +0200 Subject: [PATCH] findbugs volumeInfo is known to not be null Signed-off-by: Daan Hoogland This closes #515 --- .../datastore/driver/ElastistorPrimaryDataStoreDriver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java index 2ea0a594e1e..cc7c8efafbc 100644 --- a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java +++ b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java @@ -235,8 +235,8 @@ public class ElastistorPrimaryDataStoreDriver extends CloudStackPrimaryDataStore long usedBytes = storagePool.getUsedBytes(); long capacityIops = storagePool.getCapacityIops(); - usedBytes -= volumeInfo != null ? volumeInfo.getSize() : 0; - capacityIops += volumeInfo != null ? volumeInfo.getMaxIops() : 0; + usedBytes -= volumeInfo.getSize(); + capacityIops += volumeInfo.getMaxIops(); storagePool.setUsedBytes(usedBytes < 0 ? 0 : usedBytes); storagePool.setCapacityIops(capacityIops < 0 ? 0 : capacityIops);