forked from I2P_Developers/i2p.i2p
More findbugs all over
This commit is contained in:
@ -422,8 +422,8 @@ public class Blocklist {
|
||||
// buf.deleteCharAt(end1 - 1);
|
||||
// end1--;
|
||||
//}
|
||||
if (end1 <= 0)
|
||||
return null; // blank
|
||||
//if (end1 <= 0)
|
||||
// return null; // blank
|
||||
int start2 = -1;
|
||||
int mask = -1;
|
||||
String comment = null;
|
||||
|
@ -495,11 +495,7 @@ class StoreJob extends JobImpl {
|
||||
StoreMessageSelector selector = new StoreMessageSelector(getContext(), getJobId(), peer, token, expiration);
|
||||
|
||||
if (_log.shouldLog(Log.DEBUG)) {
|
||||
if (shouldEncrypt)
|
||||
_log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
|
||||
else
|
||||
_log.debug("sending store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
|
||||
//_log.debug("Expiration is " + new Date(sent.getMessageExpiration()));
|
||||
_log.debug("sending encrypted store to " + peer.getIdentity().getHash() + " through " + outTunnel + ": " + sent);
|
||||
}
|
||||
getContext().messageRegistry().registerPending(selector, onReply, onFail);
|
||||
getContext().tunnelDispatcher().dispatchOutbound(sent, outTunnel.getSendTunnelId(0), null, to);
|
||||
|
@ -981,7 +981,7 @@ public class NTCPConnection implements Closeable {
|
||||
List<Block> blocks = new ArrayList<Block>(2);
|
||||
Block block = new NTCP2Payload.RIBlock(ri, shouldFlood);
|
||||
int size = block.getTotalLength();
|
||||
if (size > BUFFER_SIZE) {
|
||||
if (size + NTCP2Payload.BLOCK_HEADER_SIZE > BUFFER_SIZE) {
|
||||
if (_log.shouldWarn())
|
||||
_log.warn("RI too big: " + ri);
|
||||
return;
|
||||
@ -993,7 +993,6 @@ public class NTCPConnection implements Closeable {
|
||||
// all zeros is fine here
|
||||
//block = new NTCP2Payload.PaddingBlock(_context, padlen);
|
||||
block = new NTCP2Payload.PaddingBlock(padlen);
|
||||
size += block.getTotalLength();
|
||||
blocks.add(block);
|
||||
}
|
||||
// use a "read buf" for the temp array
|
||||
@ -1040,7 +1039,6 @@ public class NTCPConnection implements Closeable {
|
||||
// all zeros is fine here
|
||||
//block = new NTCP2Payload.PaddingBlock(_context, padlen);
|
||||
block = new NTCP2Payload.PaddingBlock(padlen);
|
||||
plen += block.getTotalLength();
|
||||
blocks.add(block);
|
||||
}
|
||||
// use a "read buf" for the temp array
|
||||
|
@ -1904,7 +1904,6 @@ public class PeerState {
|
||||
_context.statManager().addRateData("udp.sendConfirmFragments", state.getFragmentCount());
|
||||
_context.statManager().addRateData("udp.sendConfirmVolley", numSends);
|
||||
_transport.succeeded(state);
|
||||
int numFragments = state.getFragmentCount();
|
||||
// this adjusts the rtt/rto/window/etc
|
||||
messageACKed(state.getMessageSize(), state.getLifetime(), numSends);
|
||||
//if (getSendWindowBytesRemaining() > 0)
|
||||
|
@ -87,11 +87,6 @@ class FragmentedMessage {
|
||||
_lastReceived = _lastReceived || isLast;
|
||||
if (fragmentNum > _highFragmentNum)
|
||||
_highFragmentNum = fragmentNum;
|
||||
if (isLast && fragmentNum <= 0) {
|
||||
if (_log.shouldLog(Log.ERROR))
|
||||
_log.error("hmm, isLast and fragmentNum=" + fragmentNum + " for message " + _messageId);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user