From 3fac077a8d1fa27743cdd63c5342ff52a2b09591 Mon Sep 17 00:00:00 2001 From: Marek Potociar Date: Fri, 15 Jul 2016 11:49:30 +0200 Subject: [PATCH] Minor optimization: made a few fields static. Change-Id: I079fd870df0f70cae207ef38d314dd56047e6c86 Signed-off-by: Marek Potociar --- .../jersey/servlet/WebComponent.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java index c7a565dbed..a14fa0290f 100644 --- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java +++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebComponent.java @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2012-2015 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012-2016 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -58,6 +58,13 @@ import java.util.logging.Level; import java.util.logging.Logger; +import javax.ws.rs.RuntimeType; +import javax.ws.rs.core.Form; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.SecurityContext; + import javax.inject.Inject; import javax.inject.Provider; import javax.inject.Singleton; @@ -68,13 +75,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.RuntimeType; -import javax.ws.rs.core.Form; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.SecurityContext; - import org.glassfish.jersey.internal.ServiceFinderBinder; import org.glassfish.jersey.internal.inject.Providers; import org.glassfish.jersey.internal.inject.ReferencingFactory; @@ -128,8 +128,8 @@ public class WebComponent { private static final Logger LOGGER = Logger.getLogger(WebComponent.class.getName()); - private final Type REQUEST_TYPE = (new TypeLiteral>() {}).getType(); - private final Type RESPONSE_TYPE = (new TypeLiteral>() {}).getType(); + private static final Type REQUEST_TYPE = (new TypeLiteral>() {}).getType(); + private static final Type RESPONSE_TYPE = (new TypeLiteral>() {}).getType(); private static final AsyncContextDelegate DEFAULT_ASYNC_DELEGATE = new AsyncContextDelegate() { @@ -146,7 +146,7 @@ public void complete() { private final RequestScopedInitializerProvider requestScopedInitializer; private final boolean requestResponseBindingExternalized; - private final RequestScopedInitializerProvider DEFAULT_REQUEST_SCOPE_INITIALIZER_PROVIDER = + private static final RequestScopedInitializerProvider DEFAULT_REQUEST_SCOPE_INITIALIZER_PROVIDER = new RequestScopedInitializerProvider() { @Override public RequestScopedInitializer get(final RequestContextProvider context) {