Skip to content

Commit ec09977

Browse files
committed
Cleanup
1 parent 4280d69 commit ec09977

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

vertx-core/src/main/java/io/vertx/core/http/impl/HttpServerConnectionHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public void handle(HttpServerConnection conn) {
9999
HttpServerConnectionProvider http2Conn = (HttpServerConnectionProvider) conn;
100100
http2Conn.streamHandler(stream -> {
101101
HttpServerOptions options = server.options;
102-
HttpServerRequestImpl request = new HttpServerRequestImpl(stream, stream.context(), options.isHandle100ContinueAutomatically(),
103-
options.getMaxFormAttributeSize(), options.getMaxFormFields(), options.getMaxFormBufferedBytes(), serverOrigin);
104-
request.handler = requestHandler;
102+
HttpServerRequestImpl request = new HttpServerRequestImpl(requestHandler, stream, stream.context(),
103+
options.isHandle100ContinueAutomatically(), options.getMaxFormAttributeSize(), options.getMaxFormFields(),
104+
options.getMaxFormBufferedBytes(), serverOrigin);
105105
request.init();
106106
});
107107
}

vertx-core/src/main/java/io/vertx/core/http/impl/HttpServerRequestImpl.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,16 @@
4343
*/
4444
public class HttpServerRequestImpl extends HttpServerRequestInternal {
4545

46-
protected final ContextInternal context;
47-
protected final HttpServerStream stream;
48-
protected final HttpServerConnection connection;
49-
protected final HttpServerResponseImpl response;
46+
private final ContextInternal context;
47+
private final HttpServerStream stream;
48+
private final HttpServerConnection connection;
49+
private final HttpServerResponseImpl response;
5050
private final boolean handle100ContinueAutomatically;
5151
private final String serverOrigin;
5252
private final int maxFormAttributeSize;
5353
private final int maxFormFields;
5454
private final int maxFormBufferedBytes;
55-
56-
public Handler<HttpServerRequest> handler;
55+
private final Handler<HttpServerRequest> handler;
5756

5857
// Accessed on context thread
5958
private HttpMethod method;
@@ -73,13 +72,15 @@ public class HttpServerRequestImpl extends HttpServerRequestInternal {
7372
private boolean expectMultipart;
7473
private HttpPostRequestDecoder postRequestDecoder;
7574

76-
public HttpServerRequestImpl(HttpServerStream stream,
75+
public HttpServerRequestImpl(Handler<HttpServerRequest> handler,
76+
HttpServerStream stream,
7777
ContextInternal context,
7878
boolean handle100ContinueAutomatically,
7979
int maxFormAttributeSize,
8080
int maxFormFields,
8181
int maxFormBufferedBytes,
8282
String serverOrigin) {
83+
this.handler = handler;
8384
this.context = context;
8485
this.stream = stream;
8586
this.connection = stream.connection();

0 commit comments

Comments
 (0)