From c0a10097403ee90d53d2471f6e069ab71009aaa5 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Mon, 22 Jun 2015 13:18:14 +0200 Subject: [PATCH] findbugs: (un)boxing of long from string --- .../lifecycle/ElastistorPrimaryDataStoreLifeCycle.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 7254c2b59ca..bbf35e68c24 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");