Skip to content

Commit 05c9d54

Browse files
committed
removed Integer and Long instantiations
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
1 parent 9b16a6d commit 05c9d54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

server/src/com/cloud/network/security/SecurityGroupWorkTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public boolean canSend(long agentId) {
4848
synchronized (this) {
4949
Integer outstanding = _unackedMessages.get(agentId);
5050
if (outstanding == null) {
51-
outstanding = new Integer(0);
52-
_unackedMessages.put(new Long(agentId), outstanding);
51+
outstanding = 0;
52+
_unackedMessages.put(agentId, outstanding);
5353
}
5454
currLength = outstanding.intValue();
5555
if (currLength + 1 > _bufferLength) {
@@ -58,7 +58,7 @@ public boolean canSend(long agentId) {
5858
s_logger.debug("SecurityGroupManager: dropping a message because there are more than " + currLength + " outstanding messages, total dropped=" + discarded);
5959
return false;
6060
}
61-
_unackedMessages.put(new Long(agentId), ++currLength);
61+
_unackedMessages.put(agentId, ++currLength);
6262
}
6363
return true;
6464
}

0 commit comments

Comments
 (0)