You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/06/23 23:27:23 UTC

[1/2] git commit: updated refs/heads/master to 8a99df7

Repository: cloudstack
Updated Branches:
  refs/heads/master 82ecc1aa0 -> 8a99df77b


findbugs: move assert to a place where it still makes sense

Signed-off-by: Daan Hoogland <da...@onecht.net>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e8984d16
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e8984d16
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e8984d16

Branch: refs/heads/master
Commit: e8984d16ed2e77fc93d94ef6a3a27bceccee371b
Parents: 82ecc1a
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Jun 23 22:21:29 2015 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Jun 23 23:27:03 2015 +0200

----------------------------------------------------------------------
 .../com/cloud/baremetal/networkservice/BaremetalPxeElement.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8984d16/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
index 10b81c2..da28668 100644
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
@@ -127,10 +127,10 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
         }
 
         VMInstanceVO vo = _vmDao.findById(vm.getId());
+        assert vo != null : "Where ths nic " + nic.getId() + " going???";
         if (vo.getLastHostId() == null) {
             nic.setMacAddress(dest.getHost().getPrivateMacAddress());
             NicVO nicVo = _nicDao.findById(nic.getId());
-            assert vo != null : "Where ths nic " + nic.getId() + " going???";
             nicVo.setMacAddress(nic.getMacAddress());
             _nicDao.update(nicVo.getId(), nicVo);
 


[2/2] git commit: updated refs/heads/master to 8a99df7

Posted by da...@apache.org.
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/master
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);