From 8fed3c64d1dc3aae5e4cbd0405cf3420f0461fa1 Mon Sep 17 00:00:00 2001 From: jbescos Date: Fri, 17 Sep 2021 15:14:39 +0200 Subject: [PATCH 01/20] NettyConnectorProvider (jersey-netty-connector) is throwing an exception with inactive_pooled_connection_handler error Signed-off-by: Jorge Bescos Gascon --- .../jersey/netty/connector/NettyConnector.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java index f941e66572..056ef31802 100644 --- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java +++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.NoSuchElementException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutorService; @@ -102,7 +103,7 @@ class NettyConnector implements Connector { private final Integer maxPoolSizeTotal; //either from Jersey config, or default private final Integer maxPoolIdle; // either from Jersey config, or default - private static final String INACTIVE_POOLED_CONNECTION_HANDLER = "inactive_pooled_connection_handler"; + static final String INACTIVE_POOLED_CONNECTION_HANDLER = "inactive_pooled_connection_handler"; private static final String PRUNE_INACTIVE_POOL = "prune_inactive_pool"; private static final String READ_TIMEOUT_HANDLER = "read_timeout_handler"; private static final String REQUEST_HANDLER = "request_handler"; @@ -190,10 +191,18 @@ protected CompletableFuture execute(final ClientRequest jerseyRe synchronized (conns) { while (chan == null && !conns.isEmpty()) { chan = conns.remove(conns.size() - 1); - chan.pipeline().remove(INACTIVE_POOLED_CONNECTION_HANDLER); - chan.pipeline().remove(PRUNE_INACTIVE_POOL); + try { + chan.pipeline().remove(INACTIVE_POOLED_CONNECTION_HANDLER); + chan.pipeline().remove(PRUNE_INACTIVE_POOL); + } catch (NoSuchElementException e) { + /* + * Eat it. + * It could happen that the channel was closed, pipeline cleared and + * then it will fail to remove the names with this exception. + */ + } if (!chan.isOpen()) { - chan = null; + chan = null; } } } From 611ec4b9133e75e5df7ce7ca042e0d0a9144b409 Mon Sep 17 00:00:00 2001 From: Maxim Nesen <24524084+senivam@users.noreply.github.com> Date: Mon, 11 Oct 2021 16:31:59 +0200 Subject: [PATCH 02/20] modulelist maven plugin refactoring (#4887) Signed-off-by: Maxim Nesen --- .../pom.xml | 29 +++++++++++++++++++ .../plugins/GenerateJerseyModuleListMojo.java | 21 +++++++++++--- .../jersey/tools/plugins/HelpMojo.java | 11 ++++--- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/tools/jersey-doc-modulelist-maven-plugin/pom.xml b/tools/jersey-doc-modulelist-maven-plugin/pom.xml index 06ae2466c3..e09245b0a4 100644 --- a/tools/jersey-doc-modulelist-maven-plugin/pom.xml +++ b/tools/jersey-doc-modulelist-maven-plugin/pom.xml @@ -21,6 +21,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 + + org.eclipse.ee4j + project + 1.0.7 + + org.glassfish.jersey.tools.plugins jersey-doc-modulelist-maven-plugin maven-plugin @@ -53,6 +59,12 @@ maven-dependency-tree ${maven.shared.version} + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.6.1 + provided + @@ -74,6 +86,23 @@ false + + org.apache.maven.plugins + maven-plugin-plugin + 3.6.0 + + true + + + + default-descriptor + + descriptor + + process-classes + + + diff --git a/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/GenerateJerseyModuleListMojo.java b/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/GenerateJerseyModuleListMojo.java index da1de2c175..f284074e60 100644 --- a/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/GenerateJerseyModuleListMojo.java +++ b/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/GenerateJerseyModuleListMojo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -21,6 +21,10 @@ import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.logging.Log; +import org.apache.maven.plugins.annotations.Component; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.project.MavenProject; import java.io.BufferedReader; @@ -41,10 +45,11 @@ * The plugins main MOJO class. * Walks through the maven dependency tree and creates the docbook output file. * - * @goal generate - * @phase process-sources - * @aggregator + * goal: generate + * phase: process-sources + * aggregator */ +@Mojo(name = "generate", aggregator = true, defaultPhase = LifecyclePhase.PROCESS_SOURCES) public class GenerateJerseyModuleListMojo extends AbstractMojo { /** @@ -82,6 +87,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * @required * @readonly */ + @Parameter(defaultValue = "${project.basedir}") private MavenProject mavenProject; /** @@ -89,11 +95,13 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * @required * @readonly */ + @Parameter( defaultValue = "${session}", readonly = true ) private MavenSession mavenSession; /** * @parameter default-value="modules.xml" */ + @Parameter(defaultValue = "modules.xml") private String outputFileName; /** @@ -103,6 +111,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * * @parameter */ + @Parameter private String templateFileName; /** @@ -112,6 +121,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * * @parameter */ + @Parameter private String tableHeaderFileName; /** @@ -120,6 +130,7 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * * @parameter */ + @Parameter private String tableFooterFileName; /** @@ -129,11 +140,13 @@ public class GenerateJerseyModuleListMojo extends AbstractMojo { * * @parameter */ + @Parameter private String tableRowFileName; /** * @parameter default-value="false" */ + @Parameter(defaultValue = "false") private boolean outputUnmatched; private Configuration configuration; diff --git a/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/HelpMojo.java b/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/HelpMojo.java index c8c8b5680d..ccbdadd8ba 100644 --- a/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/HelpMojo.java +++ b/tools/jersey-doc-modulelist-maven-plugin/src/main/java/org/glassfish/jersey/tools/plugins/HelpMojo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -20,14 +20,17 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; /** * Displays the plugin help message. * - * @goal help - * @phase process-sources - * @aggregator + * goal: help + * phase: process-sources + * aggregator */ +@Mojo(name = "help", aggregator = true, defaultPhase = LifecyclePhase.PROCESS_SOURCES) public class HelpMojo extends AbstractMojo { private Log log; From 3716939adb721351e01b78bc54845b97bb6c836d Mon Sep 17 00:00:00 2001 From: jansupol Date: Wed, 6 Oct 2021 22:55:31 +0200 Subject: [PATCH 03/20] Update Directory Maven Plugin to work with maven 3.8.x Signed-off-by: jansupol --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 58d87c269c..ccc8e59c90 100644 --- a/pom.xml +++ b/pom.xml @@ -807,7 +807,7 @@ org.commonjava.maven.plugins directory-maven-plugin - 0.3.1 + 1.0 directories From aea2d4b87ddd0eb68b2d7b899ba48508be42205f Mon Sep 17 00:00:00 2001 From: Andrew Pielage Date: Thu, 2 Dec 2021 15:14:37 +0000 Subject: [PATCH 04/20] Better handling of MicroProfile Rest Client Proxies (#4918) Signed-off-by: Andrew Pielage --- .../restclient/RestClientBuilderImpl.java | 36 ++++++++++++++++++- .../restclient/RestClientBuilderImplTest.java | 33 +++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImplTest.java diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java index f157e7ba6b..3e3d129091 100644 --- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java +++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImpl.java @@ -36,6 +36,8 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.annotation.Priority; import javax.net.ssl.HostnameVerifier; @@ -445,10 +447,42 @@ public RestClientBuilder proxyAddress(String proxyHost, int proxyPort) { if (proxyPort <= 0 || proxyPort > 65535) { throw new IllegalArgumentException("Invalid proxy port"); } - property(ClientProperties.PROXY_URI, proxyHost + ":" + proxyPort); + + // If proxyString is something like "localhost:8765" we need to add a scheme since the connectors expect one + String proxyString = createProxyString(proxyHost, proxyPort); + + property(ClientProperties.PROXY_URI, proxyString); return this; } + static String createProxyString(String proxyHost, int proxyPort) { + boolean prependScheme = false; + String proxyString = proxyHost + ":" + proxyPort; + + if (proxyString.split(":").length == 2) { + // Check if first character is a number to account for if proxyHost is given as an IP rather than a name + // URI.create("127.0.0.1:8765") will lead to an IllegalArgumentException + if (proxyString.matches("\\d.*")) { + prependScheme = true; + } else { + // "localhost:8765" will set the scheme as "localhost" and the host as "null" + URI proxyURI = URI.create(proxyString); + if (proxyURI.getHost() == null && proxyURI.getScheme().equals(proxyHost)) { + prependScheme = true; + } + } + } + + if (prependScheme) { + proxyString = "http://" + proxyString; + Logger.getLogger(RestClientBuilderImpl.class.getName()).log(Level.FINE, + "No scheme provided with proxyHost: " + proxyHost + ". Defaulting to HTTP, proxy address = " + + proxyString); + } + + return proxyString; + } + @Override public RestClientBuilder queryParamStyle(QueryParamStyle queryParamStyle) { if (queryParamStyle != null) { diff --git a/ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImplTest.java b/ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImplTest.java new file mode 100644 index 0000000000..685e53a32a --- /dev/null +++ b/ext/microprofile/mp-rest-client/src/test/java/org/glassfish/jersey/microprofile/restclient/RestClientBuilderImplTest.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021 Payara Foundation and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package org.glassfish.jersey.microprofile.restclient; + +import org.junit.Assert; +import org.junit.Test; + +import static org.glassfish.jersey.microprofile.restclient.RestClientBuilderImpl.createProxyString; + +public class RestClientBuilderImplTest { + + @Test + public void createProxyStringTest() { + Assert.assertTrue(createProxyString("localhost", 8765).equals("http://localhost:8765")); + Assert.assertTrue(createProxyString("http://localhost", 8765).equals("http://localhost:8765")); + Assert.assertTrue(createProxyString("127.0.0.1", 8765).equals("http://127.0.0.1:8765")); + Assert.assertTrue(createProxyString("http://192.168.1.1", 8765).equals("http://192.168.1.1:8765")); + } +} From 28a89ce35ed184437b67d1fa9e9e62e18d68a7f9 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Fri, 3 Dec 2021 13:11:01 +0100 Subject: [PATCH 05/20] Refactor processResponseError in ServerRuntime Signed-off-by: Maxim Nesen --- .../org/glassfish/jersey/server/ServerRuntime.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java index 07976531ae..981514c585 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -460,6 +460,8 @@ private boolean processResponseError(final Throwable responseError) { final Iterable mappers = Providers.getAllProviders(runtime.injectionManager, ResponseErrorMapper.class); + ContainerResponse processedResponse = null; + try { Response processedError = null; for (final ResponseErrorMapper mapper : mappers) { @@ -470,11 +472,16 @@ private boolean processResponseError(final Throwable responseError) { } if (processedError != null) { - processResponse(new ContainerResponse(processingContext.request(), processedError)); + processedResponse = + processResponse(new ContainerResponse(processingContext.request(), processedError)); processed = true; } } catch (final Throwable throwable) { LOGGER.log(Level.FINE, LocalizationMessages.ERROR_EXCEPTION_MAPPING_PROCESSED_RESPONSE_ERROR(), throwable); + } finally { + if (processedResponse != null) { + release(processedResponse); + } } } From f7f4373993f9e93e563a305caaff7a6fd7943b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= Date: Thu, 2 Dec 2021 22:35:44 +0100 Subject: [PATCH 06/20] Issue #4917 - Fix dependencies for Grizzly connector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exclude declared dependencies with other versions from grizzly-http-client Signed-off-by: Steffen Nießing --- connectors/grizzly-connector/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index 4438c4c0ef..6954cf71c6 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml @@ -40,6 +40,16 @@ org.glassfish.grizzly grizzly-http-client + + + org.glassfish.grizzly + grizzly-websockets + + + org.glassfish.grizzly + connection-pool + + org.glassfish.grizzly From 9c8628a9f249653e844f8d03d49ace97ac92be02 Mon Sep 17 00:00:00 2001 From: jansupol Date: Fri, 10 Dec 2021 00:15:40 +0100 Subject: [PATCH 07/20] Adopt Jackson 2.13 Signed-off-by: jansupol --- .../jackson/jaxrs/base/ProviderBase.java | 45 ++++++++----------- .../jackson/jaxrs/json/PackageVersion.java | 2 +- pom.xml | 2 +- 3 files changed, 20 insertions(+), 29 deletions(-) diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java index e42e163571..d1e3d93447 100644 --- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java @@ -63,6 +63,10 @@ public abstract class ProviderBase< */ public final static String HEADER_CONTENT_TYPE_OPTIONS = "X-Content-Type-Options"; + protected final static String CLASS_NAME_NO_CONTENT_EXCEPTION = "javax.ws.rs.core.NoContentException"; + + private final static String NO_CONTENT_MESSAGE = "No content (empty input stream)"; + /** * Looks like we need to worry about accidental * data binding for types we shouldn't be handling. This is @@ -192,9 +196,6 @@ public abstract class ProviderBase< protected final LRUMap _writers = new LRUMap(16, 120); - protected final AtomicReference _noContentExceptionRef - = new AtomicReference(); - /* /********************************************************** /* Life-cycle @@ -207,9 +208,8 @@ protected ProviderBase(MAPPER_CONFIG mconfig) { } /** - * Constructor that is only added to resolve - * issue #10; problems with combination of - * RESTeasy and CDI. + * Constructor that is only added to resolve [jaxrs-providers#10]; problems + * with combination of RESTeasy and CDI. * Should NOT be used by any code explicitly; only exists * for proxy support. */ @@ -554,9 +554,8 @@ public boolean isWriteable(Class type, Type genericType, Annotation[] annotat // negation: Boolean.TRUE means untouchable -> can not write return !customUntouchable.booleanValue(); } - /* Ok: looks like we must weed out some core types here; ones that - * make no sense to try to bind from JSON: - */ + // Ok: looks like we must weed out some core types here; ones that + // make no sense to try to bind from JSON: if (_isIgnorableForWriting(new ClassKey(type))) { return false; } @@ -751,9 +750,8 @@ public boolean isReadable(Class type, Type genericType, Annotation[] annotati // negation: Boolean.TRUE means untouchable -> can not write return !customUntouchable.booleanValue(); } - /* Ok: looks like we must weed out some core types here; ones that - * make no sense to try to bind from JSON: - */ + // Ok: looks like we must weed out some core types here; ones that + // make no sense to try to bind from JSON: if (_isIgnorableForReading(new ClassKey(type))) { return false; } @@ -797,14 +795,11 @@ public Object readFrom(Class type, Type genericType, Annotation[] annota if (JaxRSFeature.ALLOW_EMPTY_INPUT.enabledIn(_jaxRSFeatures)) { return null; } - /* 05-Apr-2014, tatu: Trick-ee. NoContentFoundException only available in JAX-RS 2.0... - * so need bit of obfuscated code to reach it. - */ - IOException fail = _noContentExceptionRef.get(); - if (fail == null) { - fail = _createNoContentException(); - } - throw fail; + // 05-Apr-2014, tatu: Trick-ee. NoContentFoundException only available in JAX-RS 2.0... + // so need bit of obfuscated code to reach it. + + // 20-Jan-2021, tatu: as per [jaxrs-providers#134], simplify + throw _createNoContentException(); } Class rawType = type; if (rawType == JsonParser.class) { @@ -990,13 +985,9 @@ protected boolean _isIgnorableForWriting(ClassKey typeKey) { return _untouchables.contains(typeKey); } - - /** - * @since 2.4 - */ - protected IOException _createNoContentException() - { - return new NoContentException("No content (empty input stream)"); + + protected IOException _createNoContentException() { + return new NoContentException(NO_CONTENT_MESSAGE); } /* diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java index e8f885a50a..9974df6d93 100644 --- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java +++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java @@ -11,7 +11,7 @@ */ public final class PackageVersion implements Versioned { public final static Version VERSION = VersionUtil.parseVersion( - "2.11.3", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider"); + "2.13.0", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider"); @Override public Version version() { diff --git a/pom.xml b/pom.xml index ccc8e59c90..170803faca 100644 --- a/pom.xml +++ b/pom.xml @@ -2125,7 +2125,7 @@ org.jvnet.hk2.*;version="[2.5,4)" 5.1.0 4.5.13 - 2.12.2 + 2.13.0 1.9.13 3.25.0-GA 3.3.0.Final From bdb0dd05560d7611b1650ef35fab468323da8a56 Mon Sep 17 00:00:00 2001 From: arjantijms Date: Tue, 14 Dec 2021 10:46:25 +0100 Subject: [PATCH 08/20] Replace usage of deprecated beanManager.createInjectionTarget Signed-off-by: arjantijms --- .../internal/hibernate/DestructibleBeanInstance.java | 5 ++++- .../internal/CdiExternalRequestScopeExtension.java | 8 ++++++-- .../internal/CdiInterceptorWrapperExtension.java | 6 +++++- .../jersey/inject/weld/internal/bean/BeanHelper.java | 4 +++- .../weld/internal/managed/CdiInjectionManager.java | 9 ++++++--- .../inject/weld/internal/scope/RequestScopeBean.java | 4 +++- .../jersey/inject/cdi/se/CdiSeInjectionManager.java | 7 +++++-- .../glassfish/jersey/inject/cdi/se/RequestScopeBean.java | 6 ++++-- .../glassfish/jersey/inject/cdi/se/bean/BeanHelper.java | 6 ++++-- 9 files changed, 40 insertions(+), 15 deletions(-) diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/hibernate/DestructibleBeanInstance.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/hibernate/DestructibleBeanInstance.java index d0492e9f12..dbaa9b31aa 100644 --- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/hibernate/DestructibleBeanInstance.java +++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/hibernate/DestructibleBeanInstance.java @@ -12,6 +12,7 @@ import javax.enterprise.inject.spi.AnnotatedType; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; /** * @author Hardy Ferentschik @@ -43,7 +44,9 @@ public void destroy() { private InjectionTarget createInjectionTarget(BeanManager beanManager, Class type) { AnnotatedType annotatedType = beanManager.createAnnotatedType(type); - return beanManager.createInjectionTarget(annotatedType); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + + return injectionTargetFactory.createInjectionTarget(null); } private static T createAndInjectBeans(BeanManager beanManager, InjectionTarget injectionTarget) { diff --git a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java index 54b51e7186..50c05a30a1 100644 --- a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java +++ b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018 Payara Foundation and/or its affiliates. * * This program and the accompanying materials are made available under the @@ -35,6 +35,7 @@ import javax.enterprise.inject.spi.Extension; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.util.AnnotationLiteral; /** @@ -69,7 +70,10 @@ private void beforeBeanDiscovery(@Observes BeforeBeanDiscovery beforeBeanDiscove private void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager) { // we need the injection target so that CDI could instantiate the original interceptor for us - final InjectionTarget interceptorTarget = beanManager.createInjectionTarget(requestScopeType); + final InjectionTargetFactory injectionTargetFactory = + beanManager.getInjectionTargetFactory(requestScopeType); + final InjectionTarget interceptorTarget = + injectionTargetFactory.createInjectionTarget(null); afterBeanDiscovery.addBean(new Bean() { diff --git a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java index 0a31b53cf0..463f0edc1e 100644 --- a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java +++ b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java @@ -37,6 +37,7 @@ import javax.enterprise.inject.spi.Extension; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.util.AnnotationLiteral; import javax.interceptor.Interceptor; @@ -100,7 +101,10 @@ private void afterBeanDiscovery(@Observes AfterBeanDiscovery afterBeanDiscovery, // we need the injection target so that CDI could instantiate the original interceptor for us final AnnotatedType interceptorType = interceptorAnnotatedType; - final InjectionTarget interceptorTarget = beanManager.createInjectionTarget(interceptorType); + final InjectionTargetFactory injectionTargetFactory = + beanManager.getInjectionTargetFactory(interceptorType); + final InjectionTarget interceptorTarget = + injectionTargetFactory.createInjectionTarget(null); afterBeanDiscovery.addBean(new Bean() { diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java index d1fbafae5d..81dc831889 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java @@ -28,6 +28,7 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.ws.rs.HttpMethod; import javax.ws.rs.Path; import javax.ws.rs.RuntimeType; @@ -105,7 +106,8 @@ public static void registerBean(RuntimeType runtimeType, InitializableInstan public static BindingBeanPair registerBean(RuntimeType runtimeType, ClassBinding binding, AfterBeanDiscovery abd, Collection resolvers, BeanManager beanManager) { AnnotatedType annotatedType = beanManager.createAnnotatedType(binding.getService()); - InjectionTarget injectionTarget = beanManager.createInjectionTarget(annotatedType); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + InjectionTarget injectionTarget = injectionTargetFactory.createInjectionTarget(null); ClassBean bean = new ClassBean<>(runtimeType, binding); bean.setInjectionTarget(getJerseyInjectionTarget(binding.getService(), injectionTarget, bean, resolvers)); diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java index a99f2f05a1..e3746abec0 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/managed/CdiInjectionManager.java @@ -29,6 +29,7 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.inject.spi.Unmanaged; import javax.inject.Singleton; import javax.ws.rs.RuntimeType; @@ -295,10 +296,12 @@ public List getAllInstances(Type contractOrImpl) { @Override @SuppressWarnings("unchecked") public void inject(Object instance) { + CreationalContext creationalContext = createCreationalContext(null); AnnotatedType annotatedType = beanManager.createAnnotatedType((Class) instance.getClass()); - InjectionTarget injectionTarget = beanManager.createInjectionTarget(annotatedType); - CreationalContext context = createCreationalContext(null); - injectionTarget.inject(instance, context); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + InjectionTarget injectionTarget = injectionTargetFactory.createInjectionTarget(null); + + injectionTarget.inject(instance, creationalContext); } @Override diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java index 6770060bfa..62d7e1bec5 100644 --- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java +++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java @@ -30,6 +30,7 @@ import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.util.AnnotationLiteral; import javax.inject.Singleton; @@ -49,7 +50,8 @@ public class RequestScopeBean implements Bean { */ public RequestScopeBean(BeanManager beanManager) { AnnotatedType annotatedType = beanManager.createAnnotatedType(CdiRequestScope.class); - this.injectionTarget = beanManager.createInjectionTarget(annotatedType); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + this.injectionTarget = injectionTargetFactory.createInjectionTarget(null); } @Override diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/CdiSeInjectionManager.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/CdiSeInjectionManager.java index 309649077e..3a8d44d40f 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/CdiSeInjectionManager.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/CdiSeInjectionManager.java @@ -32,6 +32,7 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.inject.spi.Unmanaged; import org.glassfish.jersey.inject.cdi.se.bean.JerseyBean; @@ -236,9 +237,11 @@ public List getAllInstances(Type contractOrImpl) { @SuppressWarnings("unchecked") public void inject(Object instance) { if (isInitialized()) { - AnnotatedType annotatedType = beanManager.createAnnotatedType((Class) instance.getClass()); - InjectionTarget injectionTarget = beanManager.createInjectionTarget(annotatedType); CreationalContext context = beanManager.createCreationalContext(null); + AnnotatedType annotatedType = beanManager.createAnnotatedType((Class) instance.getClass()); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + InjectionTarget injectionTarget = injectionTargetFactory.createInjectionTarget(null); + injectionTarget.inject(instance, context); } } diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java index 7b2541bd5f..c605b5003f 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -30,6 +30,7 @@ import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionPoint; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import javax.enterprise.util.AnnotationLiteral; import javax.inject.Singleton; @@ -49,7 +50,8 @@ public class RequestScopeBean implements Bean { */ public RequestScopeBean(BeanManager beanManager) { AnnotatedType annotatedType = beanManager.createAnnotatedType(CdiRequestScope.class); - this.injectionTarget = beanManager.createInjectionTarget(annotatedType); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + this.injectionTarget = injectionTargetFactory.createInjectionTarget(null); } @Override diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java index 97d472c6e6..1a408366a9 100644 --- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java +++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -26,6 +26,7 @@ import javax.enterprise.inject.spi.Bean; import javax.enterprise.inject.spi.BeanManager; import javax.enterprise.inject.spi.InjectionTarget; +import javax.enterprise.inject.spi.InjectionTargetFactory; import org.glassfish.jersey.inject.cdi.se.injector.CachedConstructorAnalyzer; import org.glassfish.jersey.inject.cdi.se.injector.InjectionUtils; @@ -99,7 +100,8 @@ public static void registerBean(InstanceBinding binding, AfterBeanDiscove public static void registerBean(ClassBinding binding, AfterBeanDiscovery abd, Collection resolvers, BeanManager beanManager) { AnnotatedType annotatedType = beanManager.createAnnotatedType(binding.getService()); - InjectionTarget injectionTarget = beanManager.createInjectionTarget(annotatedType); + InjectionTargetFactory injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType); + InjectionTarget injectionTarget = injectionTargetFactory.createInjectionTarget(null); ClassBean bean = new ClassBean<>(binding); bean.setInjectionTarget(getJerseyInjectionTarget(binding.getService(), injectionTarget, bean, resolvers)); From 21115d45121bc8ad3dd8e1f20499b7ada87573b4 Mon Sep 17 00:00:00 2001 From: jansupol Date: Thu, 16 Dec 2021 21:52:55 +0100 Subject: [PATCH 09/20] Prevent loading Feature/DynamicFeature services multiple times. Signed-off-by: jansupol --- .../org/glassfish/jersey/AbstractFeatureConfigurator.java | 3 ++- .../jersey/internal/DynamicFeatureConfigurator.java | 5 ++++- .../org/glassfish/jersey/internal/FeatureConfigurator.java | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java index dbc4308c3e..61b7eb5a95 100644 --- a/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java +++ b/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java @@ -24,6 +24,7 @@ import javax.ws.rs.RuntimeType; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; @@ -62,7 +63,7 @@ protected List> loadImplementations(Map applicationProp * @param features list of features to be registered * @param bootstrapBag place where features are being registered */ - protected void registerFeatures(List> features, + protected void registerFeatures(Collection> features, BootstrapBag bootstrapBag) { final List autoDiscoverables = new ArrayList<>(); diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/DynamicFeatureConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/internal/DynamicFeatureConfigurator.java index ed2c8fb9cb..f8ea86681e 100644 --- a/core-common/src/main/java/org/glassfish/jersey/internal/DynamicFeatureConfigurator.java +++ b/core-common/src/main/java/org/glassfish/jersey/internal/DynamicFeatureConfigurator.java @@ -22,8 +22,10 @@ import javax.ws.rs.RuntimeType; import javax.ws.rs.container.DynamicFeature; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; /** * Registers JAX-RS {@link DynamicFeature} which are listed as SPIs for registration. @@ -51,7 +53,8 @@ public DynamicFeatureConfigurator() { public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) { final Map properties = bootstrapBag.getConfiguration().getProperties(); if (PropertiesHelper.isJaxRsServiceLoadingEnabled(properties)) { - final List> dynamicFeatures = loadImplementations(properties); + final Set> dynamicFeatures = new HashSet<>(); + dynamicFeatures.addAll(loadImplementations(properties)); dynamicFeatures.addAll(loadImplementations(properties, DynamicFeature.class.getClassLoader())); registerFeatures(dynamicFeatures, bootstrapBag); diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/FeatureConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/internal/FeatureConfigurator.java index 24a24fbbb0..49854073fe 100644 --- a/core-common/src/main/java/org/glassfish/jersey/internal/FeatureConfigurator.java +++ b/core-common/src/main/java/org/glassfish/jersey/internal/FeatureConfigurator.java @@ -22,8 +22,9 @@ import javax.ws.rs.RuntimeType; import javax.ws.rs.core.Feature; -import java.util.List; +import java.util.HashSet; import java.util.Map; +import java.util.Set; /** * Registers JAX-RS {@link Feature} which are listed as SPIs for registration. @@ -44,7 +45,8 @@ public FeatureConfigurator(RuntimeType runtimeType) { public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) { final Map properties = bootstrapBag.getConfiguration().getProperties(); if (PropertiesHelper.isJaxRsServiceLoadingEnabled(properties)) { - final List> features = loadImplementations(properties); + final Set> features = new HashSet<>(); + features.addAll(loadImplementations(properties)); features.addAll(loadImplementations(properties, Feature.class.getClassLoader())); registerFeatures(features, bootstrapBag); From 1fe6b75e3ede08dc7502f9ca57f05ce0167a7391 Mon Sep 17 00:00:00 2001 From: jansupol Date: Tue, 4 Jan 2022 15:58:40 +0100 Subject: [PATCH 10/20] Cache a lazy reference to OSGi registry instance Signed-off-by: jansupol --- .../internal/util/ReflectionHelper.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java b/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java index e4a202b53d..b4519ac4af 100644 --- a/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java +++ b/core-common/src/main/java/org/glassfish/jersey/internal/util/ReflectionHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -56,7 +56,9 @@ import org.glassfish.jersey.internal.LocalizationMessages; import org.glassfish.jersey.internal.OsgiRegistry; import org.glassfish.jersey.internal.util.collection.ClassTypePair; - +import org.glassfish.jersey.internal.util.collection.LazyValue; +import org.glassfish.jersey.internal.util.collection.Value; +import org.glassfish.jersey.internal.util.collection.Values; import org.osgi.framework.Bundle; import org.osgi.framework.FrameworkUtil; @@ -1469,22 +1471,25 @@ private static boolean checkTypeBounds(final Class type, final Type[] bounds) { private static final Class bundleReferenceClass = AccessController.doPrivileged( classForNamePA("org.osgi.framework.BundleReference", null)); - - /** - * Returns an {@link OsgiRegistry} instance. - * - * @return an {@link OsgiRegistry} instance or {@code null} if the class cannot be instantiated (not in OSGi environment). - */ - public static OsgiRegistry getOsgiRegistryInstance() { + private static final LazyValue osgiInstance = Values.lazy((Value) () -> { try { if (bundleReferenceClass != null) { return OsgiRegistry.getInstance(); } - } catch (final Exception e) { + } catch (final Throwable e) { // Do nothing - instance is null. } return null; + }); + + /** + * Returns an {@link OsgiRegistry} instance. + * + * @return an {@link OsgiRegistry} instance or {@code null} if the class cannot be instantiated (not in OSGi environment). + */ + public static OsgiRegistry getOsgiRegistryInstance() { + return (OsgiRegistry) osgiInstance.get(); } /** From 7212b01e007ff61150c06baf8e557b2460bdf8d4 Mon Sep 17 00:00:00 2001 From: jansupol Date: Wed, 22 Dec 2021 12:29:39 +0100 Subject: [PATCH 11/20] Add OSGi headers to MP Config module Signed-off-by: jansupol --- ext/microprofile/mp-config/pom.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml index 95ac6f9858..c83bcb20f6 100644 --- a/ext/microprofile/mp-config/pom.xml +++ b/ext/microprofile/mp-config/pom.xml @@ -83,5 +83,27 @@ + + + + org.apache.felix + maven-bundle-plugin + true + true + + + + org.glassfish.jersey.microprofile.config.*;version=${project.version} + + + org.eclipse.microprofile.config.*;version="!", + * + + + true + + + + From e84b5e897a459ee76693498290dade0709e182fd Mon Sep 17 00:00:00 2001 From: jansupol Date: Thu, 6 Jan 2022 16:17:42 +0100 Subject: [PATCH 12/20] Fix OSGi tests on JDK 17 Signed-off-by: jansupol --- .../examples/helloworld/test/AbstractWebAppTest.java | 7 ++++++- .../osgihttpservice/test/AbstractHttpServiceTest.java | 7 ++++++- .../jersey/osgi/test/basic/PackageScanningTest.java | 10 +++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/examples/osgi-helloworld-webapp/functional-test/src/test/java/org/glassfish/jersey/examples/helloworld/test/AbstractWebAppTest.java b/examples/osgi-helloworld-webapp/functional-test/src/test/java/org/glassfish/jersey/examples/helloworld/test/AbstractWebAppTest.java index 02cfeff251..99630c5ee9 100644 --- a/examples/osgi-helloworld-webapp/functional-test/src/test/java/org/glassfish/jersey/examples/helloworld/test/AbstractWebAppTest.java +++ b/examples/osgi-helloworld-webapp/functional-test/src/test/java/org/glassfish/jersey/examples/helloworld/test/AbstractWebAppTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0, which is available at @@ -122,6 +122,11 @@ public List