Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit 3fac077

Browse files
Marek Potociarpavelbucek
authored andcommitted
Minor optimization: made a few fields static.
Change-Id: I079fd870df0f70cae207ef38d314dd56047e6c86 Signed-off-by: Marek Potociar <[email protected]>
1 parent 5f9e5fb commit 3fac077

File tree

1 file changed

+11
-11
lines changed
  • containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet

1 file changed

+11
-11
lines changed

containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
33
*
4-
* Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved.
4+
* Copyright (c) 2012-2016 Oracle and/or its affiliates. All rights reserved.
55
*
66
* The contents of this file are subject to the terms of either the GNU
77
* General Public License Version 2 only ("GPL") or the Common Development
@@ -58,6 +58,13 @@
5858
import java.util.logging.Level;
5959
import java.util.logging.Logger;
6060

61+
import javax.ws.rs.RuntimeType;
62+
import javax.ws.rs.core.Form;
63+
import javax.ws.rs.core.MediaType;
64+
import javax.ws.rs.core.MultivaluedMap;
65+
import javax.ws.rs.core.Response;
66+
import javax.ws.rs.core.SecurityContext;
67+
6168
import javax.inject.Inject;
6269
import javax.inject.Provider;
6370
import javax.inject.Singleton;
@@ -68,13 +75,6 @@
6875
import javax.servlet.http.HttpServletRequest;
6976
import javax.servlet.http.HttpServletResponse;
7077

71-
import javax.ws.rs.RuntimeType;
72-
import javax.ws.rs.core.Form;
73-
import javax.ws.rs.core.MediaType;
74-
import javax.ws.rs.core.MultivaluedMap;
75-
import javax.ws.rs.core.Response;
76-
import javax.ws.rs.core.SecurityContext;
77-
7878
import org.glassfish.jersey.internal.ServiceFinderBinder;
7979
import org.glassfish.jersey.internal.inject.Providers;
8080
import org.glassfish.jersey.internal.inject.ReferencingFactory;
@@ -128,8 +128,8 @@ public class WebComponent {
128128

129129
private static final Logger LOGGER = Logger.getLogger(WebComponent.class.getName());
130130

131-
private final Type REQUEST_TYPE = (new TypeLiteral<Ref<HttpServletRequest>>() {}).getType();
132-
private final Type RESPONSE_TYPE = (new TypeLiteral<Ref<HttpServletResponse>>() {}).getType();
131+
private static final Type REQUEST_TYPE = (new TypeLiteral<Ref<HttpServletRequest>>() {}).getType();
132+
private static final Type RESPONSE_TYPE = (new TypeLiteral<Ref<HttpServletResponse>>() {}).getType();
133133

134134
private static final AsyncContextDelegate DEFAULT_ASYNC_DELEGATE = new AsyncContextDelegate() {
135135

@@ -146,7 +146,7 @@ public void complete() {
146146
private final RequestScopedInitializerProvider requestScopedInitializer;
147147
private final boolean requestResponseBindingExternalized;
148148

149-
private final RequestScopedInitializerProvider DEFAULT_REQUEST_SCOPE_INITIALIZER_PROVIDER =
149+
private static final RequestScopedInitializerProvider DEFAULT_REQUEST_SCOPE_INITIALIZER_PROVIDER =
150150
new RequestScopedInitializerProvider() {
151151
@Override
152152
public RequestScopedInitializer get(final RequestContextProvider context) {

0 commit comments

Comments
 (0)