Big findbugs cleanup

This commit is contained in:
zzz
2008-10-19 22:09:14 +00:00
parent 8a756a6e81
commit 20effe3a7f
77 changed files with 261 additions and 245 deletions

View File

@@ -261,10 +261,7 @@ public class ConnectionPacketHandler {
_context.statManager().addRateData("stream.con.packetsAckedPerMessageReceived", acked.size(), highestRTT);
}
if (packet != null)
return adjustWindow(con, isNew, packet.getSequenceNum(), numResends, (acked != null ? acked.size() : 0), choke);
else
return adjustWindow(con, false, -1, numResends, (acked != null ? acked.size() : 0), choke);
return adjustWindow(con, isNew, packet.getSequenceNum(), numResends, (acked != null ? acked.size() : 0), choke);
}

View File

@@ -177,7 +177,6 @@ public class PacketLocal extends Packet implements MessageOutputStream.WriteStat
if (_connection == null)
throw new IllegalStateException("Cannot wait for accept with no connection");
long before = _context.clock().now();
long expiration = before+maxWaitMs;
int queued = _connection.getUnackedPacketsSent();
int window = _connection.getOptions().getWindowSize();
boolean accepted = _connection.packetSendChoke(maxWaitMs);

View File

@@ -34,9 +34,10 @@ class SchedulerClosing extends SchedulerImpl {
}
public boolean accept(Connection con) {
if (con == null)
return false;
long timeSinceClose = _context.clock().now() - con.getCloseSentOn();
boolean ok = (con != null) &&
(!con.getResetSent()) &&
boolean ok = (!con.getResetSent()) &&
(!con.getResetReceived()) &&
( (con.getCloseSentOn() > 0) || (con.getCloseReceivedOn() > 0) ) &&
(timeSinceClose < Connection.DISCONNECT_TIMEOUT) &&