You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ja...@apache.org on 2015/06/29 09:00:39 UTC
[18/50] [abbrv] git commit: updated refs/heads/dhcpoffload to 45721ae
findbugs volumeInfo is known to not be null
Signed-off-by: Daan Hoogland <da...@onecht.net>
This closes #515
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8a99df77
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8a99df77
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8a99df77
Branch: refs/heads/dhcpoffload
Commit: 8a99df77b66ecec574faccdd2cead9f0411b9fef
Parents: e8984d1
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Jun 23 22:39:51 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Jun 23 23:27:04 2015 +0200
----------------------------------------------------------------------
.../datastore/driver/ElastistorPrimaryDataStoreDriver.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a99df77/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/driver/ElastistorPrimaryDataStoreDriver.java
----------------------------------------------------------------------
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 2ea0a59..cc7c8ef 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);