Jetty9 - Cleaned up warnings and dead code.

This commit is contained in:
Simone Bordet 2012-08-08 13:39:57 +02:00
parent fe99631069
commit c2a62962fc
1 changed files with 38 additions and 41 deletions

View File

@ -37,9 +37,9 @@ public class HttpGenerator
new ResponseInfo(HttpVersion.HTTP_1_1,new HttpFields(){{put(HttpHeader.CONNECTION,HttpHeaderValue.CLOSE);}},0,HttpStatus.INTERNAL_SERVER_ERROR_500,null,false); new ResponseInfo(HttpVersion.HTTP_1_1,new HttpFields(){{put(HttpHeader.CONNECTION,HttpHeaderValue.CLOSE);}},0,HttpStatus.INTERNAL_SERVER_ERROR_500,null,false);
// states // states
public enum Action { FLUSH, COMPLETE, PREPARE }; public enum Action { FLUSH, COMPLETE, PREPARE }
public enum State { START, COMMITTING, COMMITTING_COMPLETING, COMMITTED, COMPLETING, COMPLETING_1XX, END }; public enum State { START, COMMITTING, COMMITTING_COMPLETING, COMMITTED, COMPLETING, COMPLETING_1XX, END }
public enum Result { NEED_CHUNK,NEED_INFO,NEED_HEADER,NEED_BUFFER,FLUSH,FLUSH_CONTENT,OK,SHUTDOWN_OUT}; public enum Result { NEED_CHUNK,NEED_INFO,NEED_HEADER,NEED_BUFFER,FLUSH,FLUSH_CONTENT,OK,SHUTDOWN_OUT}
// other statics // other statics
public static final int CHUNK_SIZE = 12; public static final int CHUNK_SIZE = 12;
@ -426,9 +426,7 @@ public class HttpGenerator
return Result.OK; return Result.OK;
case END: case END:
if (!Boolean.TRUE.equals(_persistent)) return Boolean.TRUE.equals(_persistent) ? Result.OK : Result.SHUTDOWN_OUT;
result=Result.SHUTDOWN_OUT;
return Result.OK;
default: default:
throw new IllegalStateException(); throw new IllegalStateException();
@ -884,7 +882,6 @@ public class HttpGenerator
private static final byte[] CRLF = StringUtil.getBytes("\015\012"); private static final byte[] CRLF = StringUtil.getBytes("\015\012");
private static final byte[] TRANSFER_ENCODING_CHUNKED = StringUtil.getBytes("Transfer-Encoding: chunked\015\012"); private static final byte[] TRANSFER_ENCODING_CHUNKED = StringUtil.getBytes("Transfer-Encoding: chunked\015\012");
private static byte[] SERVER = StringUtil.getBytes("Server: Jetty(7.0.x)\015\012"); private static byte[] SERVER = StringUtil.getBytes("Server: Jetty(7.0.x)\015\012");
private static final byte[] NO_BYTES = {};
/* ------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------------- */