cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [25/34] git commit: updated refs/heads/master to 7a57ce3
Date Mon, 15 Jun 2015 09:14:58 GMT
Fix 2 findbugs warnings in NetworkServiceImpl.java Unnecessary boxing/unboxing of int values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #432


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

Branch: refs/heads/master
Commit: d7a27c9572d269ed9cbc7cc07b6ea885984cb6ac
Parents: e831fce
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sun Jun 14 17:30:00 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jun 15 12:09:53 2015 +0300

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkServiceImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d7a27c95/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index f00d502..58ea63b 100644
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -1248,7 +1248,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
             if (!_accountMgr.isRootAdmin(caller.getId()) && cidr != null) {
 
                 String[] cidrPair = cidr.split("\\/");
-                int cidrSize = Integer.valueOf(cidrPair[1]);
+                int cidrSize = Integer.parseInt(cidrPair[1]);
 
                 if (cidrSize < _cidrLimit) {
                     throw new InvalidParameterValueException("Cidr size can't be less than
" + _cidrLimit);
@@ -2806,7 +2806,7 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService
{
         String startvnet = vnetList.get(0);
         String endvnet = "";
         for (i = 0; i < vnetList.size() - 1; i++) {
-            if (Integer.valueOf(vnetList.get(i + 1)) - Integer.valueOf(vnetList.get(i)) >
1) {
+            if (Integer.parseInt(vnetList.get(i + 1)) - Integer.parseInt(vnetList.get(i))
> 1) {
                 endvnet = vnetList.get(i);
                 vnetRange = vnetRange + startvnet + "-" + endvnet + ",";
                 startvnet = vnetList.get(i + 1);


Mime
View raw message