findbugs: (un)boxing of long from string

This commit is contained in:
Daan Hoogland 2015-06-22 13:18:14 +02:00
parent fe4f0b1a58
commit c0a1009740
1 changed files with 3 additions and 2 deletions

View File

@ -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");