mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
findbugs volumeInfo is known to not be null
Signed-off-by: Daan Hoogland <daan@onecht.net> This closes #515
This commit is contained in:
parent
e8984d16ed
commit
8a99df77b6
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user