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:32 UTC

[11/50] [abbrv] git commit: updated refs/heads/dhcpoffload to 45721ae

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/dhcpoffload
Commit: c0a10097403ee90d53d2471f6e069ab71009aaa5
Parents: fe4f0b1
Author: Daan Hoogland <da...@gmail.com>
Authored: Mon Jun 22 13:18:14 2015 +0200
Committer: Daan Hoogland <da...@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");