cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/master to c0a1009
Date Mon, 22 Jun 2015 11:18:22 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master fe4f0b1a5 -> c0a100974


findbugs: (un)boxing of long from string

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

Branch: refs/heads/master
Commit: c0a10097403ee90d53d2471f6e069ab71009aaa5
Parents: fe4f0b1
Author: Daan Hoogland <daan.hoogland@gmail.com>
Authored: Mon Jun 22 13:18:14 2015 +0200
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Mon Jun 22 13:18:14 2015 +0200

----------------------------------------------------------------------
 .../lifecycle/ElastistorPrimaryDataStoreLifeCycle.java          | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c0a10097/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/lifecycle/ElastistorPrimaryDataStoreLifeCycle.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/lifecycle/ElastistorPrimaryDataStoreLifeCycle.java
b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/lifecycle/ElastistorPrimaryDataStoreLifeCycle.java
index 7254c2b..bbf35e6 100644
--- a/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/lifecycle/ElastistorPrimaryDataStoreLifeCycle.java
+++ b/plugins/storage/volume/cloudbyte/src/org/apache/cloudstack/storage/datastore/lifecycle/ElastistorPrimaryDataStoreLifeCycle.java
@@ -574,8 +574,9 @@ public class ElastistorPrimaryDataStoreLifeCycle implements PrimaryDataStoreLife
                 if(capacityIops != null){
 
                     long usedIops = _capacityMgr.getUsedIops(storagePoolVO);
+                long capacity = Long.parseLong(capacityIops);
 
-                    if (Long.valueOf(capacityIops) < usedIops) {
+                if (capacity < usedIops) {
                         throw new CloudRuntimeException("Cannot reduce the number of IOPS
for this storage pool as it would lead to an insufficient number of IOPS");
                     }
 
@@ -583,7 +584,7 @@ public class ElastistorPrimaryDataStoreLifeCycle implements PrimaryDataStoreLife
 
                    if(updateTsmCmdResponse.getTsm(0).getUuid() != null){
                    // update the cloudstack db
-                    _storagePoolDao.updateCapacityIops(storagePool.getId(), Long.valueOf(capacityIops));
+                    _storagePoolDao.updateCapacityIops(storagePool.getId(), capacity);
 
                     s_logger.info("elastistor TSM IOPS successfully updated");
 


Mime
View raw message