Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AD6118D2C for ; Mon, 15 Jun 2015 09:14:45 +0000 (UTC) Received: (qmail 93551 invoked by uid 500); 15 Jun 2015 09:14:35 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 93466 invoked by uid 500); 15 Jun 2015 09:14:35 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 92797 invoked by uid 99); 15 Jun 2015 09:14:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Jun 2015 09:14:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ACE1AE0449; Mon, 15 Jun 2015 09:14:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Mon, 15 Jun 2015 09:14:58 -0000 Message-Id: <5e83dc8fc219428b89286a29c871b16f@git.apache.org> In-Reply-To: <03983ad0411445f184514074063a3185@git.apache.org> References: <03983ad0411445f184514074063a3185@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [25/34] git commit: updated refs/heads/master to 7a57ce3 Fix 2 findbugs warnings in NetworkServiceImpl.java Unnecessary boxing/unboxing of int values Signed-off-by: Rohit Yadav 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 Authored: Sun Jun 14 17:30:00 2015 +0200 Committer: Rohit Yadav 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);