cloudstack-commits mailing list archives

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

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

This closes #425


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

Branch: refs/heads/master
Commit: be474f95a1415d604ffc8ab9278a6eb29a400627
Parents: 16ddd49
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sun Jun 14 17:12:32 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jun 15 12:09:39 2015 +0300

----------------------------------------------------------------------
 .../hypervisor/xenserver/resource/CitrixResourceBase.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be474f95/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index 43cdd88..aa02d00 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -2773,8 +2773,8 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
             final String[] splitResult = result.split(":");
             int i = 0;
             while (i < splitResult.length - 1) {
-                stats[0] += new Long(splitResult[i++]).longValue();
-                stats[1] += new Long(splitResult[i++]).longValue();
+                stats[0] += Long.parseLong(splitResult[i++]);
+                stats[1] += Long.parseLong(splitResult[i++]);
             }
         }
         return stats;
@@ -4045,7 +4045,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                         throw new InternalErrorException("There were no more available slots
for a new VIF on router: " + router.getNameLabel(conn));
                     }
 
-                    nic.setDeviceId(Integer.valueOf(vifDeviceNum));
+                    nic.setDeviceId(Integer.parseInt(vifDeviceNum));
 
                     correctVif = createVif(conn, routerName, router, null, nic);
                     correctVif.plug(conn);
@@ -4105,7 +4105,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                     s_logger.error(msg);
                     return new ExecutionResult(false, msg);
                 }
-                nic.setDeviceId(Integer.valueOf(vif.getDevice(conn)));
+                nic.setDeviceId(Integer.parseInt(vif.getDevice(conn)));
             } else {
                 final String msg = "Prepare SetNetworkACL failed due to nic is null for :
" + routerName;
                 s_logger.error(msg);
@@ -4166,7 +4166,7 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
                 return new ExecutionResult(false, "Can not find vif with mac " + mac + "
for VM " + domrName);
             }
 
-            nic.setDeviceId(Integer.valueOf(domrVif.getDevice(conn)));
+            nic.setDeviceId(Integer.parseInt(domrVif.getDevice(conn)));
         } catch (final Exception e) {
             final String msg = "Creating guest network failed due to " + e.toString();
             s_logger.warn(msg, e);


Mime
View raw message