8277016: Use blessed modifier order in jdk.httpserver

Reviewed-by: dfuchs
This commit is contained in:
Magnus Ihse Bursie 2021-11-12 14:12:37 +00:00
parent c4b44329c1
commit 51a5731d6d
5 changed files with 17 additions and 17 deletions

View File

@ -41,12 +41,12 @@ class ChunkedInputStream extends LeftOverInputStream {
private boolean needToReadHeader = true; private boolean needToReadHeader = true;
final static char CR = '\r'; static final char CR = '\r';
final static char LF = '\n'; static final char LF = '\n';
/* /*
* Maximum chunk header size of 2KB + 2 bytes for CRLF * Maximum chunk header size of 2KB + 2 bytes for CRLF
*/ */
private final static int MAX_CHUNK_HEADER_SIZE = 2050; private static final int MAX_CHUNK_HEADER_SIZE = 2050;
private int numeric (char[] arr, int nchars) throws IOException { private int numeric (char[] arr, int nchars) throws IOException {
assert arr.length >= nchars; assert arr.length >= nchars;

View File

@ -51,9 +51,9 @@ class ChunkedOutputStream extends FilterOutputStream
{ {
private boolean closed = false; private boolean closed = false;
/* max. amount of user data per chunk */ /* max. amount of user data per chunk */
final static int CHUNK_SIZE = 4096; static final int CHUNK_SIZE = 4096;
/* allow 4 bytes for chunk-size plus 4 for CRLFs */ /* allow 4 bytes for chunk-size plus 4 for CRLFs */
final static int OFFSET = 6; /* initial <=4 bytes for len + CRLF */ static final int OFFSET = 6; /* initial <=4 bytes for len + CRLF */
private int pos = OFFSET; private int pos = OFFSET;
private int count = 0; private int count = 0;
private byte[] buf = new byte [CHUNK_SIZE+OFFSET+2]; private byte[] buf = new byte [CHUNK_SIZE+OFFSET+2];

View File

@ -36,9 +36,9 @@ import com.sun.net.httpserver.*;
*/ */
class Request { class Request {
final static int BUF_LEN = 2048; static final int BUF_LEN = 2048;
final static byte CR = 13; static final byte CR = 13;
final static byte LF = 10; static final byte LF = 10;
private String startLine; private String startLine;
private SocketChannel chan; private SocketChannel chan;
@ -230,7 +230,7 @@ class Request {
int readlimit; int readlimit;
static long readTimeout; static long readTimeout;
ServerImpl server; ServerImpl server;
final static int BUFSIZE = 8 * 1024; static final int BUFSIZE = 8 * 1024;
public ReadStream (ServerImpl server, SocketChannel chan) throws IOException { public ReadStream (ServerImpl server, SocketChannel chan) throws IOException {
this.channel = chan; this.channel = chan;

View File

@ -75,13 +75,13 @@ class ServerImpl implements TimeSource {
private volatile long ticks; /* number of clock ticks since server started */ private volatile long ticks; /* number of clock ticks since server started */
private HttpServer wrapper; private HttpServer wrapper;
final static int CLOCK_TICK = ServerConfig.getClockTick(); static final int CLOCK_TICK = ServerConfig.getClockTick();
final static long IDLE_INTERVAL = ServerConfig.getIdleInterval(); static final long IDLE_INTERVAL = ServerConfig.getIdleInterval();
final static int MAX_IDLE_CONNECTIONS = ServerConfig.getMaxIdleConnections(); static final int MAX_IDLE_CONNECTIONS = ServerConfig.getMaxIdleConnections();
final static long TIMER_MILLIS = ServerConfig.getTimerMillis (); static final long TIMER_MILLIS = ServerConfig.getTimerMillis ();
final static long MAX_REQ_TIME=getTimeMillis(ServerConfig.getMaxReqTime()); static final long MAX_REQ_TIME=getTimeMillis(ServerConfig.getMaxReqTime());
final static long MAX_RSP_TIME=getTimeMillis(ServerConfig.getMaxRspTime()); static final long MAX_RSP_TIME=getTimeMillis(ServerConfig.getMaxRspTime());
final static boolean timer1Enabled = MAX_REQ_TIME != -1 || MAX_RSP_TIME != -1; static final boolean timer1Enabled = MAX_REQ_TIME != -1 || MAX_RSP_TIME != -1;
private Timer timer, timer1; private Timer timer, timer1;
private final Logger logger; private final Logger logger;

View File

@ -144,7 +144,7 @@ final class SimpleFileServerImpl {
return Startup.OK.statusCode; return Startup.OK.statusCode;
} }
private final static class Out { private static final class Out {
private final PrintWriter writer; private final PrintWriter writer;
private Out() { throw new AssertionError(); } private Out() { throw new AssertionError(); }