Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2772,8 +2772,8 @@ public long[] getNetworkStats(final Connection conn, final String privateIP) {
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;
Expand Down Expand Up @@ -4044,7 +4044,7 @@ protected ExecutionResult prepareNetworkElementCommand(final IpAssocCommand cmd)
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);
Expand Down Expand Up @@ -4104,7 +4104,7 @@ protected ExecutionResult prepareNetworkElementCommand(final SetNetworkACLComman
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);
Expand Down Expand Up @@ -4165,7 +4165,7 @@ private ExecutionResult prepareNetworkElementCommand(final SetupGuestNetworkComm
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);
Expand Down