Skip to content
Permalink
Browse files
8277016: Use blessed modifier order in jdk.httpserver
Reviewed-by: dfuchs
  • Loading branch information
magicus committed Nov 12, 2021
1 parent c4b4432 commit 51a5731d6dc4b6f6feac920a4b8b49c15fd6b34f
Showing 5 changed files with 17 additions and 17 deletions.
@@ -41,12 +41,12 @@ class ChunkedInputStream extends LeftOverInputStream {

private boolean needToReadHeader = true;

final static char CR = '\r';
final static char LF = '\n';
static final char CR = '\r';
static final char LF = '\n';
/*
* 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 {
assert arr.length >= nchars;
@@ -51,9 +51,9 @@ class ChunkedOutputStream extends FilterOutputStream
{
private boolean closed = false;
/* 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 */
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 count = 0;
private byte[] buf = new byte [CHUNK_SIZE+OFFSET+2];
@@ -36,9 +36,9 @@
*/
class Request {

final static int BUF_LEN = 2048;
final static byte CR = 13;
final static byte LF = 10;
static final int BUF_LEN = 2048;
static final byte CR = 13;
static final byte LF = 10;

private String startLine;
private SocketChannel chan;
@@ -230,7 +230,7 @@ static class ReadStream extends InputStream {
int readlimit;
static long readTimeout;
ServerImpl server;
final static int BUFSIZE = 8 * 1024;
static final int BUFSIZE = 8 * 1024;

public ReadStream (ServerImpl server, SocketChannel chan) throws IOException {
this.channel = chan;
@@ -75,13 +75,13 @@ class ServerImpl implements TimeSource {
private volatile long ticks; /* number of clock ticks since server started */
private HttpServer wrapper;

final static int CLOCK_TICK = ServerConfig.getClockTick();
final static long IDLE_INTERVAL = ServerConfig.getIdleInterval();
final static int MAX_IDLE_CONNECTIONS = ServerConfig.getMaxIdleConnections();
final static long TIMER_MILLIS = ServerConfig.getTimerMillis ();
final static long MAX_REQ_TIME=getTimeMillis(ServerConfig.getMaxReqTime());
final static long MAX_RSP_TIME=getTimeMillis(ServerConfig.getMaxRspTime());
final static boolean timer1Enabled = MAX_REQ_TIME != -1 || MAX_RSP_TIME != -1;
static final int CLOCK_TICK = ServerConfig.getClockTick();
static final long IDLE_INTERVAL = ServerConfig.getIdleInterval();
static final int MAX_IDLE_CONNECTIONS = ServerConfig.getMaxIdleConnections();
static final long TIMER_MILLIS = ServerConfig.getTimerMillis ();
static final long MAX_REQ_TIME=getTimeMillis(ServerConfig.getMaxReqTime());
static final long MAX_RSP_TIME=getTimeMillis(ServerConfig.getMaxRspTime());
static final boolean timer1Enabled = MAX_REQ_TIME != -1 || MAX_RSP_TIME != -1;

private Timer timer, timer1;
private final Logger logger;
@@ -144,7 +144,7 @@ static int start(PrintWriter writer, String[] args) {
return Startup.OK.statusCode;
}

private final static class Out {
private static final class Out {
private final PrintWriter writer;
private Out() { throw new AssertionError(); }

1 comment on commit 51a5731

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 51a5731 Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.