forked from I2P_Developers/i2p.i2p
findbugs
This commit is contained in:
@@ -311,7 +311,7 @@ class Connection {
|
||||
int windowSize;
|
||||
int remaining;
|
||||
synchronized (_outboundPackets) {
|
||||
_outboundPackets.put(new Long(packet.getSequenceNum()), packet);
|
||||
_outboundPackets.put(Long.valueOf(packet.getSequenceNum()), packet);
|
||||
windowSize = _options.getWindowSize();
|
||||
remaining = windowSize - _outboundPackets.size() ;
|
||||
_outboundPackets.notifyAll();
|
||||
@@ -441,7 +441,7 @@ class Connection {
|
||||
if (acked != null) {
|
||||
for (int i = 0; i < acked.size(); i++) {
|
||||
PacketLocal p = acked.get(i);
|
||||
_outboundPackets.remove(new Long(p.getSequenceNum()));
|
||||
_outboundPackets.remove(Long.valueOf(p.getSequenceNum()));
|
||||
_ackedPackets++;
|
||||
if (p.getNumSends() > 1) {
|
||||
_activeResends--;
|
||||
@@ -1129,7 +1129,7 @@ class Connection {
|
||||
synchronized (_outboundPackets) {
|
||||
if (_packet.getSequenceNum() == _highestAckedThrough + 1)
|
||||
isLowest = true;
|
||||
if (_outboundPackets.containsKey(new Long(_packet.getSequenceNum())))
|
||||
if (_outboundPackets.containsKey(Long.valueOf(_packet.getSequenceNum())))
|
||||
resend = true;
|
||||
}
|
||||
if ( (resend) && (_packet.getAckTime() <= 0) ) {
|
||||
|
@@ -229,8 +229,8 @@ class MessageInputStream extends InputStream {
|
||||
_highestReadyBlockId = messageId;
|
||||
long cur = _highestReadyBlockId + 1;
|
||||
// now pull in any previously pending blocks
|
||||
while (_notYetReadyBlocks.containsKey(new Long(cur))) {
|
||||
ByteArray ba = _notYetReadyBlocks.remove(new Long(cur));
|
||||
while (_notYetReadyBlocks.containsKey(Long.valueOf(cur))) {
|
||||
ByteArray ba = _notYetReadyBlocks.remove(Long.valueOf(cur));
|
||||
if ( (ba != null) && (ba.getData() != null) && (ba.getValid() > 0) ) {
|
||||
_readyDataBlocks.add(ba);
|
||||
}
|
||||
@@ -245,9 +245,9 @@ class MessageInputStream extends InputStream {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("message is out of order: " + messageId);
|
||||
if (_locallyClosed) // dont need the payload, just the msgId in order
|
||||
_notYetReadyBlocks.put(new Long(messageId), new ByteArray(null));
|
||||
_notYetReadyBlocks.put(Long.valueOf(messageId), new ByteArray(null));
|
||||
else
|
||||
_notYetReadyBlocks.put(new Long(messageId), payload);
|
||||
_notYetReadyBlocks.put(Long.valueOf(messageId), payload);
|
||||
_dataLock.notifyAll();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user