diff --git a/tomcat/src/main/java/org/apache/coyote/parser/HttpRequestReader.java b/tomcat/src/main/java/org/apache/coyote/parser/HttpRequestReader.java index d0775c594c..45fa6e4cbf 100644 --- a/tomcat/src/main/java/org/apache/coyote/parser/HttpRequestReader.java +++ b/tomcat/src/main/java/org/apache/coyote/parser/HttpRequestReader.java @@ -2,9 +2,7 @@ import java.io.BufferedReader; import java.io.IOException; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.apache.coyote.request.Cookie; import org.apache.coyote.request.HttpRequestLine; import org.apache.coyote.request.QueryString; @@ -12,6 +10,9 @@ public class HttpRequestReader { + private HttpRequestReader() { + } + public static HttpRequestLine parseHttpRequestLine(final List headers) { final String requestLine = headers.get(0); diff --git a/tomcat/src/main/java/org/apache/coyote/request/HttpRequest.java b/tomcat/src/main/java/org/apache/coyote/request/HttpRequest.java index 537b645a94..9e38e66bb4 100644 --- a/tomcat/src/main/java/org/apache/coyote/request/HttpRequest.java +++ b/tomcat/src/main/java/org/apache/coyote/request/HttpRequest.java @@ -37,9 +37,9 @@ private void initializeSession(final Manager sessionManager) { } }, () -> { - final Session session = new Session(UUID.randomUUID().toString()); - sessionManager.add(session); - addSession(session); + final Session newSession = new Session(UUID.randomUUID().toString()); + sessionManager.add(newSession); + addSession(newSession); } ); }