Fixed some non-sense code as advised by FindBugs
This commit is contained in:
parent
ed3500373f
commit
464ea90492
@ -222,7 +222,7 @@ public class HttpTunnelingServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
@ChannelPipelineCoverage("one")
|
||||
private final class OutboundConnectionHandler extends SimpleChannelUpstreamHandler {
|
||||
private static final class OutboundConnectionHandler extends SimpleChannelUpstreamHandler {
|
||||
|
||||
private final ServletOutputStream out;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class HexDumpProxyInboundHandler extends SimpleChannelUpstreamHandler {
|
||||
}
|
||||
|
||||
@ChannelPipelineCoverage("one")
|
||||
private class OutboundHandler extends SimpleChannelUpstreamHandler {
|
||||
private static class OutboundHandler extends SimpleChannelUpstreamHandler {
|
||||
|
||||
private final Channel inboundChannel;
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class ZlibEncoder extends OneToOneEncoder {
|
||||
if (evt != null) {
|
||||
ctx.sendDownstream(evt);
|
||||
}
|
||||
return Channels.succeededFuture(evt.getChannel());
|
||||
return Channels.succeededFuture(ctx.getChannel());
|
||||
}
|
||||
|
||||
ChannelBuffer footer;
|
||||
|
@ -77,7 +77,8 @@ public abstract class HttpContentEncoder extends SimpleChannelHandler {
|
||||
if (acceptedEncoding == null) {
|
||||
acceptedEncoding = HttpHeaders.Values.IDENTITY;
|
||||
}
|
||||
acceptEncodingQueue.offer(acceptedEncoding);
|
||||
boolean offered = acceptEncodingQueue.offer(acceptedEncoding);
|
||||
assert offered;
|
||||
|
||||
ctx.sendUpstream(e);
|
||||
}
|
||||
|
@ -91,7 +91,9 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
|
||||
return;
|
||||
}
|
||||
|
||||
queue.offer((MessageEvent) e);
|
||||
boolean offered = queue.offer((MessageEvent) e);
|
||||
assert offered;
|
||||
|
||||
if (ctx.getChannel().isWritable()) {
|
||||
flush(ctx);
|
||||
}
|
||||
|
@ -138,7 +138,6 @@ final class Deflate {
|
||||
WrapperType wrapperType;
|
||||
private boolean wroteTrailer;
|
||||
byte data_type; // UNKNOWN, BINARY or ASCII
|
||||
byte method; // STORED (for zip only) or DEFLATED
|
||||
int last_flush; // value of flush param for previous deflate call
|
||||
int w_size; // LZ77 window size (32K by default)
|
||||
int w_bits; // log2(w_size) (8..16)
|
||||
@ -1196,7 +1195,7 @@ final class Deflate {
|
||||
}
|
||||
|
||||
if (match_available != 0) {
|
||||
bflush = _tr_tally(0, window[strstart - 1] & 0xff);
|
||||
_tr_tally(0, window[strstart - 1] & 0xff);
|
||||
match_available = 0;
|
||||
}
|
||||
flush_block_only(flush == JZlib.Z_FINISH);
|
||||
@ -1363,7 +1362,6 @@ final class Deflate {
|
||||
//System.out.println("level="+level);
|
||||
|
||||
this.strategy = strategy;
|
||||
this.method = (byte) method;
|
||||
|
||||
return deflateReset(strm);
|
||||
}
|
||||
@ -1371,7 +1369,6 @@ final class Deflate {
|
||||
private int deflateReset(ZStream strm) {
|
||||
strm.total_in = strm.total_out = 0;
|
||||
strm.msg = null; //
|
||||
strm.data_type = Z_UNKNOWN;
|
||||
|
||||
pending = 0;
|
||||
pending_out = 0;
|
||||
|
@ -566,7 +566,6 @@ final class InfBlocks {
|
||||
write = q;
|
||||
r = inflate_flush(z, r);
|
||||
q = write;
|
||||
m = q < read? read - q - 1 : end - q;
|
||||
if (read != write) {
|
||||
bitb = b;
|
||||
bitk = k;
|
||||
|
@ -409,7 +409,6 @@ final class InfCodes {
|
||||
s.write = q;
|
||||
r = s.inflate_flush(z, r);
|
||||
q = s.write;
|
||||
m = q < s.read? s.read - q - 1 : s.end - q;
|
||||
|
||||
if (s.read != s.write) {
|
||||
s.bitb = b;
|
||||
|
@ -252,7 +252,6 @@ final class Inflate {
|
||||
if (z.avail_in == 0) {
|
||||
return r;
|
||||
}
|
||||
r = f;
|
||||
|
||||
z.avail_in --;
|
||||
z.total_in ++;
|
||||
|
@ -63,7 +63,6 @@ public final class ZStream {
|
||||
public String msg;
|
||||
Deflate dstate;
|
||||
Inflate istate;
|
||||
int data_type; // best guess about the data type: ascii or binary
|
||||
long adler;
|
||||
int crc32;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user