Merge pull request #4747 from senivam/3x_merged
Merge of actual master into 3.x branch
diff --git a/.travis.yml b/.travis.yml
index 66cdd26..f746552 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,9 +19,12 @@
matrix:
- TEST_SET="-Ptravis_e2e_skip"
- TEST_SET="-Ptravis_e2e"
- - TEST_SET="glassfish-copyright:copyright"
+ - TEST_SET="glassfish-copyright:check"
install: true
script:
- - bash etc/travis/travis.sh $TEST_SET
\ No newline at end of file
+ - bash etc/travis/travis.sh $TEST_SET
+
+git:
+ depth: false
\ No newline at end of file
diff --git a/archetypes/jersey-example-java8-webapp/pom.xml b/archetypes/jersey-example-java8-webapp/pom.xml
index 26ad182..93ec687 100644
--- a/archetypes/jersey-example-java8-webapp/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
index 8b30af9..c06e210 100644
--- a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
@@ -81,8 +81,6 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <!-- TODO: Remove the version when JERSEY-2743 is resolved. -->
- <version>9.2.6.v20141205</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<stopPort>9999</stopPort>
diff --git a/archetypes/jersey-heroku-webapp/pom.xml b/archetypes/jersey-heroku-webapp/pom.xml
index 49eeca3..53d21df 100644
--- a/archetypes/jersey-heroku-webapp/pom.xml
+++ b/archetypes/jersey-heroku-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
index e6b8bfa..e960ea3 100644
--- a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
@@ -64,7 +64,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.0</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
<source>11</source>
diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml
index 6959df2..5f8f767 100644
--- a/archetypes/jersey-quickstart-grizzly2/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
index 053b38c..42416bb 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
@@ -50,11 +50,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
<plugin>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
index a97cf63..ac7875a 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
@@ -13,7 +13,7 @@
*/
public class Main {
// Base URI the Grizzly HTTP server will listen on
- public static final String BASE_URI = "http://localhost:8080/myapp/";
+ public static final String BASE_URI = "http://localhost:8080/";
/**
* Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.
@@ -36,8 +36,8 @@
*/
public static void main(String[] args) throws IOException {
final HttpServer server = startServer();
- System.out.println(String.format("Jersey app started with WADL available at "
- + "%sapplication.wadl\nHit enter to stop it...", BASE_URI));
+ System.out.println(String.format("Jersey app started with endpoints available at "
+ + "%s%nHit Ctrl-C to stop it...", BASE_URI));
System.in.read();
server.stop();
}
diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml
index 532060b..94c9f2a 100644
--- a/archetypes/jersey-quickstart-webapp/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
index 49c9e7d..bddb095 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
@@ -15,11 +15,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
</plugins>
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index 8b3cb1e..bc619fe 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/bom/pom.xml b/bom/pom.xml
index b7cf518..78dbebd 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
@@ -387,7 +387,7 @@
<plugin>
<groupId>org.glassfish.copyright</groupId>
<artifactId>glassfish-copyright-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.4</version>
<inherited>true</inherited>
</plugin>
<plugin>
diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index 18bcf3f..09982bd 100644
--- a/bundles/jaxrs-ri/pom.xml
+++ b/bundles/jaxrs-ri/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
@@ -387,14 +387,14 @@
<id>xcopy</id>
<phase>package</phase>
<configuration>
- <tasks>
+ <target>
<jar destfile="${project.build.directory}/${project.artifactId}.jar" update="true">
<zipfileset dir="../.." includes="NOTICE.md" prefix="META-INF" />
</jar>
<jar destfile="${project.build.directory}/${project.artifactId}-sources.jar" update="true">
<zipfileset dir="../.." includes="NOTICE.md" prefix="META-INF" />
</jar>
- </tasks>
+ </target>
</configuration>
<goals>
<goal>run</goal>
diff --git a/bundles/pom.xml b/bundles/pom.xml
index a05809b..2e01ca3 100644
--- a/bundles/pom.xml
+++ b/bundles/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/connectors/apache-connector/pom.xml b/connectors/apache-connector/pom.xml
index 3a741a3..5f7b8bf 100644
--- a/connectors/apache-connector/pom.xml
+++ b/connectors/apache-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml
index 2621b2d..670e715 100644
--- a/connectors/grizzly-connector/pom.xml
+++ b/connectors/grizzly-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java b/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
index 7547cd9..b061ef5 100644
--- a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
+++ b/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientContract.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 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
diff --git a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java b/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
index 681165d..dc43fb3 100644
--- a/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
+++ b/connectors/jetty-connector/src/main/java11/org/glassfish/jersey/jetty/connector/JettyHttpClientSupplier.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
diff --git a/connectors/jetty-connector/src/test/java/org/glassfish/jersey/jetty/connector/ProxyTest.java b/connectors/jetty-connector/src/test/java/org/glassfish/jersey/jetty/connector/ProxyTest.java
index 3805260..baebc78 100644
--- a/connectors/jetty-connector/src/test/java/org/glassfish/jersey/jetty/connector/ProxyTest.java
+++ b/connectors/jetty-connector/src/test/java/org/glassfish/jersey/jetty/connector/ProxyTest.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Banco do Brasil S/A. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -12,9 +13,8 @@
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
- * Contributors:
- * Marcelo Rubim
*/
+
package org.glassfish.jersey.jetty.connector;
import org.eclipse.jetty.server.Request;
diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml
index e24e77b..aa1fccf 100644
--- a/connectors/netty-connector/pom.xml
+++ b/connectors/netty-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 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
diff --git a/connectors/pom.xml b/connectors/pom.xml
index 325bf7c..332ec68 100644
--- a/connectors/pom.xml
+++ b/connectors/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/containers/glassfish/jersey-gf-ejb/src/main/java/org/glassfish/jersey/gf/ejb/internal/EjbComponentProvider.java b/containers/glassfish/jersey-gf-ejb/src/main/java/org/glassfish/jersey/gf/ejb/internal/EjbComponentProvider.java
index b37fce0..6e7ffbd 100644
--- a/containers/glassfish/jersey-gf-ejb/src/main/java/org/glassfish/jersey/gf/ejb/internal/EjbComponentProvider.java
+++ b/containers/glassfish/jersey-gf-ejb/src/main/java/org/glassfish/jersey/gf/ejb/internal/EjbComponentProvider.java
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) [2018-2019] [Payara Foundation and/or its affiliates].
+ * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019 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
@@ -14,6 +14,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
+
package org.glassfish.jersey.gf.ejb.internal;
import java.io.Externalizable;
diff --git a/containers/glassfish/pom.xml b/containers/glassfish/pom.xml
index c8e6229..031e637 100644
--- a/containers/glassfish/pom.xml
+++ b/containers/glassfish/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/containers/grizzly2-servlet/src/main/java/org/glassfish/jersey/grizzly2/servlet/GrizzlyWebContainerFactory.java b/containers/grizzly2-servlet/src/main/java/org/glassfish/jersey/grizzly2/servlet/GrizzlyWebContainerFactory.java
index a77a385..a70ee7f 100644
--- a/containers/grizzly2-servlet/src/main/java/org/glassfish/jersey/grizzly2/servlet/GrizzlyWebContainerFactory.java
+++ b/containers/grizzly2-servlet/src/main/java/org/glassfish/jersey/grizzly2/servlet/GrizzlyWebContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
diff --git a/containers/jersey-servlet-core/pom.xml b/containers/jersey-servlet-core/pom.xml
index 1ca2448..1e69b90 100644
--- a/containers/jersey-servlet-core/pom.xml
+++ b/containers/jersey-servlet-core/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletPropertiesDelegate.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletPropertiesDelegate.java
index 3aa2b55..cf7d37b 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletPropertiesDelegate.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletPropertiesDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebAppResourcesScanner.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebAppResourcesScanner.java
index ded3acc..e6879d0 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebAppResourcesScanner.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebAppResourcesScanner.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebConfig.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebConfig.java
index d5d7c3d..4adf236 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebConfig.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebFilterConfig.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebFilterConfig.java
index 9c3112c..f7bff86 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebFilterConfig.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebFilterConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebServletConfig.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebServletConfig.java
index 0fb3c29..8196a56 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebServletConfig.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/WebServletConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/Utils.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/Utils.java
index 755bc85..c93863a 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/Utils.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/ExtendedServletContainerProvider.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/ExtendedServletContainerProvider.java
index 4318cc0..fa88815 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/ExtendedServletContainerProvider.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/ExtendedServletContainerProvider.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/RequestContextProvider.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/RequestContextProvider.java
index 12b6d32..778c5d7 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/RequestContextProvider.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/internal/spi/RequestContextProvider.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegate.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegate.java
index 1198b7b..5825375 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegate.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegateProvider.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegateProvider.java
index 3879f0b..0e58dfb 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegateProvider.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/AsyncContextDelegateProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
diff --git a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/FilterUrlMappingsProvider.java b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/FilterUrlMappingsProvider.java
index 521e272..d66129e 100644
--- a/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/FilterUrlMappingsProvider.java
+++ b/containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/spi/FilterUrlMappingsProvider.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/jersey-servlet/pom.xml b/containers/jersey-servlet/pom.xml
index d41ccc9..e174f41 100644
--- a/containers/jersey-servlet/pom.xml
+++ b/containers/jersey-servlet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
index 96e8168..efe248e 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/async/AsyncContextDelegateProviderImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
diff --git a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/FilterUrlMappingsProviderImpl.java b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/FilterUrlMappingsProviderImpl.java
index 5a15d5e..3449328 100644
--- a/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/FilterUrlMappingsProviderImpl.java
+++ b/containers/jersey-servlet/src/main/java/org/glassfish/jersey/servlet/init/FilterUrlMappingsProviderImpl.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/containers/netty-http/pom.xml b/containers/netty-http/pom.xml
index 277a50b..757d0f7 100644
--- a/containers/netty-http/pom.xml
+++ b/containers/netty-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 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
diff --git a/containers/pom.xml b/containers/pom.xml
index 69a17f3..c245bce 100644
--- a/containers/pom.xml
+++ b/containers/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/containers/simple-http/src/main/resources/org/glassfish/jersey/simple/internal/localization.properties b/containers/simple-http/src/main/resources/org/glassfish/jersey/simple/internal/localization.properties
index 138fa5b..483f9f0 100644
--- a/containers/simple-http/src/main/resources/org/glassfish/jersey/simple/internal/localization.properties
+++ b/containers/simple-http/src/main/resources/org/glassfish/jersey/simple/internal/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -14,6 +14,8 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
+
+
error.when.creating.server=IOException thrown when trying to create simple server.
uri.cannot.be.null=The URI must not be null.
wrong.scheme.when.using.http=The URI scheme should be 'http' when not using SSL.
diff --git a/core-client/pom.xml b/core-client/pom.xml
index d533799..887b305 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientBootstrapBag.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientBootstrapBag.java
index 81dad1a..150ab87 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientBootstrapBag.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientBootstrapBag.java
@@ -1,6 +1,6 @@
/*
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
- * Copyright (c) 2019, 2020 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
@@ -19,6 +19,11 @@
import org.glassfish.jersey.internal.BootstrapBag;
import org.glassfish.jersey.client.inject.ParameterUpdaterProvider;
+import org.glassfish.jersey.internal.util.collection.LazyValue;
+import org.glassfish.jersey.spi.ComponentProvider;
+
+import jakarta.ws.rs.core.GenericType;
+import java.util.Collection;
/**
* {@inheritDoc}
@@ -30,6 +35,7 @@
public class ClientBootstrapBag extends BootstrapBag {
private ParameterUpdaterProvider parameterUpdaterProvider;
+ private LazyValue<Collection<ComponentProvider>> componentProviders;
public ParameterUpdaterProvider getParameterUpdaterProvider() {
requireNonNull(parameterUpdaterProvider, ParameterUpdaterProvider.class);
@@ -39,4 +45,23 @@
public void setParameterUpdaterProvider(ParameterUpdaterProvider provider) {
this.parameterUpdaterProvider = provider;
}
+
+ /**
+ * Gets a lazy initialized collection of {@link ComponentProvider}s.
+ *
+ * @return A lazy initialized collection of {@code ComponentProvider}s.
+ */
+ LazyValue<Collection<ComponentProvider>> getComponentProviders() {
+ requireNonNull(componentProviders, new GenericType<LazyValue<Collection<ComponentProvider>>>() {}.getType());
+ return componentProviders;
+ }
+
+ /**
+ * Sets a lazy initialized collection of {@link ComponentProvider}s.
+ *
+ * @param componentProviders A lazy initialized collection of {@code ComponentProvider}s.
+ */
+ void setComponentProviders(LazyValue<Collection<ComponentProvider>> componentProviders) {
+ this.componentProviders = componentProviders;
+ }
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientComponentConfigurator.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientComponentConfigurator.java
new file mode 100644
index 0000000..943acc8
--- /dev/null
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientComponentConfigurator.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 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
+ * 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.client;
+
+import org.glassfish.jersey.internal.BootstrapBag;
+import org.glassfish.jersey.internal.BootstrapConfigurator;
+import org.glassfish.jersey.internal.ServiceConfigurationError;
+import org.glassfish.jersey.internal.ServiceFinder;
+import org.glassfish.jersey.internal.inject.InjectionManager;
+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.glassfish.jersey.model.internal.RankedComparator;
+import org.glassfish.jersey.model.internal.RankedProvider;
+import org.glassfish.jersey.spi.ComponentProvider;
+
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+
+class ClientComponentConfigurator implements BootstrapConfigurator {
+ private static final Comparator<RankedProvider<ComponentProvider>> RANKED_COMPARATOR =
+ new RankedComparator<>(RankedComparator.Order.DESCENDING);
+
+ @Override
+ public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) {
+ // There are situation in which ComponentProviders are not needed therefore their entire initialization is wrapped
+ // into a lazy block.
+ LazyValue<Collection<ComponentProvider>> componentProviders =
+ Values.lazy((Value<Collection<ComponentProvider>>) () -> getRankedComponentProviders().stream()
+ .map(RankedProvider::getProvider)
+ .peek(provider -> provider.initialize(injectionManager))
+ .collect(Collectors.toList()));
+ ((ClientBootstrapBag) bootstrapBag).setComponentProviders(componentProviders);
+ }
+
+ @Override
+ public void postInit(InjectionManager injectionManager, BootstrapBag bootstrapBag) {
+ ((ClientBootstrapBag) bootstrapBag).getComponentProviders().get().forEach(ComponentProvider::done);
+ }
+
+ private static Collection<RankedProvider<ComponentProvider>> getRankedComponentProviders() throws ServiceConfigurationError {
+ return StreamSupport.stream(ServiceFinder.find(ComponentProvider.class).spliterator(), false)
+ .map(RankedProvider::new)
+ .sorted(RANKED_COMPARATOR)
+ .collect(Collectors.toList());
+ }
+}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientConfig.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientConfig.java
index 40c99d4..92750fc 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientConfig.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientConfig.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.
* Copyright (c) 2018 Payara Foundation and/or its affiliates.
*
* This program and the accompanying materials are made available under the
@@ -59,6 +59,7 @@
import org.glassfish.jersey.model.internal.ManagedObjectsFinalizer;
import org.glassfish.jersey.process.internal.RequestScope;
import org.glassfish.jersey.internal.inject.ParamConverterConfigurator;
+import org.glassfish.jersey.spi.ComponentProvider;
/**
* Jersey externalized implementation of client-side JAX-RS {@link jakarta.ws.rs.core.Configurable
@@ -412,7 +413,7 @@
InjectionManager injectionManager = Injections.createInjectionManager();
injectionManager.register(new ClientBinder(runtimeCfgState.getProperties()));
- BootstrapBag bootstrapBag = new ClientBootstrapBag();
+ final ClientBootstrapBag bootstrapBag = new ClientBootstrapBag();
bootstrapBag.setManagedObjectsFinalizer(new ManagedObjectsFinalizer(injectionManager));
final ClientMessageBodyFactory.MessageBodyWorkersConfigurator messageBodyWorkersConfigurator =
@@ -427,7 +428,8 @@
messageBodyWorkersConfigurator,
new ExceptionMapperFactory.ExceptionMappersConfigurator(),
new JaxrsProviders.ProvidersConfigurator(),
- new AutoDiscoverableConfigurator(RuntimeType.CLIENT));
+ new AutoDiscoverableConfigurator(RuntimeType.CLIENT),
+ new ClientComponentConfigurator());
bootstrapConfigurators.forEach(configurator -> configurator.init(injectionManager, bootstrapBag));
// AutoDiscoverable.
@@ -442,7 +444,10 @@
runtimeCfgState.configureMetaProviders(injectionManager, bootstrapBag.getManagedObjectsFinalizer());
// Bind providers.
- ProviderBinder.bindProviders(runtimeCfgState.getComponentBag(), RuntimeType.CLIENT, null, injectionManager);
+ final Collection<ComponentProvider> componentProviders = bootstrapBag.getComponentProviders().get();
+ ProviderBinder.bindProviders(
+ runtimeCfgState.getComponentBag(), RuntimeType.CLIENT, null, injectionManager, componentProviders
+ );
ClientExecutorProvidersConfigurator executorProvidersConfigurator =
new ClientExecutorProvidersConfigurator(runtimeCfgState.getComponentBag(),
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientExecutorProvidersConfigurator.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientExecutorProvidersConfigurator.java
index 220f4f7..df26b22 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientExecutorProvidersConfigurator.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientExecutorProvidersConfigurator.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
@@ -65,7 +65,6 @@
@Override
public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) {
Map<String, Object> runtimeProperties = bootstrapBag.getConfiguration().getProperties();
- ManagedObjectsFinalizer finalizer = bootstrapBag.getManagedObjectsFinalizer();
ExecutorServiceProvider defaultAsyncExecutorProvider;
ScheduledExecutorServiceProvider defaultScheduledExecutorProvider;
@@ -110,7 +109,6 @@
.to(ExecutorServiceProvider.class);
injectionManager.register(executorBinding);
- finalizer.registerForPreDestroyCall(defaultAsyncExecutorProvider);
final ScheduledExecutorService clientScheduledExecutorService = client.getScheduledExecutorService() == null
// scheduled executor service set from {@link ClientConfig}.
@@ -134,9 +132,9 @@
.service(defaultScheduledExecutorProvider)
.to(ScheduledExecutorServiceProvider.class);
injectionManager.register(schedulerBinding);
- finalizer.registerForPreDestroyCall(defaultScheduledExecutorProvider);
- registerExecutors(injectionManager, componentBag, defaultAsyncExecutorProvider, defaultScheduledExecutorProvider);
+ registerExecutors(injectionManager, componentBag, defaultAsyncExecutorProvider,
+ defaultScheduledExecutorProvider, bootstrapBag.getManagedObjectsFinalizer());
}
private static ExecutorService lookupManagedExecutorService() {
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
index 4d17974..411100b 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.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
@@ -451,6 +451,18 @@
*/
public static final Long DEFAULT_EXPECT_100_CONTINUE_THRESHOLD_SIZE = 65536L;
+ /**
+ * The property defines the desired format of query parameters.
+ *
+ * <p>
+ * The value MUST be an instance of {@link org.glassfish.jersey.uri.JerseyQueryParamStyle}.
+ * </p>
+ * <p>
+ * If the property is not set, {@link org.glassfish.jersey.uri.JerseyQueryParamStyle#MULTI_PAIRS} is selected.
+ * </p>
+ */
+ public static final String QUERY_PARAM_STYLE = "jersey.config.client.uri.query.param.style";
+
private ClientProperties() {
// prevents instantiation
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientRequest.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientRequest.java
index 7ea9d26..f9539b0 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientRequest.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientRequest.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
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java b/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java
index 7e29f19..d7ff290 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/JerseyInvocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -19,6 +19,7 @@
import java.lang.reflect.Type;
import java.net.URI;
import java.util.HashMap;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.CancellationException;
@@ -61,10 +62,14 @@
import org.glassfish.jersey.client.internal.ClientResponseProcessingException;
import org.glassfish.jersey.client.internal.LocalizationMessages;
import org.glassfish.jersey.internal.MapPropertiesDelegate;
+import org.glassfish.jersey.internal.inject.Bindings;
+import org.glassfish.jersey.internal.inject.DisposableSupplier;
import org.glassfish.jersey.internal.inject.Providers;
+import org.glassfish.jersey.internal.inject.ServiceHolder;
import org.glassfish.jersey.internal.util.Producer;
import org.glassfish.jersey.internal.util.PropertiesHelper;
import org.glassfish.jersey.internal.util.ReflectionHelper;
+import org.glassfish.jersey.process.internal.ExecutorProviders;
import org.glassfish.jersey.process.internal.RequestScope;
import org.glassfish.jersey.spi.ExecutorServiceProvider;
@@ -474,7 +479,7 @@
if (configured == null) {
final ExecutorService provided = executorService();
if (provided != null) {
- request().getClientConfig().executorService(provided);
+ ((ClientConfig) request().getConfiguration()).executorService(provided);
}
}
return (T) new JerseyCompletionStageRxInvoker(this);
@@ -498,9 +503,36 @@
return result;
}
- return this.requestContext.getInjectionManager()
- .getInstance(ExecutorServiceProvider.class)
- .getExecutorService();
+ final List<ServiceHolder<ExecutorServiceProvider>> serviceHolders =
+ this.requestContext.getInjectionManager().getAllServiceHolders(ExecutorServiceProvider.class);
+
+ BestServiceHolder best = serviceHolders.stream()
+ .map(BestServiceHolder::new).sorted((a, b) -> a.isBetterThen(b) ? -1 : 1).findFirst().get();
+
+ return best.provider.getExecutorService();
+ }
+
+ /*
+ * Priority goes to: 1) user async
+ * 2) user nonasync
+ * 3) default async
+ */
+ private static final class BestServiceHolder {
+ private final ExecutorServiceProvider provider;
+ private final int value;
+
+ private BestServiceHolder(ServiceHolder<ExecutorServiceProvider> holder) {
+ provider = holder.getInstance();
+ boolean isDefault = DefaultClientAsyncExecutorProvider.class.equals(holder.getImplementationClass())
+ || ClientExecutorProvidersConfigurator.ClientExecutorServiceProvider.class
+ .equals(holder.getImplementationClass());
+ boolean isAsync = holder.getImplementationClass().getAnnotation(ClientAsyncExecutor.class) != null;
+ value = 10 * (isDefault ? 0 : 1) + (isAsync ? 1 : 0);
+ }
+
+ public boolean isBetterThen(BestServiceHolder other) {
+ return this.value > other.value;
+ }
}
/**
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/JerseyWebTarget.java b/core-client/src/main/java/org/glassfish/jersey/client/JerseyWebTarget.java
index 69b517d..0b1e48b 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/JerseyWebTarget.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/JerseyWebTarget.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
@@ -26,6 +26,8 @@
import jakarta.ws.rs.core.UriBuilder;
import org.glassfish.jersey.internal.guava.Preconditions;
+import org.glassfish.jersey.uri.JerseyQueryParamStyle;
+import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
/**
* Jersey implementation of {@link jakarta.ws.rs.client.WebTarget JAX-RS client target}
@@ -146,7 +148,12 @@
@Override
public JerseyWebTarget queryParam(String name, Object... values) throws NullPointerException {
checkNotClosed();
- return new JerseyWebTarget(JerseyWebTarget.setQueryParam(getUriBuilder(), name, values), this);
+ UriBuilder uriBuilder = getUriBuilder();
+ Object queryParamProperty = this.getConfiguration().getProperty(ClientProperties.QUERY_PARAM_STYLE);
+ if (queryParamProperty instanceof JerseyQueryParamStyle && uriBuilder instanceof JerseyUriBuilder) {
+ ((JerseyUriBuilder) uriBuilder).setQueryParamStyle((JerseyQueryParamStyle) queryParamProperty);
+ }
+ return new JerseyWebTarget(JerseyWebTarget.setQueryParam(uriBuilder, name, values), this);
}
private static UriBuilder setQueryParam(UriBuilder uriBuilder, String name, Object[] values) {
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java b/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java
index a84c04e..4f3349d 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/core-client/src/test/java/org/glassfish/jersey/client/ClientRxTest.java b/core-client/src/test/java/org/glassfish/jersey/client/ClientRxTest.java
index c2ab1f2..8efd74c 100644
--- a/core-client/src/test/java/org/glassfish/jersey/client/ClientRxTest.java
+++ b/core-client/src/test/java/org/glassfish/jersey/client/ClientRxTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 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
@@ -16,9 +16,16 @@
package org.glassfish.jersey.client;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import jakarta.ws.rs.client.Client;
@@ -29,10 +36,12 @@
import jakarta.ws.rs.client.RxInvokerProvider;
import jakarta.ws.rs.client.SyncInvoker;
import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.Provider;
+import org.glassfish.jersey.client.spi.Connector;
import org.glassfish.jersey.internal.guava.ThreadFactoryBuilder;
import org.glassfish.jersey.spi.ExecutorServiceProvider;
@@ -54,8 +63,9 @@
*/
public class ClientRxTest {
- private static final ExecutorService EXECUTOR_SERVICE =
- Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("rxTest-%d").build());
+ private static final ExecutorService EXECUTOR_SERVICE = new ClientRxExecutorServiceWrapper(
+ Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("rxTest-%d").build())
+ );
private final Client CLIENT;
private final Client CLIENT_WITH_EXECUTOR;
@@ -160,6 +170,35 @@
request.rx(TestRxInvoker.class).get();
}
+ @Test
+ public void testConnectorIsReusedWhenRx() throws ExecutionException, InterruptedException {
+ final AtomicInteger atomicInteger = new AtomicInteger(0);
+ HttpUrlConnectorProvider provider = new HttpUrlConnectorProvider() {
+ @Override
+ public Connector getConnector(Client client, Configuration config) {
+ atomicInteger.incrementAndGet();
+ return super.getConnector(client, config);
+ }
+ };
+
+ ClientConfig clientConfig = new ClientConfig();
+ clientConfig.connectorProvider(provider);
+
+ ClientRequestFilter abortFilter = (f) -> { f.abortWith(Response.ok().build()); };
+ Client client = ClientBuilder.newClient(clientConfig).register(abortFilter);
+
+ AtomicReference<String> threadName = new AtomicReference<>();
+ for (int cnt = 0; cnt != 5; cnt++) {
+ try (Response r = target(client)
+ .request().rx().get().toCompletableFuture().get()) {
+
+ assertEquals(200, r.getStatus());
+ assertEquals(1, atomicInteger.get());
+ }
+ }
+
+ }
+
private WebTarget target(Client client) {
// Uri is not relevant, the call won't be ever executed.
return client.target("http://localhost:9999");
@@ -207,4 +246,141 @@
//@After
}
}
+
+ // -----------------------------------------------------------------------------------------------------
+
+ @Test
+ public void testRxInvokerWithPriorityExecutorServiceProvider() {
+ AtomicReference<String> threadName = new AtomicReference<>();
+ String s = target(CLIENT)
+ .register(PriorityTestRxInvokerProvider.class)
+ .register(TestExecutorServiceProvider.class)
+ .register(PriorityTestExecutorServiceProvider.class)
+ .request().rx(PriorityTestRxInvoker.class).get();
+
+ assertTrue("Provided RxInvoker was not used.", s.startsWith("PriorityTestRxInvoker"));
+ assertTrue("@ClientAsyncExecutor Executor Service was not passed to RxInvoker", s.contains("TRUE"));
+ }
+
+ @ClientAsyncExecutor
+ private static class PriorityTestExecutorServiceProvider extends TestExecutorServiceProvider {
+ @Override
+ public ExecutorService getExecutorService() {
+ return new ClientRxExecutorServiceWrapper(EXECUTOR_SERVICE) {
+ //new class
+ };
+ }
+ }
+
+ @Provider
+ public static class PriorityTestRxInvokerProvider implements RxInvokerProvider<PriorityTestRxInvoker> {
+ @Override
+ public PriorityTestRxInvoker getRxInvoker(SyncInvoker syncInvoker, ExecutorService executorService) {
+ return new PriorityTestRxInvoker(syncInvoker, executorService);
+ }
+
+ @Override
+ public boolean isProviderFor(Class<?> clazz) {
+ return PriorityTestRxInvoker.class.equals(clazz);
+ }
+ }
+
+ private static class PriorityTestRxInvoker extends AbstractRxInvoker<String> {
+
+ private PriorityTestRxInvoker(SyncInvoker syncInvoker, ExecutorService executor) {
+ super(syncInvoker, executor);
+ }
+
+ @Override
+ public <R> String method(String name, Entity<?> entity, Class<R> responseType) {
+ return "PriorityTestRxInvoker " + (getExecutorService() != null
+ && !ClientRxExecutorServiceWrapper.class.equals(getExecutorService().getClass())
+ && ClientRxExecutorServiceWrapper.class.isInstance(getExecutorService()) ? "TRUE" : "FALSE");
+ }
+
+ @Override
+ public <R> String method(String name, Entity<?> entity, GenericType<R> responseType) {
+ return method(null, null, (Class<?>) null);
+ }
+ }
+
+ // -----------------------------------------------------------------------------------------------------
+
+ /**
+ * Wrap the executor service to distinguish the executor service obtained from the Injection Manager by class name
+ */
+ private static class ClientRxExecutorServiceWrapper implements ExecutorService {
+ private final ExecutorService executorService;
+
+ private ClientRxExecutorServiceWrapper(ExecutorService executorService) {
+ this.executorService = executorService;
+ }
+
+ @Override
+ public void shutdown() {
+ executorService.shutdown();
+ }
+
+ @Override
+ public List<Runnable> shutdownNow() {
+ return executorService.shutdownNow();
+ }
+
+ @Override
+ public boolean isShutdown() {
+ return executorService.isShutdown();
+ }
+
+ @Override
+ public boolean isTerminated() {
+ return executorService.isTerminated();
+ }
+
+ @Override
+ public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
+ return executorService.awaitTermination(timeout, unit);
+ }
+
+ @Override
+ public <T> Future<T> submit(Callable<T> task) {
+ return executorService.submit(task);
+ }
+
+ @Override
+ public <T> Future<T> submit(Runnable task, T result) {
+ return executorService.submit(task, result);
+ }
+
+ @Override
+ public Future<?> submit(Runnable task) {
+ return executorService.submit(task);
+ }
+
+ @Override
+ public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException {
+ return executorService.invokeAll(tasks);
+ }
+
+ @Override
+ public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
+ throws InterruptedException {
+ return invokeAll(tasks, timeout, unit);
+ }
+
+ @Override
+ public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException {
+ return invokeAny(tasks);
+ }
+
+ @Override
+ public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
+ throws InterruptedException, ExecutionException, TimeoutException {
+ return invokeAny(tasks, timeout, unit);
+ }
+
+ @Override
+ public void execute(Runnable command) {
+ executorService.execute(command);
+ }
+ }
}
diff --git a/core-common/pom.xml b/core-common/pom.xml
index ca882f7..779d972 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/CommonProperties.java b/core-common/src/main/java/org/glassfish/jersey/CommonProperties.java
index 9f79bb6..a05f199 100644
--- a/core-common/src/main/java/org/glassfish/jersey/CommonProperties.java
+++ b/core-common/src/main/java/org/glassfish/jersey/CommonProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/AbstractRuntimeDelegate.java b/core-common/src/main/java/org/glassfish/jersey/internal/AbstractRuntimeDelegate.java
index ce3d958..aa439db 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/AbstractRuntimeDelegate.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/AbstractRuntimeDelegate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/PropertiesResolver.java b/core-common/src/main/java/org/glassfish/jersey/internal/PropertiesResolver.java
index c393031..0b8f8eb 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/PropertiesResolver.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/PropertiesResolver.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java
index 7409093..ab9eae5 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverterConfigurator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ProviderBinder.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ProviderBinder.java
index 36a6481..d672b11 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ProviderBinder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ProviderBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -34,6 +34,7 @@
import org.glassfish.jersey.model.ContractProvider;
import org.glassfish.jersey.model.internal.ComponentBag;
+import org.glassfish.jersey.spi.ComponentProvider;
/**
* Class used for registration of the custom providers into injection manager.
@@ -189,22 +190,41 @@
* @param injectionManager injection manager the binder will use to bind the providers into.
*/
public static void bindProviders(final ComponentBag componentBag, final InjectionManager injectionManager) {
- bindProviders(componentBag, null, Collections.emptySet(), injectionManager);
+ bindProviders(componentBag, null, null, injectionManager, null);
}
/**
* Bind all providers contained in {@code providerBag} (classes and instances) using injection manager. Configuration is
* also committed.
*
- * @param componentBag bag of provider classes and instances.
- * @param constrainedTo current runtime (client or server).
- * @param registeredClasses classes which are manually registered by the user (not found by the classpath scanning).
- * @param injectionManager injection manager the binder will use to bind the providers into.
+ * @param componentBag bag of provider classes and instances.
+ * @param constrainedTo current runtime (client or server).
+ * @param registeredClasses classes which are manually registered by the user (not found by the classpath scanning).
+ * @param injectionManager injection manager the binder will use to bind the providers into.
*/
+ @Deprecated // backward compatibility until JPMS
public static void bindProviders(ComponentBag componentBag,
RuntimeType constrainedTo,
Set<Class<?>> registeredClasses,
InjectionManager injectionManager) {
+ bindProviders(componentBag, constrainedTo, registeredClasses, injectionManager, null);
+ }
+
+ /**
+ * Bind all providers contained in {@code providerBag} (classes and instances) using injection manager. Configuration is
+ * also committed.
+ *
+ * @param componentBag bag of provider classes and instances.
+ * @param constrainedTo current runtime (client or server).
+ * @param registeredClasses classes which are manually registered by the user (not found by the classpath scanning).
+ * @param injectionManager injection manager the binder will use to bind the providers into.
+ * @param componentProviders available component providers capable of registering the classes
+ */
+ public static void bindProviders(ComponentBag componentBag,
+ RuntimeType constrainedTo,
+ Set<Class<?>> registeredClasses,
+ InjectionManager injectionManager,
+ Collection<ComponentProvider> componentProviders) {
Predicate<ContractProvider> filter = ComponentBag.EXCLUDE_EMPTY
.and(ComponentBag.excludeMetaProviders(injectionManager));
@@ -234,7 +254,9 @@
}
for (final Class<?> providerClass : classes) {
final ContractProvider model = componentBag.getModel(providerClass);
- binderToRegister.addAll(createProviderBinders(providerClass, model));
+ if (componentProviders == null || !bindWithComponentProvider(providerClass, model, componentProviders)) {
+ binderToRegister.addAll(createProviderBinders(providerClass, model));
+ }
}
// Bind provider instances except for pure meta-providers and providers with empty contract models (e.g. resources)
@@ -252,6 +274,16 @@
injectionManager.register(CompositeBinder.wrap(binderToRegister));
}
+ private static boolean bindWithComponentProvider(
+ Class<?> component, ContractProvider providerModel, Iterable<ComponentProvider> componentProviders) {
+ for (ComponentProvider provider : componentProviders) {
+ if (provider.bind(component, providerModel)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@SuppressWarnings("unchecked")
private static <T> Collection<Binder> createInstanceBinders(T instance) {
Function<Class, Binder> binderFunction = contract ->
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java b/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
index 4f7413c..b479d19 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/util/JerseyPublisher.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 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
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 0b7271c..59efc57 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, 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
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
index bf785f0..9e7f39c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/MessagingBinders.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
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/Utils.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/Utils.java
index c4f035e..dcae919 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/Utils.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/Utils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
@@ -18,6 +18,10 @@
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.concurrent.atomic.AtomicReference;
/**
* Utility class.
@@ -46,9 +50,23 @@
* @throws IOException if a file could not be created.
*/
public static File createTempFile() throws IOException {
- final File file = File.createTempFile("rep", "tmp");
- // Make sure the file is deleted when JVM is shutdown at last.
- file.deleteOnExit();
+ final AtomicReference<IOException> exceptionReference = new AtomicReference<>();
+ final File file = AccessController.doPrivileged(new PrivilegedAction<File>() {
+ public File run() {
+ File tempFile = null;
+ try {
+ tempFile = Files.createTempFile("rep", "tmp").toFile();
+ // Make sure the file is deleted when JVM is shutdown at last.
+ tempFile.deleteOnExit();
+ } catch (IOException e) {
+ exceptionReference.set(e);
+ }
+ return tempFile;
+ }
+ });
+ if (exceptionReference.get() != null) {
+ throw exceptionReference.get();
+ }
return file;
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/model/internal/ComponentBag.java b/core-common/src/main/java/org/glassfish/jersey/model/internal/ComponentBag.java
index af2bf66..08f321c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/model/internal/ComponentBag.java
+++ b/core-common/src/main/java/org/glassfish/jersey/model/internal/ComponentBag.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
diff --git a/core-common/src/main/java/org/glassfish/jersey/process/internal/AbstractExecutorProvidersConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/process/internal/AbstractExecutorProvidersConfigurator.java
index 7ad252e..2a9c8b4 100644
--- a/core-common/src/main/java/org/glassfish/jersey/process/internal/AbstractExecutorProvidersConfigurator.java
+++ b/core-common/src/main/java/org/glassfish/jersey/process/internal/AbstractExecutorProvidersConfigurator.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
@@ -24,6 +24,7 @@
import org.glassfish.jersey.internal.BootstrapConfigurator;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.model.internal.ComponentBag;
+import org.glassfish.jersey.model.internal.ManagedObjectsFinalizer;
import org.glassfish.jersey.spi.ExecutorServiceProvider;
import org.glassfish.jersey.spi.ScheduledExecutorServiceProvider;
@@ -49,12 +50,14 @@
* @param componentBag provides executor service providers registered by an application.
* @param defaultAsyncExecutorProvider default implementation of {@link ExecutorServiceProvider}.
* @param defaultScheduledExecutorProvider default implementation of {@link ScheduledExecutorServiceProvider}.
+ * @param finalizer register finalizers.
*/
protected void registerExecutors(
InjectionManager injectionManager,
ComponentBag componentBag,
ExecutorServiceProvider defaultAsyncExecutorProvider,
- ScheduledExecutorServiceProvider defaultScheduledExecutorProvider) {
+ ScheduledExecutorServiceProvider defaultScheduledExecutorProvider,
+ ManagedObjectsFinalizer finalizer) {
List<ExecutorServiceProvider> customExecutors =
Stream.concat(
@@ -64,6 +67,7 @@
.map(CAST_TO_EXECUTOR_PROVIDER)
.collect(Collectors.toList());
customExecutors.add(defaultAsyncExecutorProvider);
+ customExecutors.stream().forEach(e -> finalizer.registerForPreDestroyCall(e));
List<ScheduledExecutorServiceProvider> customScheduledExecutors =
Stream.concat(
@@ -73,6 +77,7 @@
.map(CAST_TO_SCHEDULED_EXECUTOR_PROVIDER)
.collect(Collectors.toList());
customScheduledExecutors.add(defaultScheduledExecutorProvider);
+ customScheduledExecutors.stream().forEach(e -> finalizer.registerForPreDestroyCall(e));
ExecutorProviders.registerExecutorBindings(injectionManager, customExecutors, customScheduledExecutors);
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/spi/ComponentProvider.java b/core-common/src/main/java/org/glassfish/jersey/spi/ComponentProvider.java
new file mode 100644
index 0000000..61d963a
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/spi/ComponentProvider.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 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
+ * 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.spi;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.glassfish.jersey.model.ContractProvider;
+
+/**
+ * Component provider interface to allow custom management of 3rd party
+ * components life-cycle and dependency injection.
+ * <p />
+ * An implementation (a component-provider) identifies itself by placing a provider-configuration
+ * file (if not already present), {@code org.glassfish.jersey.spi.ComponentProvider}
+ * in the resource directory <tt>META-INF/services</tt>, and adding the fully
+ * qualified service-provider-class of the implementation in the file.
+ *
+ * Jersey will not even try to inject component provider instances with Jersey artifacts.
+ * The SPI providers should be designed so that no dependency injection is needed at the bind time phase.
+
+ * @author Jakub Podlesak
+ */
+public interface ComponentProvider {
+
+
+ /**
+ * Initializes the component provider with a reference to a injection manager
+ * instance, which will get used in the application to manage individual components.
+ * Providers should keep a reference to the injection manager for later use.
+ * This method will be invoked prior to any bind method calls.
+ * The injection manager parameter will not be fully initialized at the time of invocation
+ * and should be used as a reference only.
+ *
+ * @param injectionManager an injection manager.
+ */
+ void initialize(final InjectionManager injectionManager);
+
+ /**
+ * Jersey will invoke this method before binding of each component class internally
+ * during initialization of it's injection manager.
+ *
+ * If the component provider wants to bind the component class
+ * itself, it must do so and return true. In that case, Jersey will not
+ * bind the component and rely on the component provider in this regard.
+ *
+ * @param component a component (resource/provider) class.
+ * @param providerContracts provider contracts implemented by given component.
+ * @return true if the component class has been bound by the provider, false otherwise
+ */
+ boolean bind(final Class<?> component, Set<Class<?>> providerContracts);
+
+ /**
+ * Jersey will invoke this method before binding of each component class internally
+ * during initialization of it's injection manager.
+ *
+ * If the component provider wants to bind the component class
+ * itself, it must do so and return true. In that case, Jersey will not
+ * bind the component and rely on the component provider in this regard.
+ *
+ * @param component a component (resource/provider) class.
+ * @param contractProvider optional registered {@link ContractProvider} of the component.
+ * @return true if the component class has been bound by the provider, false otherwise
+ */
+ default boolean bind(final Class<?> component, ContractProvider contractProvider) {
+ final Set<Class<?>> contracts = contractProvider == null ? Collections.emptySet() : contractProvider.getContracts();
+ return bind(component, contracts);
+ }
+
+ /**
+ * Jersey will invoke this method after all component classes have been bound.
+ *
+ * If the component provider wants to do some actions after it has seen all component classes
+ * registered with the application, this is the right place for the corresponding code.
+ */
+ void done();
+}
diff --git a/core-common/src/main/java/org/glassfish/jersey/uri/JerseyQueryParamStyle.java b/core-common/src/main/java/org/glassfish/jersey/uri/JerseyQueryParamStyle.java
new file mode 100644
index 0000000..aecb387
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/uri/JerseyQueryParamStyle.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 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
+ * 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.uri;
+
+/**
+ * JerseyQueryParamStyle is used to specify the desired format of query param
+ * when multiple values are sent for the same parameter.
+ */
+public enum JerseyQueryParamStyle {
+
+ /**
+ * Multiple parameter instances, e.g.:
+ * <code>foo=v1&foo=v2&foo=v3</code>
+ *
+ * This is the default query format.
+ */
+ MULTI_PAIRS,
+
+ /**
+ * A single parameter instance with multiple, comma-separated values, e.g.:
+ * <code>foo=v1,v2,v3</code>
+ */
+ COMMA_SEPARATED,
+
+ /**
+ * Multiple parameter instances with square brackets for each parameter, e.g.:
+ * <code>foo[]=v1&foo[]=v2&foo[]=v3</code>
+ */
+ ARRAY_PAIRS
+}
\ No newline at end of file
diff --git a/core-common/src/main/java/org/glassfish/jersey/uri/internal/JerseyUriBuilder.java b/core-common/src/main/java/org/glassfish/jersey/uri/internal/JerseyUriBuilder.java
index 88cb36c..eba649c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/uri/internal/JerseyUriBuilder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/uri/internal/JerseyUriBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -24,6 +24,9 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.MultivaluedMap;
@@ -34,6 +37,7 @@
import org.glassfish.jersey.internal.guava.InetAddresses;
import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.internal.util.collection.MultivaluedStringMap;
+import org.glassfish.jersey.uri.JerseyQueryParamStyle;
import org.glassfish.jersey.uri.UriComponent;
import org.glassfish.jersey.uri.UriTemplate;
@@ -68,6 +72,8 @@
private MultivaluedMap<String, String> queryParams;
+ private JerseyQueryParamStyle queryParamStyle;
+
private String fragment;
/**
@@ -76,6 +82,7 @@
public JerseyUriBuilder() {
path = new StringBuilder();
query = new StringBuilder();
+ queryParamStyle = JerseyQueryParamStyle.MULTI_PAIRS;
}
private JerseyUriBuilder(final JerseyUriBuilder that) {
@@ -90,6 +97,7 @@
this.query = new StringBuilder(that.query);
this.queryParams = that.queryParams == null ? null : new MultivaluedStringMap(that.queryParams);
this.fragment = that.fragment;
+ this.queryParamStyle = that.queryParamStyle;
}
@SuppressWarnings("CloneDoesntCallSuperClone")
@@ -536,28 +544,99 @@
}
name = encode(name, UriComponent.Type.QUERY_PARAM);
+
+ List<String> stringsValues = Stream.of(values)
+ .map(this::convertToString)
+ .map(value -> encode(value, UriComponent.Type.QUERY_PARAM))
+ .collect(Collectors.toList());
+
+ switch (queryParamStyle) {
+ case ARRAY_PAIRS:
+ clientQueryParamArrayPairs(name, stringsValues);
+ break;
+ case COMMA_SEPARATED:
+ clientQueryParamCommaSeparated(name, stringsValues);
+ break;
+ default:
+ clientQueryParamMultiPairs(name, stringsValues);
+ }
+ return this;
+ }
+
+ private String convertToString(Object value) {
+ if (value == null) {
+ throw new IllegalArgumentException(LocalizationMessages.QUERY_PARAM_NULL());
+ }
+ return value.toString();
+ }
+
+ /**
+ * Multiple parameter instances, e.g foo=v1&foot=v2&foo=v3 This is
+ * the default if no style is configured.
+ *
+ * @param name
+ * @param values
+ * @throws IllegalArgumentException
+ */
+ private void clientQueryParamMultiPairs(String name, List<String> values) {
if (queryParams == null) {
- for (final Object value : values) {
+ for (final String value : values) {
if (query.length() > 0) {
query.append('&');
}
- query.append(name);
-
- if (value == null) {
- throw new IllegalArgumentException(LocalizationMessages.QUERY_PARAM_NULL());
- }
-
- query.append('=').append(encode(value.toString(), UriComponent.Type.QUERY_PARAM));
+ query.append(name).append('=').append(value);
}
} else {
- for (final Object value : values) {
- if (value == null) {
- throw new IllegalArgumentException(LocalizationMessages.QUERY_PARAM_NULL());
- }
-
- queryParams.add(name, encode(value.toString(), UriComponent.Type.QUERY_PARAM));
+ for (final String value : values) {
+ queryParams.add(name, value);
}
}
+ }
+
+ /**
+ * A single parameter instance with multiple, comma-separated values, e.g
+ * key=value1,value2,value3.
+ *
+ * @param name
+ * @param values
+ * @throws IllegalArgumentException
+ */
+ private void clientQueryParamCommaSeparated(String name, List<String> values) throws IllegalArgumentException {
+ if (queryParams == null) {
+ if (query.length() > 0) {
+ query.append('&');
+ }
+ query.append(name).append('=').append(String.join(",", values));
+ } else {
+ queryParams.add(name, String.join(",", values));
+ }
+ }
+
+ /**
+ * Multiple parameter instances with square brackets for each parameter, e.g
+ * key[]=value1&key[]=value2&key[]=value3.
+ *
+ * @param name
+ * @param values
+ * @throws IllegalArgumentException
+ */
+ private void clientQueryParamArrayPairs(String name, List<String> values) throws IllegalArgumentException {
+ if (queryParams == null) {
+ for (final String value : values) {
+ if (query.length() > 0) {
+ query.append('&');
+ }
+ query.append(name).append("[]").append('=').append(value);
+ }
+ } else {
+ for (final String value : values) {
+ queryParams.add(name + "[]", value);
+ }
+ }
+ }
+
+ public JerseyUriBuilder setQueryParamStyle(JerseyQueryParamStyle queryParamStyle) {
+ this.queryParamStyle = Objects.requireNonNull(queryParamStyle);
return this;
}
@@ -668,7 +747,7 @@
path.append(newPath);
final String newQuery = UriTemplate.resolveTemplateValues(UriComponent.Type.QUERY_PARAM, query.toString(), encode,
- templateValues);
+ templateValues);
query.setLength(0);
query.append(newQuery);
@@ -715,7 +794,7 @@
encodeMatrix();
segments = encode(segments,
- (isSegment) ? UriComponent.Type.PATH_SEGMENT : UriComponent.Type.PATH);
+ (isSegment) ? UriComponent.Type.PATH_SEGMENT : UriComponent.Type.PATH);
final boolean pathEndsInSlash = path.length() > 0 && path.charAt(path.length() - 1) == '/';
final boolean segmentStartsWithSlash = segments.charAt(0) == '/';
@@ -886,6 +965,9 @@
encodeMatrix();
encodeQuery();
+ if (queryParamStyle == JerseyQueryParamStyle.COMMA_SEPARATED) {
+ groupQueryParams();
+ }
final String uri = UriTemplate.createURI(
scheme, authority,
@@ -894,6 +976,12 @@
return createURI(uri);
}
+ private void groupQueryParams() {
+ MultivaluedMap<String, String> queryParams = UriComponent.decodeQuery(query.toString(), false, false);
+ query.setLength(0);
+ queryParams.forEach(this::clientQueryParamCommaSeparated);
+ }
+
private String create() {
return UriComponent.encodeTemplateNames(toTemplate());
}
diff --git a/core-common/src/main/jsr166/org/glassfish/jersey/internal/jsr166/package-info.java b/core-common/src/main/jsr166/org/glassfish/jersey/internal/jsr166/package-info.java
index a40f2e5..1600d33 100644
--- a/core-common/src/main/jsr166/org/glassfish/jersey/internal/jsr166/package-info.java
+++ b/core-common/src/main/jsr166/org/glassfish/jersey/internal/jsr166/package-info.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
diff --git a/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionCompareTest.java b/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionCompareTest.java
index 62c1021..423ab0a 100644
--- a/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionCompareTest.java
+++ b/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionCompareTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2020, 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
+ * 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.internal.util;
import static org.junit.Assert.assertEquals;
diff --git a/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionParseTest.java b/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionParseTest.java
index fc14fbb..b0e8c4d 100644
--- a/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionParseTest.java
+++ b/core-common/src/test/java/org/glassfish/jersey/internal/util/JdkVersionParseTest.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2020, 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
+ * 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.internal.util;
import static org.junit.Assert.assertEquals;
diff --git a/core-common/src/test/java/org/glassfish/jersey/message/internal/UtilsTest.java b/core-common/src/test/java/org/glassfish/jersey/message/internal/UtilsTest.java
new file mode 100644
index 0000000..e6baf4c
--- /dev/null
+++ b/core-common/src/test/java/org/glassfish/jersey/message/internal/UtilsTest.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 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
+ * 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.message.internal;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class UtilsTest {
+
+ @Test
+ public void createTempFile() throws IOException {
+ final File file = Utils.createTempFile();
+ final OutputStream stream = new BufferedOutputStream(new FileOutputStream(file));
+
+ try {
+ final ByteArrayInputStream entityStream = new ByteArrayInputStream("Test stream byte input".getBytes());
+ ReaderWriter.writeTo(entityStream, stream);
+ } finally {
+ stream.close();
+ }
+ Assert.assertTrue(file.exists());
+ }
+
+}
diff --git a/core-common/src/test/resources/surefire.policy b/core-common/src/test/resources/surefire.policy
index 77fa02a..27602ae 100644
--- a/core-common/src/test/resources/surefire.policy
+++ b/core-common/src/test/resources/surefire.policy
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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 @@
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
permission java.lang.RuntimePermission "modifyThread";
permission java.util.PropertyPermission "*", "write";
+ permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc.*";
@@ -43,6 +44,7 @@
permission java.lang.RuntimePermission "modifyThread";
permission java.util.PropertyPermission "*", "read";
permission java.io.FilePermission "<<ALL FILES>>", "read";
+ permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete";
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc.*";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
diff --git a/core-server/pom.xml b/core-server/pom.xml
index 82a00fb..4a8d442 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ContainerRequest.java b/core-server/src/main/java/org/glassfish/jersey/server/ContainerRequest.java
index 5eacd9a..87e0564 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ContainerRequest.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ContainerRequest.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
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ResourceModelConfigurator.java b/core-server/src/main/java/org/glassfish/jersey/server/ResourceModelConfigurator.java
index 459d2bc..e6f5006 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ResourceModelConfigurator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ResourceModelConfigurator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 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
@@ -189,9 +189,8 @@
private boolean bindWithComponentProvider(
Class<?> component, ContractProvider providerModel, Iterable<ComponentProvider> componentProviders) {
- Set<Class<?>> contracts = providerModel == null ? Collections.emptySet() : providerModel.getContracts();
for (ComponentProvider provider : componentProviders) {
- if (provider.bind(component, contracts)) {
+ if (provider.bind(component, providerModel)) {
return true;
}
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerExecutorProvidersConfigurator.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerExecutorProvidersConfigurator.java
index 5a18a3e..77974f1 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ServerExecutorProvidersConfigurator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerExecutorProvidersConfigurator.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
@@ -41,7 +41,6 @@
ServerBootstrapBag serverBag = (ServerBootstrapBag) bootstrapBag;
ResourceConfig runtimeConfig = serverBag.getRuntimeConfig();
ComponentBag componentBag = runtimeConfig.getComponentBag();
- ManagedObjectsFinalizer finalizer = serverBag.getManagedObjectsFinalizer();
// TODO: Do we need to register DEFAULT Executor and ScheduledExecutor to InjectionManager?
ScheduledExecutorServiceProvider defaultScheduledExecutorProvider = new DefaultBackgroundSchedulerProvider();
@@ -50,16 +49,15 @@
.to(ScheduledExecutorServiceProvider.class)
.qualifiedBy(BackgroundSchedulerLiteral.INSTANCE);
injectionManager.register(schedulerBinding);
- finalizer.registerForPreDestroyCall(defaultScheduledExecutorProvider);
ExecutorServiceProvider defaultAsyncExecutorProvider = new DefaultManagedAsyncExecutorProvider();
InstanceBinding<ExecutorServiceProvider> executorBinding = Bindings
.service(defaultAsyncExecutorProvider)
.to(ExecutorServiceProvider.class);
injectionManager.register(executorBinding);
- finalizer.registerForPreDestroyCall(defaultAsyncExecutorProvider);
- registerExecutors(injectionManager, componentBag, defaultAsyncExecutorProvider, defaultScheduledExecutorProvider);
+ registerExecutors(injectionManager, componentBag, defaultAsyncExecutorProvider,
+ defaultScheduledExecutorProvider, serverBag.getManagedObjectsFinalizer());
}
/**
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java
index e61b928..6ff719d 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.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
@@ -741,6 +741,14 @@
public static final String UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE =
"jersey.config.server.unwrap.completion.stage.writer.enable";
+ /**
+ * JVM argument to define the value of
+ * {@link org.glassfish.jersey.server.internal.monitoring.core.ReservoirConstants#COLLISION_BUFFER_POWER}.
+ * Lower values reduce the memory footprint.
+ */
+ public static final String COLLISION_BUFFER_POWER_JVM_ARG =
+ "jersey.config.server.monitoring.collision.buffer.power";
+
private ServerProperties() {
// prevents instantiation
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamExtractorConfigurator.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamExtractorConfigurator.java
index 3abdcd3..ef540e2 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamExtractorConfigurator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/inject/ParamExtractorConfigurator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/monitoring/core/ReservoirConstants.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/monitoring/core/ReservoirConstants.java
index a161fdc..fe0a7ad 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/monitoring/core/ReservoirConstants.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/monitoring/core/ReservoirConstants.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2015, 2021 Oracle and/or its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,13 @@
package org.glassfish.jersey.server.internal.monitoring.core;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.glassfish.jersey.server.ServerProperties;
+
/**
* The constants that determine the behaviour of sliding windows and their trimmers.
*
@@ -23,21 +30,36 @@
*/
public final class ReservoirConstants {
+ private static final int DEFAULT_COLLISION_BUFFER_POWER = 8;
+
/**
* Allow for 2^that many duplicate ticks before throwing away measurements.
+ * This value is by default {@link DEFAULT_COLLISION_BUFFER_POWER}, but it can be configured
+ * with {@link COLLISION_BUFFER_POWER_JVM_ARG} JVM argument
*/
- public static final int COLLISION_BUFFER_POWER = 8;
+ public static final int COLLISION_BUFFER_POWER;
/**
* The size of the collision buffer derived from the collision buffer power.
*/
- public static final int COLLISION_BUFFER = 1 << COLLISION_BUFFER_POWER; // 256
+ public static final int COLLISION_BUFFER;
/**
* Only trim on updating once every N.
*/
public static final int TRIM_THRESHOLD = 256;
+ static {
+ PrivilegedAction<Integer> action = new PrivilegedAction<Integer>() {
+ @Override
+ public Integer run() {
+ return Integer.getInteger(ServerProperties.COLLISION_BUFFER_POWER_JVM_ARG, DEFAULT_COLLISION_BUFFER_POWER);
+ }
+ };
+ COLLISION_BUFFER_POWER = AccessController.doPrivileged(action);
+ COLLISION_BUFFER = 1 << COLLISION_BUFFER_POWER; // 256
+ }
+
private ReservoirConstants() {
throw new AssertionError("Instantiation not allowed.");
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java
index 6475780..b9a57b1 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/MethodSelectingRouter.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
@@ -361,6 +361,15 @@
}
mediaTypesFromWorkers = true;
}
+
+ // As a last resort add */* when no message providers are in effect
+ // i.e. if no entity arg in resource method for a reader not to throw 415
+ // and if void return type for a writer not to throw 406.
+ final boolean noEntityArgInResourceMethod = inputTypes && getEntityParam(invocableMethod) == null;
+ final boolean voidReturnType = !inputTypes && invocableMethod.getRawResponseType() == void.class;
+ if (noEntityArgInResourceMethod || voidReturnType) {
+ effectiveTypes.add(MediaType.WILDCARD_TYPE);
+ }
}
return mediaTypesFromWorkers;
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
index f8e6f16..4b5b882 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/spi/ComponentProvider.java b/core-server/src/main/java/org/glassfish/jersey/server/spi/ComponentProvider.java
index 05dcbe1..d09aa83 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/spi/ComponentProvider.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/spi/ComponentProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
@@ -16,10 +16,6 @@
package org.glassfish.jersey.server.spi;
-import java.util.Set;
-
-import org.glassfish.jersey.internal.inject.InjectionManager;
-
/**
* Component provider interface to allow custom management of 3rd party
* components life-cycle and dependency injection.
@@ -34,40 +30,6 @@
* @author Jakub Podlesak
*/
-public interface ComponentProvider {
+public interface ComponentProvider extends org.glassfish.jersey.spi.ComponentProvider {
-
- /**
- * Initializes the component provider with a reference to a injection manager
- * instance, which will get used in the application to manage individual components.
- * Providers should keep a reference to the injection manager for later use.
- * This method will be invoked prior to any bind method calls.
- * The injection manager parameter will not be fully initialized at the time of invocation
- * and should be used as a reference only.
- *
- * @param injectionManager an injection manager.
- */
- void initialize(final InjectionManager injectionManager);
-
- /**
- * Jersey will invoke this method before binding of each component class internally
- * during initialization of it's injection manager.
- *
- * If the component provider wants to bind the component class
- * itself, it must do so and return true. In that case, Jersey will not
- * bind the component and rely on the component provider in this regard.
- *
- * @param component a component (resource/provider) class.
- * @param providerContracts provider contracts implemented by given component.
- * @return true if the component class has been bound by the provider, false otherwise
- */
- boolean bind(final Class<?> component, Set<Class<?>> providerContracts);
-
- /**
- * Jersey will invoke this method after all component classes have been bound.
- *
- * If the component provider wants to do some actions after it has seen all component classes
- * registered with the application, this is the right place for the corresponding code.
- */
- void done();
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/wadl/WadlFeature.java b/core-server/src/main/java/org/glassfish/jersey/server/wadl/WadlFeature.java
index 9499c60..314d267 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/wadl/WadlFeature.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/wadl/WadlFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlApplicationContextImpl.java b/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlApplicationContextImpl.java
index fe11667..6caa901 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlApplicationContextImpl.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/wadl/internal/WadlApplicationContextImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java
index 7edb42b..f0d860a 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.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.
* Copyright (c) 2018 Payara Foundation and/or its affiliates.
*
* This program and the accompanying materials are made available under the
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/AbstractNanosReservoirTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/AbstractNanosReservoirTest.java
index 8feaf59..abdc102 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/AbstractNanosReservoirTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/AbstractNanosReservoirTest.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -16,11 +16,12 @@
package org.glassfish.jersey.server.internal.monitoring;
+import java.util.concurrent.TimeUnit;
+
+import org.glassfish.jersey.server.internal.monitoring.core.ReservoirConstants;
import org.glassfish.jersey.server.internal.monitoring.core.TimeReservoir;
import org.glassfish.jersey.server.internal.monitoring.core.UniformTimeSnapshot;
-import java.util.concurrent.TimeUnit;
-
import static org.junit.Assert.assertEquals;
/**
@@ -29,7 +30,7 @@
public class AbstractNanosReservoirTest {
protected static final double DELTA = 0.0001;
- protected static final int COLLISION_BUFFER = 256;
+ protected static final int COLLISION_BUFFER = ReservoirConstants.COLLISION_BUFFER;
protected void reservoirUpdateInNanos(TimeReservoir reservoir, long value, long time) {
reservoir.update(value, time, TimeUnit.NANOSECONDS);
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/TimeWindowStatisticsImplTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/TimeWindowStatisticsImplTest.java
index b6ca7c4..d92393e 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/TimeWindowStatisticsImplTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/monitoring/TimeWindowStatisticsImplTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
@@ -18,8 +18,12 @@
import java.util.concurrent.TimeUnit;
+import org.glassfish.jersey.server.ServerProperties;
+import org.glassfish.jersey.server.internal.monitoring.core.ReservoirConstants;
import org.glassfish.jersey.server.internal.monitoring.core.UniformTimeReservoir;
+import org.junit.BeforeClass;
import org.junit.Test;
+
import static org.junit.Assert.assertEquals;
/**
@@ -30,8 +34,21 @@
*/
public class TimeWindowStatisticsImplTest {
+ private static final int COLLISION_BUFFER_POWER = 3;
private static final double DELTA = 0.0001;
+ @BeforeClass
+ public static void beforeClass() {
+ System.setProperty(ServerProperties.COLLISION_BUFFER_POWER_JVM_ARG,
+ Integer.toString(COLLISION_BUFFER_POWER));
+ }
+
+ @Test
+ public void jvmLoaded() {
+ assertEquals(COLLISION_BUFFER_POWER, ReservoirConstants.COLLISION_BUFFER_POWER);
+ assertEquals(8, ReservoirConstants.COLLISION_BUFFER);
+ }
+
@Test
public void test() {
final long now = System.currentTimeMillis();
@@ -173,30 +190,30 @@
final TimeWindowStatisticsImpl.Builder<Long> builder = new TimeWindowStatisticsImpl.Builder<>(
new SlidingWindowTimeReservoir(1, TimeUnit.SECONDS, now, TimeUnit.MILLISECONDS));
// put multiple requests at the beginning so that even the COLLISION_BUFFER bounds is tested
- for (int i = 0; i < 256; ++i) {
+ for (int i = 0; i < ReservoirConstants.COLLISION_BUFFER; ++i) {
builder.addRequest(now, 10L);
}
// add one more request which should be visible at 'now + 1001'
builder.addRequest(now + 1, 10L);
// put multiple requests in the middle of the window
- for (int i = 0; i < 256; ++i) {
+ for (int i = 0; i < ReservoirConstants.COLLISION_BUFFER; ++i) {
builder.addRequest(now + 500, 10L);
}
- check(builder, now + 500, 256 * 2 + 1, 10, 10, 10, 256 * 2 * 2 + 1 * 2);
+ check(builder, now + 500, ReservoirConstants.COLLISION_BUFFER * 2 + 1, 10, 10, 10, ReservoirConstants.COLLISION_BUFFER * 2 * 2 + 1 * 2);
// put multiple requests at the end of the window
- for (int i = 0; i < 256; ++i) {
+ for (int i = 0; i < ReservoirConstants.COLLISION_BUFFER; ++i) {
builder.addRequest(now + 1000, 10L);
}
- check(builder, now + 1000, 256 * 3 + 1, 10, 10, 10, 256 * 3 + 1);
+ check(builder, now + 1000, ReservoirConstants.COLLISION_BUFFER * 3 + 1, 10, 10, 10, ReservoirConstants.COLLISION_BUFFER * 3 + 1);
// at 'now + 1001' all the requests from 'now' should be gone
- check(builder, now + 1001, 256 * 2 + 1, 10, 10, 10, 256 * 2 + 1);
+ check(builder, now + 1001, ReservoirConstants.COLLISION_BUFFER * 2 + 1, 10, 10, 10, ReservoirConstants.COLLISION_BUFFER * 2 + 1);
// at 'now + 1002' the one additional request we added is gone
- check(builder, now + 1002, 256 * 2, 10, 10, 10, 256 * 2);
+ check(builder, now + 1002, ReservoirConstants.COLLISION_BUFFER * 2, 10, 10, 10, ReservoirConstants.COLLISION_BUFFER * 2);
}
/**
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
index 352f5b3..2bad207 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/scanning/JarFileScannerTest.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
diff --git a/core-server/src/test/resources/server.policy b/core-server/src/test/resources/server.policy
index 9937a40..ad7e9fa 100644
--- a/core-server/src/test/resources/server.policy
+++ b/core-server/src/test/resources/server.policy
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -61,6 +61,9 @@
permission java.lang.RuntimePermission "accessClassInPackage.sun.reflect";
permission java.lang.RuntimePermission "accessClassInPackage.com.sun.xml.internal.bind.v2";
permission java.lang.RuntimePermission "reflectionFactoryAccess";
+
+ // Needed by TimeWindowStatisticsImplTest
+ permission java.util.PropertyPermission "jersey.config.server.monitoring.collision.buffer.power", "read,write";
};
grant codebase "file:${project.build.directory}/classes/-" {
diff --git a/etc/config/copyright-exclude b/etc/config/copyright-exclude
index e821711..987175b 100644
--- a/etc/config/copyright-exclude
+++ b/etc/config/copyright-exclude
@@ -24,6 +24,8 @@
.zip
.dat
.lua
+.md
+.markdown
travis.sh
.travis.yml
/docs/src/main/docbook/inc/modules_table_footer.src
@@ -69,6 +71,8 @@
/tests/e2e-entity/src/test/resources/org/glassfish/jersey/tests/e2e/entity/xxe.txt
/core-server/src/main/java/com/sun/research/ws/wadl
/core-common/src/main/java/org/glassfish/jersey/internal/jsr166
+/core-common/src/main/jsr166/org/glassfish/jersey/internal/jsr166
+/core-common/src/main/java8/org/glassfish/jersey/internal/jsr166
/tests/performance/etc/data/MEASUREMENT_DATA
/core-common/src/main/java/org/glassfish/jersey/internal/guava/
/core-server/src/main/java/org/glassfish/jersey/server/internal/monitoring/core/AbstractSlidingWindowTimeReservoir.java
@@ -85,3 +89,7 @@
NOTICE.md
/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessAllAnnotatedTypes.java
/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessJAXRSAnnotatedTypes.java
+/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/hibernate/
+/media/json-binding/src/test/java/org/glassfish/jersey/jsonb/internal/JsonBindingProviderTest.java
+/connectors/jdk-connector/src/test/resources
+/tools
diff --git a/etc/travis/travis.sh b/etc/travis/travis.sh
index 2362130..f2f7d9c 100644
--- a/etc/travis/travis.sh
+++ b/etc/travis/travis.sh
@@ -27,8 +27,8 @@
mvn -version
-if [ "$1" = "glassfish-copyright:copyright" ]; then
- mvn -B -V glassfish-copyright:copyright
+if [ "$1" = "glassfish-copyright:check" ]; then
+ mvn -e $1 -Dcopyright.quiet=false
else
mvn -e -U -B -V -Peclipse_repo,staging clean install $1 >> $BUILD_OUTPUT 2>&1
fi
diff --git a/examples/assemblies/pom.xml b/examples/assemblies/pom.xml
index 69c6c77..f021c2f 100644
--- a/examples/assemblies/pom.xml
+++ b/examples/assemblies/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/bookmark-em/pom.xml b/examples/bookmark-em/pom.xml
index fcc8dfc..3429c24 100644
--- a/examples/bookmark-em/pom.xml
+++ b/examples/bookmark-em/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/bookmark/pom.xml b/examples/bookmark/pom.xml
index 1e4575b..e10f436 100644
--- a/examples/bookmark/pom.xml
+++ b/examples/bookmark/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/bookstore-webapp/pom.xml b/examples/bookstore-webapp/pom.xml
index 7db2475..20f9774 100644
--- a/examples/bookstore-webapp/pom.xml
+++ b/examples/bookstore-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 Oracle and/or its affiliates. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -81,9 +81,6 @@
<webApp>
<contextPath>/bookstore-webapp</contextPath>
</webApp>
- <httpConnector>
- <port>8080</port>
- </httpConnector>
</configuration>
</plugin>
</plugins>
@@ -91,6 +88,19 @@
<profiles>
<profile>
+ <id>jdk11+</id>
+ <activation>
+ <jdk>[11,)</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-osgi</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
<!-- mvn test -Prun-external-tests -->
<id>run-external-tests</id>
<build>
diff --git a/examples/clipboard-programmatic/pom.xml b/examples/clipboard-programmatic/pom.xml
index 97e88e5..82fe029 100644
--- a/examples/clipboard-programmatic/pom.xml
+++ b/examples/clipboard-programmatic/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/clipboard/pom.xml b/examples/clipboard/pom.xml
index ffc5d74..695855f 100644
--- a/examples/clipboard/pom.xml
+++ b/examples/clipboard/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/declarative-linking/pom.xml b/examples/declarative-linking/pom.xml
index e3891d9..3fdd6ac 100644
--- a/examples/declarative-linking/pom.xml
+++ b/examples/declarative-linking/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/entity-filtering-security/pom.xml b/examples/entity-filtering-security/pom.xml
index 792a0de..98a441e 100644
--- a/examples/entity-filtering-security/pom.xml
+++ b/examples/entity-filtering-security/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/entity-filtering-selectable/pom.xml b/examples/entity-filtering-selectable/pom.xml
index 9446820..5039313 100644
--- a/examples/entity-filtering-selectable/pom.xml
+++ b/examples/entity-filtering-selectable/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/entity-filtering-selectable/src/main/java/org/glassfish/jersey/examples/entityfiltering/selectable/App.java b/examples/entity-filtering-selectable/src/main/java/org/glassfish/jersey/examples/entityfiltering/selectable/App.java
index e8df6e7..9b202ad 100644
--- a/examples/entity-filtering-selectable/src/main/java/org/glassfish/jersey/examples/entityfiltering/selectable/App.java
+++ b/examples/entity-filtering-selectable/src/main/java/org/glassfish/jersey/examples/entityfiltering/selectable/App.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2021 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
diff --git a/examples/entity-filtering/pom.xml b/examples/entity-filtering/pom.xml
index 692c149..5dd460f 100644
--- a/examples/entity-filtering/pom.xml
+++ b/examples/entity-filtering/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/exception-mapping/pom.xml b/examples/exception-mapping/pom.xml
index c37eb56..44af64e 100644
--- a/examples/exception-mapping/pom.xml
+++ b/examples/exception-mapping/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/freemarker-webapp/pom.xml b/examples/freemarker-webapp/pom.xml
index e1e99f9..b6826c2 100644
--- a/examples/freemarker-webapp/pom.xml
+++ b/examples/freemarker-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml
index c6c3e2d..5ead173 100644
--- a/examples/groovy/pom.xml
+++ b/examples/groovy/pom.xml
@@ -10,7 +10,6 @@
SPDX-License-Identifier: BSD-3-Clause
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
diff --git a/examples/helloworld-benchmark/pom.xml b/examples/helloworld-benchmark/pom.xml
index fd953d8..175c136 100644
--- a/examples/helloworld-benchmark/pom.xml
+++ b/examples/helloworld-benchmark/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2021 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
diff --git a/examples/helloworld-netty/pom.xml b/examples/helloworld-netty/pom.xml
index 67bb305..769fc84 100644
--- a/examples/helloworld-netty/pom.xml
+++ b/examples/helloworld-netty/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 2021 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
diff --git a/examples/helloworld-programmatic/pom.xml b/examples/helloworld-programmatic/pom.xml
index f4f1e46..a38e432 100644
--- a/examples/helloworld-programmatic/pom.xml
+++ b/examples/helloworld-programmatic/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/helloworld-pure-jax-rs/pom.xml b/examples/helloworld-pure-jax-rs/pom.xml
index f866897..8da97d8 100644
--- a/examples/helloworld-pure-jax-rs/pom.xml
+++ b/examples/helloworld-pure-jax-rs/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/helloworld-spring-webapp/pom.xml b/examples/helloworld-spring-webapp/pom.xml
index a643928..30920cf 100644
--- a/examples/helloworld-spring-webapp/pom.xml
+++ b/examples/helloworld-spring-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/helloworld-webapp/pom.xml b/examples/helloworld-webapp/pom.xml
index f3cb558..8895780 100644
--- a/examples/helloworld-webapp/pom.xml
+++ b/examples/helloworld-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/helloworld-weld/src/main/java/org/glassfish/jersey/examples/helloworld/RequestScopedBean.java b/examples/helloworld-weld/src/main/java/org/glassfish/jersey/examples/helloworld/RequestScopedBean.java
index 885e373..6b3ac26 100644
--- a/examples/helloworld-weld/src/main/java/org/glassfish/jersey/examples/helloworld/RequestScopedBean.java
+++ b/examples/helloworld-weld/src/main/java/org/glassfish/jersey/examples/helloworld/RequestScopedBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2021 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
diff --git a/examples/helloworld/pom.xml b/examples/helloworld/pom.xml
index 8685c17..2949168 100644
--- a/examples/helloworld/pom.xml
+++ b/examples/helloworld/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/http-trace/pom.xml b/examples/http-trace/pom.xml
index ca1ef16..1feb5d2 100644
--- a/examples/http-trace/pom.xml
+++ b/examples/http-trace/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/https-clientserver-grizzly/pom.xml b/examples/https-clientserver-grizzly/pom.xml
index a1b7432..9a68afc 100644
--- a/examples/https-clientserver-grizzly/pom.xml
+++ b/examples/https-clientserver-grizzly/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
@@ -82,6 +82,13 @@
<!-- https://bugs.openjdk.java.net/browse/JDK-8211426 -->
<surefire.security.argline>-Djdk.tls.server.protocols=TLSv1.2</surefire.security.argline>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-osgi</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
</profile>
<profile>
<id>pre-release</id>
diff --git a/examples/https-server-glassfish/pom.xml b/examples/https-server-glassfish/pom.xml
index 592b7be..b02b885 100644
--- a/examples/https-server-glassfish/pom.xml
+++ b/examples/https-server-glassfish/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/java8-webapp/pom.xml b/examples/java8-webapp/pom.xml
index 1863054..7513db6 100644
--- a/examples/java8-webapp/pom.xml
+++ b/examples/java8-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2021 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
diff --git a/examples/jaxb/pom.xml b/examples/jaxb/pom.xml
index 2867784..aae56c4 100644
--- a/examples/jaxb/pom.xml
+++ b/examples/jaxb/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
@@ -39,6 +39,15 @@
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ <version>4.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-jaxb</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-osgi</artifactId>
<scope>test</scope>
diff --git a/examples/jaxrs-types-injection/pom.xml b/examples/jaxrs-types-injection/pom.xml
index f97a43d..2a054a0 100644
--- a/examples/jaxrs-types-injection/pom.xml
+++ b/examples/jaxrs-types-injection/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/jersey-ejb/pom.xml b/examples/jersey-ejb/pom.xml
index 6709d09..d424f33 100644
--- a/examples/jersey-ejb/pom.xml
+++ b/examples/jersey-ejb/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/jersey-ejb/src/main/java/org/glassfish/jersey/examples/jersey_ejb/resources/MessageHolderSingletonBean.java b/examples/jersey-ejb/src/main/java/org/glassfish/jersey/examples/jersey_ejb/resources/MessageHolderSingletonBean.java
index 8b19689..4d15c95 100644
--- a/examples/jersey-ejb/src/main/java/org/glassfish/jersey/examples/jersey_ejb/resources/MessageHolderSingletonBean.java
+++ b/examples/jersey-ejb/src/main/java/org/glassfish/jersey/examples/jersey_ejb/resources/MessageHolderSingletonBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2021 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
diff --git a/examples/json-binding-webapp/pom.xml b/examples/json-binding-webapp/pom.xml
index 2100280..f08b361 100644
--- a/examples/json-binding-webapp/pom.xml
+++ b/examples/json-binding-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/json-binding-webapp/src/main/java/org/glassfish/jersey/examples/jsonb/Cat.java b/examples/json-binding-webapp/src/main/java/org/glassfish/jersey/examples/jsonb/Cat.java
index 3cb786f..d4a02e7 100644
--- a/examples/json-binding-webapp/src/main/java/org/glassfish/jersey/examples/jsonb/Cat.java
+++ b/examples/json-binding-webapp/src/main/java/org/glassfish/jersey/examples/jsonb/Cat.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019 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 Distribution License v. 1.0, which is available at
diff --git a/examples/json-jackson/pom.xml b/examples/json-jackson/pom.xml
index 116cffd..dc41e07 100644
--- a/examples/json-jackson/pom.xml
+++ b/examples/json-jackson/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/json-processing-webapp/pom.xml b/examples/json-processing-webapp/pom.xml
index b776732..e72b53d 100644
--- a/examples/json-processing-webapp/pom.xml
+++ b/examples/json-processing-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/MyApplication.java b/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/MyApplication.java
index b5a3a70..eb08883 100644
--- a/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/MyApplication.java
+++ b/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/MyApplication.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 Distribution License v. 1.0, which is available at
diff --git a/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/service/DocumentStorage.java b/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/service/DocumentStorage.java
index e7f6051..6839937 100644
--- a/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/service/DocumentStorage.java
+++ b/examples/json-processing-webapp/src/main/java/org/glassfish/jersey/examples/jsonp/service/DocumentStorage.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 Distribution License v. 1.0, which is available at
diff --git a/examples/json-with-padding/pom.xml b/examples/json-with-padding/pom.xml
index b88b383..0526192 100644
--- a/examples/json-with-padding/pom.xml
+++ b/examples/json-with-padding/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/managed-beans-webapp/pom.xml b/examples/managed-beans-webapp/pom.xml
index bb1033b..49901de 100644
--- a/examples/managed-beans-webapp/pom.xml
+++ b/examples/managed-beans-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/managed-beans-webapp/src/main/java/org/glassfish/jersey/examples/managedbeans/resources/Widget.java b/examples/managed-beans-webapp/src/main/java/org/glassfish/jersey/examples/managedbeans/resources/Widget.java
index 76ea177..c9ab1e0 100644
--- a/examples/managed-beans-webapp/src/main/java/org/glassfish/jersey/examples/managedbeans/resources/Widget.java
+++ b/examples/managed-beans-webapp/src/main/java/org/glassfish/jersey/examples/managedbeans/resources/Widget.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2021 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
diff --git a/examples/managed-client-simple-webapp/pom.xml b/examples/managed-client-simple-webapp/pom.xml
index 9fce72f..63baeb4 100644
--- a/examples/managed-client-simple-webapp/pom.xml
+++ b/examples/managed-client-simple-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/managed-client-webapp/pom.xml b/examples/managed-client-webapp/pom.xml
index ee1ad2c..b127c5b 100644
--- a/examples/managed-client-webapp/pom.xml
+++ b/examples/managed-client-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/managed-client/pom.xml b/examples/managed-client/pom.xml
index 28adbe5..5849c9c 100644
--- a/examples/managed-client/pom.xml
+++ b/examples/managed-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/multipart-webapp/pom.xml b/examples/multipart-webapp/pom.xml
index d6e0aaa..3126219 100644
--- a/examples/multipart-webapp/pom.xml
+++ b/examples/multipart-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/oauth-client-twitter/pom.xml b/examples/oauth-client-twitter/pom.xml
index e5995a7..ea853a0 100644
--- a/examples/oauth-client-twitter/pom.xml
+++ b/examples/oauth-client-twitter/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml
index d6e0644..41269fc 100644
--- a/examples/open-tracing/pom.xml
+++ b/examples/open-tracing/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/osgi-helloworld-webapp/additional-bundle/pom.xml b/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
index 53d3ccc..bdef44e 100644
--- a/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml b/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
index 816a667..9a01188 100644
--- a/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/osgi-helloworld-webapp/lib-bundle/pom.xml b/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
index 8943381..26a324c 100644
--- a/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/osgi-helloworld-webapp/pom.xml b/examples/osgi-helloworld-webapp/pom.xml
index 7586030..73a0ec2 100644
--- a/examples/osgi-helloworld-webapp/pom.xml
+++ b/examples/osgi-helloworld-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/osgi-http-service/pom.xml b/examples/osgi-http-service/pom.xml
index 5f02cc3..bd78d4f 100644
--- a/examples/osgi-http-service/pom.xml
+++ b/examples/osgi-http-service/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/reload/pom.xml b/examples/reload/pom.xml
index 5353885..cb21edd 100644
--- a/examples/reload/pom.xml
+++ b/examples/reload/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/rx-client-webapp/pom.xml b/examples/rx-client-webapp/pom.xml
index 26609d5..08d0bdc 100644
--- a/examples/rx-client-webapp/pom.xml
+++ b/examples/rx-client-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2021 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
diff --git a/examples/server-async-managed/pom.xml b/examples/server-async-managed/pom.xml
index 6769da6..f4e1a34 100644
--- a/examples/server-async-managed/pom.xml
+++ b/examples/server-async-managed/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/server-async-standalone/client/pom.xml b/examples/server-async-standalone/client/pom.xml
index cea0481..0670cee 100644
--- a/examples/server-async-standalone/client/pom.xml
+++ b/examples/server-async-standalone/client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/server-async-standalone/pom.xml b/examples/server-async-standalone/pom.xml
index e427c10..302fc95 100644
--- a/examples/server-async-standalone/pom.xml
+++ b/examples/server-async-standalone/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/server-async-standalone/webapp/pom.xml b/examples/server-async-standalone/webapp/pom.xml
index e44d9eb..b00d0c3 100644
--- a/examples/server-async-standalone/webapp/pom.xml
+++ b/examples/server-async-standalone/webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/server-async/pom.xml b/examples/server-async/pom.xml
index 62a84e8..3e3da8a 100644
--- a/examples/server-async/pom.xml
+++ b/examples/server-async/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/server-sent-events-jaxrs/src/main/java/org/glassfish/jersey/examples/sse/jaxrs/App.java b/examples/server-sent-events-jaxrs/src/main/java/org/glassfish/jersey/examples/sse/jaxrs/App.java
index c2b4b79..e965984 100644
--- a/examples/server-sent-events-jaxrs/src/main/java/org/glassfish/jersey/examples/sse/jaxrs/App.java
+++ b/examples/server-sent-events-jaxrs/src/main/java/org/glassfish/jersey/examples/sse/jaxrs/App.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2019 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 Distribution License v. 1.0, which is available at
diff --git a/examples/servlet3-webapp/pom.xml b/examples/servlet3-webapp/pom.xml
index 62b0119..f8442e5 100644
--- a/examples/servlet3-webapp/pom.xml
+++ b/examples/servlet3-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/simple-console/pom.xml b/examples/simple-console/pom.xml
index e498d2d..3397414 100644
--- a/examples/simple-console/pom.xml
+++ b/examples/simple-console/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/examples/simple-console/src/test/java/org/glassfish/jersey/examples/console/MainTest.java b/examples/simple-console/src/test/java/org/glassfish/jersey/examples/console/MainTest.java
index 232cd45..6c9f049 100644
--- a/examples/simple-console/src/test/java/org/glassfish/jersey/examples/console/MainTest.java
+++ b/examples/simple-console/src/test/java/org/glassfish/jersey/examples/console/MainTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2021 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
diff --git a/examples/sse-item-store-jaxrs-webapp/pom.xml b/examples/sse-item-store-jaxrs-webapp/pom.xml
index e47446b..db257db 100644
--- a/examples/sse-item-store-jaxrs-webapp/pom.xml
+++ b/examples/sse-item-store-jaxrs-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/sse-item-store-jersey-webapp/pom.xml b/examples/sse-item-store-jersey-webapp/pom.xml
index 5fea12e..1d7a283 100644
--- a/examples/sse-item-store-jersey-webapp/pom.xml
+++ b/examples/sse-item-store-jersey-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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 Distribution License v. 1.0, which is available at
diff --git a/examples/sse-twitter-aggregator/pom.xml b/examples/sse-twitter-aggregator/pom.xml
index 4736b7d..42156c2 100644
--- a/examples/sse-twitter-aggregator/pom.xml
+++ b/examples/sse-twitter-aggregator/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/system-properties-example/pom.xml b/examples/system-properties-example/pom.xml
index b89fad7..0989641 100644
--- a/examples/system-properties-example/pom.xml
+++ b/examples/system-properties-example/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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 Distribution License v. 1.0, which is available at
diff --git a/examples/webapp-example-parent/pom.xml b/examples/webapp-example-parent/pom.xml
index bee9152..52b3728 100644
--- a/examples/webapp-example-parent/pom.xml
+++ b/examples/webapp-example-parent/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 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
diff --git a/examples/xml-moxy/pom.xml b/examples/xml-moxy/pom.xml
index 32e9589..e753405 100644
--- a/examples/xml-moxy/pom.xml
+++ b/examples/xml-moxy/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2021 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
diff --git a/ext/bean-validation/pom.xml b/ext/bean-validation/pom.xml
index b20d05f..6371303 100644
--- a/ext/bean-validation/pom.xml
+++ b/ext/bean-validation/pom.xml
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2018, 2019 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
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/ValidationError.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/ValidationError.java
index 269d553..ffe8166 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/ValidationError.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/ValidationError.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
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/CompositeInjectingConstraintValidatorFactory.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/CompositeInjectingConstraintValidatorFactory.java
index 381acda..d4ef1bf 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/CompositeInjectingConstraintValidatorFactory.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/CompositeInjectingConstraintValidatorFactory.java
@@ -1,6 +1,6 @@
/*
+ * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
- * Copyright (c) 2020 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
@@ -14,6 +14,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
+
package org.glassfish.jersey.server.validation.internal;
import org.glassfish.jersey.server.validation.internal.hibernate.HibernateInjectingConstraintValidatorFactory;
@@ -58,4 +59,4 @@
public void releaseInstance(final ConstraintValidator<?, ?> instance) {
// NOOP
}
-}
\ No newline at end of file
+}
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationErrorMessageBodyWriter.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationErrorMessageBodyWriter.java
index 69b92ec..9049852 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationErrorMessageBodyWriter.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationErrorMessageBodyWriter.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
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java
index a52859f..3e7c03c 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationExceptionMapper.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
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationHelper.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationHelper.java
index 34ca8b6..728cd5f 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationHelper.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationInterceptorExecutor.java b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationInterceptorExecutor.java
index 9b40473..ebeb3cd 100644
--- a/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationInterceptorExecutor.java
+++ b/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidationInterceptorExecutor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
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 01e8685..d1aea00 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
@@ -60,4 +60,4 @@
injectionTarget.inject(instance, creationalContext);
injectionTarget.postConstruct(instance);
}
-}
\ No newline at end of file
+}
diff --git a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
index 2a4be7a..4730b28 100644
--- a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
+++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml
index ab07ba4..e63aeb8 100644
--- a/ext/cdi/jersey-cdi1x-transaction/pom.xml
+++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml
index b724e32a..8dfe43e 100644
--- a/ext/cdi/jersey-cdi1x-validation/pom.xml
+++ b/ext/cdi/jersey-cdi1x-validation/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/ext/cdi/jersey-cdi1x/pom.xml b/ext/cdi/jersey-cdi1x/pom.xml
index e101952..ced26bf 100644
--- a/ext/cdi/jersey-cdi1x/pom.xml
+++ b/ext/cdi/jersey-cdi1x/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
@@ -51,6 +51,7 @@
<artifactId>jersey-server</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
+ <optional>true</optional>
</dependency>
<dependency>
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
index 8adfa92..46f5893 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -82,11 +82,11 @@
import org.glassfish.jersey.internal.inject.Providers;
import org.glassfish.jersey.internal.inject.SupplierInstanceBinding;
import org.glassfish.jersey.internal.util.collection.Cache;
-import org.glassfish.jersey.server.ContainerRequest;
+import org.glassfish.jersey.model.ContractProvider;
import org.glassfish.jersey.server.model.Parameter;
-import org.glassfish.jersey.server.model.Resource;
-import org.glassfish.jersey.server.spi.ComponentProvider;
+import org.glassfish.jersey.server.ContainerRequest;
import org.glassfish.jersey.server.spi.internal.ValueParamProvider;
+import org.glassfish.jersey.spi.ComponentProvider;
import org.glassfish.hk2.api.ClassAnalyzer;
@@ -105,25 +105,20 @@
*
* @author Jakub Podlesak
*/
-@Priority(200)
public class CdiComponentProvider implements ComponentProvider, Extension {
private static final Logger LOGGER = Logger.getLogger(CdiComponentProvider.class.getName());
/**
- * annotation types that distinguish the classes to be added to {@link #jaxrsInjectableTypes}
- */
- private static final Set<Class<? extends Annotation>> JAX_RS_INJECT_ANNOTATIONS =
- new HashSet<Class<? extends Annotation>>() {{
- addAll(JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS);
- add(Context.class);
- }};
-
- /**
* Name to be used when binding CDI injectee skipping class analyzer to HK2 service injection manager.
*/
public static final String CDI_CLASS_ANALYZER = "CdiInjecteeSkippingClassAnalyzer";
+ private static final CdiComponentProviderRuntimeSpecifics runtimeSpecifics =
+ CdiUtil.IS_SERVER_AVAILABLE
+ ? new CdiComponentProviderServerRuntimeSpecifics()
+ : new CdiComponentProviderClientRuntimeSpecifics();
+
/**
* set of non JAX-RS components containing JAX-RS injection points
*/
@@ -142,15 +137,10 @@
public Boolean apply(final Class<?> clazz) {
return Application.class.isAssignableFrom(clazz)
|| Providers.isJaxRsProvider(clazz)
- || jaxRsResourceCache.apply(clazz);
+ || runtimeSpecifics.isJaxRsResource(clazz);
}
});
- // Check first if a class is a JAX-RS resource, and only if so check with validation.
- // This prevents unnecessary warnings being logged for pure CDI beans.
- private final Cache<Class<?>, Boolean> jaxRsResourceCache = new Cache<>(
- clazz -> Resource.from(clazz, true) != null && Resource.from(clazz) != null);
-
private final Hk2CustomBoundTypesProvider customHk2TypesProvider;
private final InjectionManagerStore injectionManagerStore;
@@ -275,6 +265,17 @@
@Override
public boolean bind(final Class<?> clazz, final Set<Class<?>> providerContracts) {
+ return bind(clazz, providerContracts, ContractProvider.NO_PRIORITY);
+ }
+
+ @Override
+ public boolean bind(Class<?> component, ContractProvider contractProvider) {
+ return contractProvider != null
+ ? bind(component, contractProvider.getContracts(), contractProvider.getPriority(component))
+ : bind(component, Collections.EMPTY_SET);
+ }
+
+ private boolean bind(final Class<?> clazz, final Set<Class<?>> providerContracts, Integer priority) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine(LocalizationMessages.CDI_CLASS_BEING_CHECKED(clazz));
}
@@ -295,16 +296,16 @@
return false;
}
- final boolean isJaxRsResource = jaxRsResourceCache.apply(clazz);
+ final boolean isJaxRsResource = runtimeSpecifics.isJaxRsResource(clazz);
- if (isJaxRsResource && !Resource.isAcceptable(clazz)) {
+ if (isJaxRsResource && !runtimeSpecifics.isAcceptableResource(clazz)) {
LOGGER.warning(LocalizationMessages.CDI_NON_INSTANTIABLE_COMPONENT(clazz));
return false;
}
final Class<? extends Annotation> beanScopeAnnotation = CdiUtil.getBeanScope(clazz, beanManager);
final boolean isRequestScoped = beanScopeAnnotation == RequestScoped.class
- || (beanScopeAnnotation == Dependent.class && isJaxRsResource);
+ || (beanScopeAnnotation == Dependent.class && isJaxRsResource);
Supplier<AbstractCdiBeanSupplier> beanFactory = isRequestScoped
? new RequestScopedCdiBeanSupplier(clazz, injectionManager, beanManager, isCdiManaged)
@@ -312,9 +313,13 @@
SupplierInstanceBinding<AbstractCdiBeanSupplier> builder = Bindings.supplier(beanFactory)
.to(clazz).qualifiedBy(CustomAnnotationLiteral.INSTANCE);
- for (final Class contract : providerContracts) {
+ for (Class<?> contract : providerContracts) {
builder.to(contract);
}
+ if (priority > ContractProvider.NO_PRIORITY) {
+ builder.ranked(priority);
+ }
+
injectionManager.register(builder);
if (isRequestScoped) {
@@ -353,7 +358,7 @@
return component.isAnnotationPresent(ManagedBean.class);
}
- private static AnnotatedConstructor<?> enrichedConstructor(final AnnotatedConstructor<?> ctor) {
+ private AnnotatedConstructor<?> enrichedConstructor(final AnnotatedConstructor<?> ctor) {
return new AnnotatedConstructor() {
@Override
@@ -366,58 +371,7 @@
final List<AnnotatedParameter> parameters = new ArrayList<>(ctor.getParameters().size());
for (final AnnotatedParameter<?> ap : ctor.getParameters()) {
- parameters.add(new AnnotatedParameter() {
-
- @Override
- public int getPosition() {
- return ap.getPosition();
- }
-
- @Override
- public AnnotatedCallable getDeclaringCallable() {
- return ap.getDeclaringCallable();
- }
-
- @Override
- public Type getBaseType() {
- return ap.getBaseType();
- }
-
- @Override
- public Set<Type> getTypeClosure() {
- return ap.getTypeClosure();
- }
-
- @Override
- public <T extends Annotation> T getAnnotation(final Class<T> annotationType) {
- if (annotationType == JaxRsParamProducer.JaxRsParamQualifier.class) {
- return hasAnnotation(ap, JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS)
- ? (T) JaxRsParamProducer.JaxRsParamQUALIFIER : null;
- } else {
- return ap.getAnnotation(annotationType);
- }
- }
-
- @Override
- public Set<Annotation> getAnnotations() {
- final Set<Annotation> result = new HashSet<>();
- for (final Annotation a : ap.getAnnotations()) {
- result.add(a);
- final Class<? extends Annotation> annotationType = a.annotationType();
- if (JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS.contains(annotationType)) {
- result.add(JaxRsParamProducer.JaxRsParamQUALIFIER);
- }
- }
- return result;
- }
-
- @Override
- public boolean isAnnotationPresent(final Class<? extends Annotation> annotationType) {
- return (annotationType == JaxRsParamProducer.JaxRsParamQualifier.class
- && hasAnnotation(ap, JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS))
- || ap.isAnnotationPresent(annotationType);
- }
- });
+ parameters.add(runtimeSpecifics.getAnnotatedParameter(ap));
}
return parameters;
}
@@ -459,24 +413,20 @@
};
}
- private boolean containsJaxRsParameterizedCtor(final AnnotatedType annotatedType) {
- return containAnnotatedParameters(annotatedType.getConstructors(), JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS);
+ private static boolean containsJaxRsConstructorInjection(final AnnotatedType annotatedType) {
+ return containAnnotatedParameters(annotatedType.getConstructors(), runtimeSpecifics.getJaxRsInjectAnnotations());
}
- private boolean containsJaxRsConstructorInjection(final AnnotatedType annotatedType) {
- return containAnnotatedParameters(annotatedType.getConstructors(), JAX_RS_INJECT_ANNOTATIONS);
+ private static boolean containsJaxRsMethodInjection(final AnnotatedType annotatedType) {
+ return containAnnotatedParameters(annotatedType.getMethods(), runtimeSpecifics.getJaxRsInjectAnnotations());
}
- private boolean containsJaxRsMethodInjection(final AnnotatedType annotatedType) {
- return containAnnotatedParameters(annotatedType.getMethods(), JAX_RS_INJECT_ANNOTATIONS);
+ private static boolean containsJaxRsFieldInjection(final AnnotatedType annotatedType) {
+ return containAnnotation(annotatedType.getFields(), runtimeSpecifics.getJaxRsInjectAnnotations());
}
- private boolean containsJaxRsFieldInjection(final AnnotatedType annotatedType) {
- return containAnnotation(annotatedType.getFields(), JAX_RS_INJECT_ANNOTATIONS);
- }
-
- private boolean containAnnotatedParameters(final Collection<AnnotatedCallable> annotatedCallables,
- final Set<Class<? extends Annotation>> annotationSet) {
+ static boolean containAnnotatedParameters(final Collection<AnnotatedCallable> annotatedCallables,
+ final Set<Class<? extends Annotation>> annotationSet) {
for (final AnnotatedCallable c : annotatedCallables) {
if (containAnnotation(c.getParameters(), annotationSet)) {
return true;
@@ -485,7 +435,7 @@
return false;
}
- private boolean containAnnotation(final Collection<Annotated> elements,
+ private static boolean containAnnotation(final Collection<Annotated> elements,
final Set<Class<? extends Annotation>> annotationSet) {
for (final Annotated element : elements) {
if (hasAnnotation(element, annotationSet)) {
@@ -495,7 +445,7 @@
return false;
}
- private static boolean hasAnnotation(final Annotated element, final Set<Class<? extends Annotation>> annotations) {
+ static boolean hasAnnotation(final Annotated element, final Set<Class<? extends Annotation>> annotations) {
for (final Class<? extends Annotation> a : annotations) {
if (element.isAnnotationPresent(a)) {
return true;
@@ -504,30 +454,10 @@
return false;
}
- @SuppressWarnings("unused")
- private void afterTypeDiscovery(@Observes final AfterTypeDiscovery afterTypeDiscovery) {
- if (LOGGER.isLoggable(Level.CONFIG) && !jerseyVetoedTypes.isEmpty()) {
- LOGGER.config(LocalizationMessages.CDI_TYPE_VETOED(customHk2TypesProvider,
- listElements(new StringBuilder().append("\n"), jerseyVetoedTypes).toString()));
- }
- }
-
- @SuppressWarnings("unused")
- private void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery beforeBeanDiscovery, final BeanManager beanManager) {
- beforeBeanDiscovery.addAnnotatedType(
- beanManager.createAnnotatedType(JaxRsParamProducer.class),
- "Jersey " + JaxRsParamProducer.class.getName()
- );
- beforeBeanDiscovery.addAnnotatedType(
- beanManager.createAnnotatedType(ProcessJAXRSAnnotatedTypes.class),
- "Jersey " + ProcessJAXRSAnnotatedTypes.class.getName()
- );
- }
-
public void processAnnotatedType(//@Observes
- // We can not apply the following constraint
- // if we want to fully support {@link org.glassfish.jersey.ext.cdi1x.spi.Hk2CustomBoundTypesProvider}.
- // Covered by tests/integration/cdi-with-jersey-injection-custom-cfg-webapp test application:
+ // We can not apply the following constraint
+ // if we want to fully support {@link org.glassfish.jersey.ext.cdi1x.spi.Hk2CustomBoundTypesProvider}.
+ // Covered by tests/integration/cdi-with-jersey-injection-custom-cfg-webapp test application:
// @WithAnnotations({
// Context.class,
// ApplicationPath.class,
@@ -537,7 +467,7 @@
// MatrixParam.class,
// BeanParam.class,
// PathParam.class})
- final ProcessAnnotatedType processAnnotatedType) {
+ final ProcessAnnotatedType processAnnotatedType) {
final AnnotatedType<?> annotatedType = processAnnotatedType.getAnnotatedType();
// if one of the JAX-RS annotations is present in the currently seen class, add it to the "whitelist"
@@ -555,7 +485,7 @@
}
}
- if (containsJaxRsParameterizedCtor(annotatedType)) {
+ if (runtimeSpecifics.containsJaxRsParameterizedCtor(annotatedType)) {
processAnnotatedType.setAnnotatedType(new AnnotatedType() {
@Override
@@ -610,53 +540,6 @@
}
}
-
- @SuppressWarnings("unused")
- private void processInjectionTarget(@Observes final ProcessInjectionTarget event) {
- final InjectionTarget it = event.getInjectionTarget();
- final Class<?> componentClass = event.getAnnotatedType().getJavaClass();
-
- final Set<InjectionPoint> cdiInjectionPoints = filterHk2InjectionPointsOut(it.getInjectionPoints());
-
- for (final InjectionPoint injectionPoint : cdiInjectionPoints) {
- final Member member = injectionPoint.getMember();
- if (member instanceof Field) {
- addInjecteeToSkip(componentClass, fieldsToSkip, (Field) member);
- } else if (member instanceof Method) {
- addInjecteeToSkip(componentClass, methodsToSkip, (Method) member);
- }
- }
-
- InjectionManagerInjectedCdiTarget target = null;
- if (isJerseyOrDependencyType(componentClass)) {
- target = new InjectionManagerInjectedCdiTarget(it) {
-
- @Override
- public Set<InjectionPoint> getInjectionPoints() {
- // Tell CDI to ignore Jersey (or it's dependencies) classes when injecting.
- // CDI will not treat these classes as CDI beans (as they are not).
- return Collections.emptySet();
- }
- };
- } else if (isJaxRsComponentType(componentClass)
- || jaxrsInjectableTypes.contains(event.getAnnotatedType().getBaseType())) {
- target = new InjectionManagerInjectedCdiTarget(it) {
-
- @Override
- public Set<InjectionPoint> getInjectionPoints() {
- // Inject CDI beans into JAX-RS resources/providers/application.
- return cdiInjectionPoints;
- }
- };
- }
-
- if (target != null) {
- notify(target);
- //noinspection unchecked
- event.setInjectionTarget(target);
- }
- }
-
private Set<InjectionPoint> filterHk2InjectionPointsOut(final Set<InjectionPoint> originalInjectionPoints) {
final Set<InjectionPoint> filteredInjectionPoints = new HashSet<>();
for (final InjectionPoint ip : originalInjectionPoints) {
@@ -716,17 +599,6 @@
private static final long serialVersionUID = 1L;
}
- @SuppressWarnings({"unused", "unchecked", "rawtypes"})
- private void afterDiscoveryObserver(@Observes final AfterBeanDiscovery abd) {
- if (customHk2TypesProvider != null) {
- hk2ProvidedTypes.addAll(customHk2TypesProvider.getHk2Types());
- }
-
- for (final Type t : hk2ProvidedTypes) {
- abd.addBean(new Hk2Bean(t));
- }
- }
-
/**
* Get the types provided by HK2
* @return Types that HK2 is to inject
@@ -817,19 +689,19 @@
final String pkgName = pkg.getName();
return !clazz.isAnnotationPresent(JerseyVetoed.class)
&& (pkgName.contains("org.glassfish.hk2")
- || pkgName.contains("jersey.repackaged")
- || pkgName.contains("org.jvnet.hk2")
- || (pkgName.startsWith("org.glassfish.jersey")
- && !pkgName.startsWith("org.glassfish.jersey.examples")
- && !pkgName.startsWith("org.glassfish.jersey.tests"))
- || (pkgName.startsWith("com.sun.jersey")
- && !pkgName.startsWith("com.sun.jersey.examples")
- && !pkgName.startsWith("com.sun.jersey.tests")));
+ || pkgName.contains("jersey.repackaged")
+ || pkgName.contains("org.jvnet.hk2")
+ || (pkgName.startsWith("org.glassfish.jersey")
+ && !pkgName.startsWith("org.glassfish.jersey.examples")
+ && !pkgName.startsWith("org.glassfish.jersey.tests"))
+ || (pkgName.startsWith("com.sun.jersey")
+ && !pkgName.startsWith("com.sun.jersey.examples")
+ && !pkgName.startsWith("com.sun.jersey.tests")));
}
private void bindHk2ClassAnalyzer() {
ClassAnalyzer defaultClassAnalyzer =
- injectionManager.getInstance(ClassAnalyzer.class, ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME);
+ injectionManager.getInstance(ClassAnalyzer.class, ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME);
int skippedElements = methodsToSkip.size() + fieldsToSkip.size();
@@ -971,4 +843,87 @@
return false;
}
}
+
+ // ------------------------------ CDI EXTENSIONS ------------------------------
+ @SuppressWarnings("unused")
+ private void processInjectionTarget(@Observes final ProcessInjectionTarget event) {
+ final InjectionTarget it = event.getInjectionTarget();
+ final Class<?> componentClass = event.getAnnotatedType().getJavaClass();
+
+ final Set<InjectionPoint> cdiInjectionPoints = filterHk2InjectionPointsOut(it.getInjectionPoints());
+
+ for (final InjectionPoint injectionPoint : cdiInjectionPoints) {
+ final Member member = injectionPoint.getMember();
+ if (member instanceof Field) {
+ addInjecteeToSkip(componentClass, fieldsToSkip, (Field) member);
+ } else if (member instanceof Method) {
+ addInjecteeToSkip(componentClass, methodsToSkip, (Method) member);
+ }
+ }
+
+ InjectionManagerInjectedCdiTarget target = null;
+ if (isJerseyOrDependencyType(componentClass)) {
+ target = new InjectionManagerInjectedCdiTarget(it) {
+
+ @Override
+ public Set<InjectionPoint> getInjectionPoints() {
+ // Tell CDI to ignore Jersey (or it's dependencies) classes when injecting.
+ // CDI will not treat these classes as CDI beans (as they are not).
+ return Collections.emptySet();
+ }
+ };
+ } else if (isJaxRsComponentType(componentClass)
+ || jaxrsInjectableTypes.contains(event.getAnnotatedType().getBaseType())) {
+ target = new InjectionManagerInjectedCdiTarget(it) {
+
+ @Override
+ public Set<InjectionPoint> getInjectionPoints() {
+ // Inject CDI beans into JAX-RS resources/providers/application.
+ return cdiInjectionPoints;
+ }
+ };
+ }
+
+ if (target != null) {
+ notify(target);
+ //noinspection unchecked
+ event.setInjectionTarget(target);
+ }
+ }
+
+
+ @SuppressWarnings("unused")
+ private void afterTypeDiscovery(@Observes final AfterTypeDiscovery afterTypeDiscovery) {
+ if (LOGGER.isLoggable(Level.CONFIG) && !jerseyVetoedTypes.isEmpty()) {
+ LOGGER.config(LocalizationMessages.CDI_TYPE_VETOED(customHk2TypesProvider,
+ listElements(new StringBuilder().append("\n"), jerseyVetoedTypes).toString()));
+ }
+ }
+
+ @SuppressWarnings({"unused", "unchecked", "rawtypes"})
+ private void afterDiscoveryObserver(@Observes final AfterBeanDiscovery abd) {
+ if (customHk2TypesProvider != null) {
+ hk2ProvidedTypes.addAll(customHk2TypesProvider.getHk2Types());
+ }
+
+ for (final Type t : hk2ProvidedTypes) {
+ abd.addBean(new Hk2Bean(t));
+ }
+ }
+
+ @SuppressWarnings("unused")
+ private void beforeBeanDiscovery(@Observes final BeforeBeanDiscovery beforeBeanDiscovery, final BeanManager beanManager) {
+ if (CdiUtil.IS_SERVER_AVAILABLE) {
+ beforeBeanDiscovery.addAnnotatedType(
+ beanManager.createAnnotatedType(CdiComponentProviderServerRuntimeSpecifics.JaxRsParamProducer.class),
+ "Jersey " + CdiComponentProviderServerRuntimeSpecifics.JaxRsParamProducer.class.getName()
+ );
+ }
+
+ beforeBeanDiscovery.addAnnotatedType(
+ beanManager.createAnnotatedType(ProcessJAXRSAnnotatedTypes.class),
+ "Jersey " + ProcessJAXRSAnnotatedTypes.class.getName()
+ );
+ }
}
+
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderClientRuntimeSpecifics.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderClientRuntimeSpecifics.java
new file mode 100644
index 0000000..bad8dca
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderClientRuntimeSpecifics.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 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
+ * 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.ext.cdi1x.internal;
+
+import jakarta.enterprise.inject.spi.AnnotatedParameter;
+import jakarta.enterprise.inject.spi.AnnotatedType;
+import jakarta.ws.rs.core.Context;
+import java.lang.annotation.Annotation;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Client side runtime CDI ComponentProvider specific implementation.
+ */
+class CdiComponentProviderClientRuntimeSpecifics implements CdiComponentProviderRuntimeSpecifics {
+ /*
+ * annotation types that distinguish the classes to be added to jaxrsInjectableTypes
+ */
+ private static final Set<Class<? extends Annotation>> JAX_RS_INJECT_ANNOTATIONS =
+ new HashSet<Class<? extends Annotation>>() {{
+ add(Context.class);
+ }};
+
+ @Override
+ public boolean containsJaxRsParameterizedCtor(AnnotatedType annotatedType) {
+ return false;
+ }
+
+ @Override
+ public Set<Class<? extends Annotation>> getJaxRsInjectAnnotations() {
+ return JAX_RS_INJECT_ANNOTATIONS;
+ }
+
+ @Override
+ public AnnotatedParameter<?> getAnnotatedParameter(AnnotatedParameter<?> ap) {
+ return ap;
+ }
+
+ @Override
+ public boolean isAcceptableResource(Class<?> resource) {
+ return false;
+ }
+
+ @Override
+ public boolean isJaxRsResource(Class<?> resource) {
+ return false;
+ }
+}
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderRuntimeSpecifics.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderRuntimeSpecifics.java
new file mode 100644
index 0000000..9ca5ce4
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderRuntimeSpecifics.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 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
+ * 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.ext.cdi1x.internal;
+
+import jakarta.enterprise.inject.spi.AnnotatedParameter;
+import jakarta.enterprise.inject.spi.AnnotatedType;
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+/**
+ * Abstraction layer to separate client and server dependent implementation.
+ */
+interface CdiComponentProviderRuntimeSpecifics {
+ boolean containsJaxRsParameterizedCtor(final AnnotatedType annotatedType);
+
+ AnnotatedParameter<?> getAnnotatedParameter(AnnotatedParameter<?> ap);
+
+ Set<Class<? extends Annotation>> getJaxRsInjectAnnotations();
+
+ boolean isAcceptableResource(Class<?> resource);
+
+ boolean isJaxRsResource(Class<?> resource);
+}
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderServerRuntimeSpecifics.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderServerRuntimeSpecifics.java
new file mode 100644
index 0000000..a677436
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProviderServerRuntimeSpecifics.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 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
+ * 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.ext.cdi1x.internal;
+
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.glassfish.jersey.internal.inject.Providers;
+import org.glassfish.jersey.internal.util.collection.Cache;
+import org.glassfish.jersey.server.ContainerRequest;
+import org.glassfish.jersey.server.model.Parameter;
+import org.glassfish.jersey.server.model.Resource;
+import org.glassfish.jersey.server.spi.internal.ValueParamProvider;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.spi.Annotated;
+import jakarta.enterprise.inject.spi.AnnotatedCallable;
+import jakarta.enterprise.inject.spi.AnnotatedConstructor;
+import jakarta.enterprise.inject.spi.AnnotatedParameter;
+import jakarta.enterprise.inject.spi.AnnotatedType;
+import jakarta.enterprise.inject.spi.BeanManager;
+import jakarta.enterprise.inject.spi.InjectionPoint;
+import jakarta.inject.Qualifier;
+import jakarta.ws.rs.core.Context;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.reflect.Type;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Function;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Server side runtime CDI ComponentProvider specific implementation.
+ */
+class CdiComponentProviderServerRuntimeSpecifics implements CdiComponentProviderRuntimeSpecifics {
+ /*
+ * annotation types that distinguish the classes to be added to {@link CdiComponentProvider#jaxrsInjectableTypes}
+ */
+ private static final Set<Class<? extends Annotation>> JAX_RS_INJECT_ANNOTATIONS =
+ new HashSet<Class<? extends Annotation>>() {{
+ addAll(JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS);
+ add(Context.class);
+ }};
+
+
+ // Check first if a class is a JAX-RS resource, and only if so check with validation.
+ // This prevents unnecessary warnings being logged for pure CDI beans.
+ private final Cache<Class<?>, Boolean> jaxRsResourceCache = new Cache<>(
+ clazz -> Resource.from(clazz, true) != null && Resource.from(clazz) != null);
+
+ /**
+ * CDI producer for CDI bean constructor String parameters, that should be injected by JAX-RS.
+ */
+ @ApplicationScoped
+ public static class JaxRsParamProducer {
+
+ @Qualifier
+ @Retention(RUNTIME)
+ @Target({METHOD, FIELD, PARAMETER, TYPE})
+ public static @interface JaxRsParamQualifier {
+ }
+
+ private static final JaxRsParamQualifier JaxRsParamQUALIFIER = new JaxRsParamQualifier() {
+
+ @Override
+ public Class<? extends Annotation> annotationType() {
+ return JaxRsParamQualifier.class;
+ }
+ };
+
+ static final Set<Class<? extends Annotation>> JAX_RS_STRING_PARAM_ANNOTATIONS =
+ new HashSet<Class<? extends Annotation>>() {{
+ add(jakarta.ws.rs.PathParam.class);
+ add(jakarta.ws.rs.QueryParam.class);
+ add(jakarta.ws.rs.CookieParam.class);
+ add(jakarta.ws.rs.HeaderParam.class);
+ add(jakarta.ws.rs.MatrixParam.class);
+ add(jakarta.ws.rs.FormParam.class);
+ }};
+
+ /**
+ * Internal cache to store CDI {@link InjectionPoint} to Jersey {@link Parameter} mapping.
+ */
+ final Cache<InjectionPoint, Parameter> parameterCache = new Cache<>(injectionPoint -> {
+ final Annotated annotated = injectionPoint.getAnnotated();
+ final Class<?> clazz = injectionPoint.getMember().getDeclaringClass();
+
+ if (annotated instanceof AnnotatedParameter) {
+
+ final AnnotatedParameter annotatedParameter = (AnnotatedParameter) annotated;
+ final AnnotatedCallable callable = annotatedParameter.getDeclaringCallable();
+
+ if (callable instanceof AnnotatedConstructor) {
+
+ final AnnotatedConstructor ac = (AnnotatedConstructor) callable;
+ final int position = annotatedParameter.getPosition();
+ final List<Parameter> parameters = Parameter.create(clazz, clazz, ac.getJavaMember(), false);
+
+ return parameters.get(position);
+ }
+ }
+
+ return null;
+ });
+
+ /**
+ * Provide a value for given injection point. If the injection point does not refer
+ * to a CDI bean constructor parameter, or the value could not be found, the method will return null.
+ *
+ * @param injectionPoint actual injection point.
+ * @param beanManager current application bean manager.
+ * @return concrete JAX-RS parameter value for given injection point.
+ */
+ @jakarta.enterprise.inject.Produces
+ @JaxRsParamQualifier
+ public String getParameterValue(final InjectionPoint injectionPoint, final BeanManager beanManager) {
+ final Parameter parameter = parameterCache.apply(injectionPoint);
+
+ if (parameter != null) {
+ InjectionManager injectionManager =
+ beanManager.getExtension(CdiComponentProvider.class).getEffectiveInjectionManager();
+
+ Set<ValueParamProvider> providers = Providers.getProviders(injectionManager, ValueParamProvider.class);
+ ContainerRequest containerRequest = injectionManager.getInstance(ContainerRequest.class);
+ for (ValueParamProvider vfp : providers) {
+ Function<ContainerRequest, ?> paramValueSupplier = vfp.getValueProvider(parameter);
+ if (paramValueSupplier != null) {
+ return (String) paramValueSupplier.apply(containerRequest);
+ }
+ }
+ }
+
+ return null;
+ }
+ }
+
+ @Override
+ public AnnotatedParameter<?> getAnnotatedParameter(AnnotatedParameter<?> ap) {
+ return new AnnotatedParameter() {
+
+ @Override
+ public int getPosition() {
+ return ap.getPosition();
+ }
+
+ @Override
+ public AnnotatedCallable getDeclaringCallable() {
+ return ap.getDeclaringCallable();
+ }
+
+ @Override
+ public Type getBaseType() {
+ return ap.getBaseType();
+ }
+
+ @Override
+ public Set<Type> getTypeClosure() {
+ return ap.getTypeClosure();
+ }
+
+ @Override
+ public <T extends Annotation> T getAnnotation(final Class<T> annotationType) {
+ if (annotationType == JaxRsParamProducer.JaxRsParamQualifier.class) {
+ return CdiComponentProvider.hasAnnotation(ap, JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS)
+ ? (T) JaxRsParamProducer.JaxRsParamQUALIFIER : null;
+ } else {
+ return ap.getAnnotation(annotationType);
+ }
+ }
+
+ @Override
+ public Set<Annotation> getAnnotations() {
+ final Set<Annotation> result = new HashSet<>();
+ for (final Annotation a : ap.getAnnotations()) {
+ result.add(a);
+ final Class<? extends Annotation> annotationType = a.annotationType();
+ if (JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS.contains(annotationType)) {
+ result.add(JaxRsParamProducer.JaxRsParamQUALIFIER);
+ }
+ }
+ return result;
+ }
+
+ @Override
+ public boolean isAnnotationPresent(final Class<? extends Annotation> annotationType) {
+ return (annotationType == JaxRsParamProducer.JaxRsParamQualifier.class
+ && CdiComponentProvider.hasAnnotation(ap, JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS))
+ || ap.isAnnotationPresent(annotationType);
+ }
+ };
+ }
+
+ @Override
+ public Set<Class<? extends Annotation>> getJaxRsInjectAnnotations() {
+ return JAX_RS_INJECT_ANNOTATIONS;
+ }
+
+ @Override
+ public boolean isAcceptableResource(Class<?> resource) {
+ return Resource.isAcceptable(resource);
+ }
+
+ @Override
+ public boolean isJaxRsResource(Class<?> resource) {
+ return jaxRsResourceCache.apply(resource);
+ }
+
+ @Override
+ public boolean containsJaxRsParameterizedCtor(final AnnotatedType annotatedType) {
+ return CdiComponentProvider
+ .containAnnotatedParameters(annotatedType.getConstructors(), JaxRsParamProducer.JAX_RS_STRING_PARAM_ANNOTATIONS);
+ }
+}
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiServerComponentProvider.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiServerComponentProvider.java
new file mode 100644
index 0000000..3183ce3
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiServerComponentProvider.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 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
+ * 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.ext.cdi1x.internal;
+
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.glassfish.jersey.model.ContractProvider;
+import org.glassfish.jersey.server.spi.ComponentProvider;
+
+import jakarta.enterprise.inject.spi.BeanManager;
+import java.util.Set;
+
+/**
+ * Implementation of ComponentProvider for Jersey Server
+ */
+public class CdiServerComponentProvider implements ComponentProvider {
+ private CdiComponentProvider componentProvider;
+
+ @Override
+ public void initialize(InjectionManager injectionManager) {
+ BeanManager beanManager = CdiUtil.getBeanManager();
+
+ if (beanManager != null) {
+ // Try to get CdiComponentProvider created by CDI.
+ componentProvider = beanManager.getExtension(CdiComponentProvider.class);
+ componentProvider.initialize(injectionManager);
+ }
+ }
+
+ @Override
+ public boolean bind(Class<?> component, Set<Class<?>> providerContracts) {
+ return componentProvider != null ? componentProvider.bind(component, providerContracts) : false;
+ }
+
+ @Override
+ public boolean bind(Class<?> component, ContractProvider contractProvider) {
+ return componentProvider != null ? componentProvider.bind(component, contractProvider) : false;
+ }
+
+ @Override
+ public void done() {
+ if (componentProvider != null) {
+ componentProvider.done();
+ }
+ }
+}
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtil.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtil.java
index 2057dbf..b3ffa9a 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtil.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
@@ -17,6 +17,7 @@
package org.glassfish.jersey.ext.cdi1x.internal;
import java.lang.annotation.Annotation;
+import java.security.AccessController;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
@@ -31,6 +32,7 @@
import org.glassfish.jersey.ext.cdi1x.internal.spi.BeanManagerProvider;
import org.glassfish.jersey.ext.cdi1x.internal.spi.InjectionManagerStore;
import org.glassfish.jersey.internal.ServiceFinder;
+import org.glassfish.jersey.internal.util.ReflectionHelper;
import org.glassfish.jersey.model.internal.RankedComparator;
import org.glassfish.jersey.model.internal.RankedProvider;
@@ -146,4 +148,12 @@
}
return null;
}
+
+ static final boolean IS_SERVER_AVAILABLE = isServerAvailable();
+
+ private static boolean isServerAvailable() {
+ final String serverComponentProvider = "org.glassfish.jersey.server.spi.ComponentProvider";
+ final Class<?> aClass = AccessController.doPrivileged(ReflectionHelper.classForNamePA(serverComponentProvider));
+ return aClass != null;
+ }
}
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessAllAnnotatedTypes.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessAllAnnotatedTypes.java
index 44208fc..80591cc 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessAllAnnotatedTypes.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/ProcessAllAnnotatedTypes.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.server.spi.ComponentProvider b/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.server.spi.ComponentProvider
index 64adbff..4c77ab4 100644
--- a/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.server.spi.ComponentProvider
+++ b/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.server.spi.ComponentProvider
@@ -1 +1 @@
-org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider
+org.glassfish.jersey.ext.cdi1x.internal.CdiServerComponentProvider
diff --git a/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.spi.ComponentProvider b/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.spi.ComponentProvider
new file mode 100644
index 0000000..8b86a57
--- /dev/null
+++ b/ext/cdi/jersey-cdi1x/src/main/resources/META-INF/services/org.glassfish.jersey.spi.ComponentProvider
@@ -0,0 +1 @@
+org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider
\ No newline at end of file
diff --git a/ext/cdi/pom.xml b/ext/cdi/pom.xml
index 5823d0e..0d86bfb 100644
--- a/ext/cdi/pom.xml
+++ b/ext/cdi/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/entity-filtering/pom.xml b/ext/entity-filtering/pom.xml
index 0fb7508..854640a 100644
--- a/ext/entity-filtering/pom.xml
+++ b/ext/entity-filtering/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml
index 5c27b2a..5520ed0 100644
--- a/ext/metainf-services/pom.xml
+++ b/ext/metainf-services/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml
index 6469617..eebc242 100644
--- a/ext/microprofile/mp-config/pom.xml
+++ b/ext/microprofile/mp-config/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -34,7 +34,7 @@
<dependency>
<groupId>org.eclipse.microprofile.config</groupId>
<artifactId>microprofile-config-api</artifactId>
- <version>${config.version}</version>
+ <version>${microprofile.config.version}</version>
</dependency>
<dependency>
diff --git a/ext/microprofile/mp-config/src/main/java/org/glassfish/jersey/microprofile/config/ConfigurationModel.java b/ext/microprofile/mp-config/src/main/java/org/glassfish/jersey/microprofile/config/ConfigurationModel.java
index 2053b4a..ad2c25e 100644
--- a/ext/microprofile/mp-config/src/main/java/org/glassfish/jersey/microprofile/config/ConfigurationModel.java
+++ b/ext/microprofile/mp-config/src/main/java/org/glassfish/jersey/microprofile/config/ConfigurationModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -82,8 +82,14 @@
@Override
public Map<String, Object> getProperties() {
- if (properties.isEmpty()) {
- config.getPropertyNames().forEach(c -> properties.put(c, config.getValue(c, String.class)));
+ if (properties.isEmpty()) { //load properties from external config
+ final String emptyString = "";
+ config.getPropertyNames().forEach(c -> {
+ final String value = config.getOptionalValue(c, String.class).orElse(emptyString).trim();
+ if (!value.isEmpty()) { //eliminate NULL and "" values w/o Exception
+ properties.put(c, value);
+ }
+ });
}
return properties;
diff --git a/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ConfigurationProviderTest.java b/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ConfigurationProviderTest.java
new file mode 100644
index 0000000..6b2aecd
--- /dev/null
+++ b/ext/microprofile/mp-config/src/test/java/org/glassfish/jersey/microprofile/config/ConfigurationProviderTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 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
+ * 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.config;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Map;
+
+public class ConfigurationProviderTest {
+
+ private static final String EMPTY_PROPERTY_NAME = "EMPTY_PROPERTY";
+
+ @Before
+ public void before() {
+ System.setProperty(EMPTY_PROPERTY_NAME, "");
+ }
+
+ @Test
+ public void getEmptyPropertiesTest() {
+ final ConfigurationProvider provider = new ConfigurationProvider();
+ final Map<String, Object> properties = provider.getProperties();
+
+ Assert.assertNull(properties.get(EMPTY_PROPERTY_NAME));
+ }
+
+}
\ No newline at end of file
diff --git a/ext/microprofile/mp-config/src/test/resources/META-INF/microprofile-config.properties b/ext/microprofile/mp-config/src/test/resources/META-INF/microprofile-config.properties
index dbb4a93..38c1e2b 100644
--- a/ext/microprofile/mp-config/src/test/resources/META-INF/microprofile-config.properties
+++ b/ext/microprofile/mp-config/src/test/resources/META-INF/microprofile-config.properties
@@ -1,3 +1,20 @@
+#
+# Copyright (c) 2020, 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
+# 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
+#
+
+
jersey.config.disableJsonProcessing = true
jersey.config.disableAutoDiscovery=1
-jersey.config.disableMetainfServicesLookup=true
\ No newline at end of file
+jersey.config.disableMetainfServicesLookup=true
diff --git a/ext/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml
index f0f3f85..c3c6021 100644
--- a/ext/microprofile/mp-rest-client/pom.xml
+++ b/ext/microprofile/mp-rest-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -17,8 +17,8 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
@@ -32,7 +32,7 @@
<dependency>
<groupId>org.eclipse.microprofile.rest.client</groupId>
<artifactId>microprofile-rest-client-api</artifactId>
- <version>1.3.3</version>
+ <version>2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile.config</groupId>
@@ -65,6 +65,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-weld2-se</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>${jsonp.ri.version}</version>
@@ -78,10 +83,20 @@
<groupId>org.glassfish</groupId>
<artifactId>jsonp-jaxrs</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.reactivestreams</groupId>
+ <artifactId>reactive-streams</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-sse</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
- <plugins>
+ <plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/InterfaceModel.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/InterfaceModel.java
index af4098e..fdf8ecf 100644
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/InterfaceModel.java
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/InterfaceModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -61,64 +61,37 @@
private static final Logger LOGGER = Logger.getLogger(InterfaceModel.class.getName());
- private final InjectionManager injectionManager;
private final Class<?> restClientClass;
private final String[] produces;
private final String[] consumes;
private final String path;
private final ClientHeadersFactory clientHeadersFactory;
private final CreationalContext<?> creationalContext;
+ private final RestClientContext context;
private final List<ClientHeaderParamModel> clientHeaders;
- private final List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories;
- private final Set<ResponseExceptionMapper> responseExceptionMappers;
- private final Set<ParamConverterProvider> paramConverterProviders;
- private final Set<InboundHeadersProvider> inboundHeadersProviders;
private final Set<Annotation> interceptorAnnotations;
- private final BeanManager beanManager;
/**
* Creates new model based on interface class. Interface is parsed according to specific annotations.
*
- * @param restClientClass interface class
- * @param responseExceptionMappers registered exception mappers
- * @param paramConverterProviders registered parameter providers
- * @param inboundHeadersProviders registered inbound header providers
- * @param asyncInterceptorFactories async interceptor factories
- * @param injectionManager
+ * @param context RestClient data context
* @return new model instance
*/
- static InterfaceModel from(Class<?> restClientClass,
- Set<ResponseExceptionMapper> responseExceptionMappers,
- Set<ParamConverterProvider> paramConverterProviders,
- Set<InboundHeadersProvider> inboundHeadersProviders,
- List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories,
- InjectionManager injectionManager,
- BeanManager beanManager) {
- return new Builder(restClientClass,
- responseExceptionMappers,
- paramConverterProviders,
- asyncInterceptorFactories,
- inboundHeadersProviders,
- injectionManager,
- beanManager).build();
+ static InterfaceModel from(RestClientContext context) {
+ return new Builder(context).build();
}
private InterfaceModel(Builder builder) {
- this.injectionManager = builder.injectionManager;
this.restClientClass = builder.restClientClass;
+ this.context = builder.context;
this.path = builder.pathValue;
this.produces = builder.produces;
this.consumes = builder.consumes;
this.clientHeaders = builder.clientHeaders;
this.clientHeadersFactory = builder.clientHeadersFactory;
- this.responseExceptionMappers = builder.responseExceptionMappers;
- this.paramConverterProviders = builder.paramConverterProviders;
this.interceptorAnnotations = builder.interceptorAnnotations;
this.creationalContext = builder.creationalContext;
- this.asyncInterceptorFactories = builder.asyncInterceptorFactories;
- this.inboundHeadersProviders = builder.inboundHeadersProviders;
- this.beanManager = builder.beanManager;
}
/**
@@ -176,39 +149,12 @@
}
/**
- * Returns {@link List} of registered {@link AsyncInvocationInterceptor}
+ * Return context of the RestClient.
*
- * @return registered async interceptors
+ * @return context
*/
- List<AsyncInvocationInterceptorFactory> getAsyncInterceptorFactories() {
- return asyncInterceptorFactories;
- }
-
- /**
- * Returns {@link Set} of registered {@link ResponseExceptionMapper}
- *
- * @return registered exception mappers
- */
- Set<ResponseExceptionMapper> getResponseExceptionMappers() {
- return responseExceptionMappers;
- }
-
- /**
- * Returns {@link Set} of registered {@link InboundHeadersProvider}
- *
- * @return registered inbound header providers
- */
- Set<InboundHeadersProvider> getInboundHeadersProviders() {
- return inboundHeadersProviders;
- }
-
- /**
- * Returns {@link Set} of registered {@link ParamConverterProvider}
- *
- * @return registered param converter providers
- */
- Set<ParamConverterProvider> getParamConverterProviders() {
- return paramConverterProviders;
+ RestClientContext context() {
+ return context;
}
/**
@@ -230,13 +176,6 @@
}
/**
- * @return
- */
- public InjectionManager getInjectionManager() {
- return injectionManager;
- }
-
- /**
* Resolves value of the method argument.
*
* @param arg actual argument value
@@ -244,7 +183,7 @@
*/
Object resolveParamValue(Object arg, Parameter parameter) {
final Iterable<ParameterUpdaterProvider> parameterUpdaterProviders
- = Providers.getAllProviders(injectionManager, ParameterUpdaterProvider.class);
+ = Providers.getAllProviders(context.injectionManager(), ParameterUpdaterProvider.class);
for (final ParameterUpdaterProvider parameterUpdaterProvider : parameterUpdaterProviders) {
if (parameterUpdaterProvider != null) {
ParameterUpdater<Object, Object> updater =
@@ -255,48 +194,28 @@
return arg;
}
- BeanManager getBeanManager() {
- return beanManager;
- }
-
private static class Builder {
private final Class<?> restClientClass;
-
- private final Set<InboundHeadersProvider> inboundHeadersProviders;
- private final InjectionManager injectionManager;
- private final BeanManager beanManager;
+ private final RestClientContext context;
private String pathValue;
private String[] produces;
private String[] consumes;
private ClientHeadersFactory clientHeadersFactory;
private CreationalContext<?> creationalContext;
private List<ClientHeaderParamModel> clientHeaders;
- private List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories;
- private Set<ResponseExceptionMapper> responseExceptionMappers;
- private Set<ParamConverterProvider> paramConverterProviders;
private Set<Annotation> interceptorAnnotations;
- private Builder(Class<?> restClientClass,
- Set<ResponseExceptionMapper> responseExceptionMappers,
- Set<ParamConverterProvider> paramConverterProviders,
- List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories,
- Set<InboundHeadersProvider> inboundHeadersProviders,
- InjectionManager injectionManager,
- BeanManager beanManager) {
- this.injectionManager = injectionManager;
- this.restClientClass = restClientClass;
- this.responseExceptionMappers = responseExceptionMappers;
- this.paramConverterProviders = paramConverterProviders;
- this.asyncInterceptorFactories = asyncInterceptorFactories;
- this.inboundHeadersProviders = inboundHeadersProviders;
- this.beanManager = beanManager;
+ private Builder(RestClientContext context) {
+ this.restClientClass = context.restClientClass();
+ this.context = context;
filterAllInterceptorAnnotations();
}
private void filterAllInterceptorAnnotations() {
creationalContext = null;
interceptorAnnotations = new HashSet<>();
+ BeanManager beanManager = context.beanManager();
if (beanManager != null) {
creationalContext = beanManager.createCreationalContext(null);
for (Annotation annotation : restClientClass.getAnnotations()) {
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/MethodModel.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/MethodModel.java
index bf671ef..9f8ebd1 100644
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/MethodModel.java
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/MethodModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -71,7 +71,9 @@
import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor;
import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptorFactory;
+import org.eclipse.microprofile.rest.client.ext.ClientHeadersFactory;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
+import org.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap;
/**
* Method model contains all information about method defined in rest client interface.
@@ -120,13 +122,9 @@
this.clientHeaders = builder.clientHeaders;
this.invocationInterceptors = builder.invocationInterceptors;
if (httpMethod.isEmpty()) {
- subResourceModel = RestClientModel.from(returnType.getRawType(),
- interfaceModel.getResponseExceptionMappers(),
- interfaceModel.getParamConverterProviders(),
- interfaceModel.getInboundHeadersProviders(),
- interfaceModel.getAsyncInterceptorFactories(),
- interfaceModel.getInjectionManager(),
- interfaceModel.getBeanManager());
+ subResourceModel = RestClientModel.from(RestClientContext.builder(returnType.getRawType())
+ .copyFrom(interfaceModel.context())
+ .build());
} else {
subResourceModel = null;
}
@@ -248,7 +246,7 @@
MultivaluedMap<String, Object> customHeaders) {
//AsyncInterceptors initialization
- List<AsyncInvocationInterceptor> asyncInterceptors = interfaceModel.getAsyncInterceptorFactories().stream()
+ List<AsyncInvocationInterceptor> asyncInterceptors = interfaceModel.context().asyncInterceptorFactories().stream()
.map(AsyncInvocationInterceptorFactory::newInterceptor)
.collect(Collectors.toList());
asyncInterceptors.forEach(AsyncInvocationInterceptor::prepareContext);
@@ -379,15 +377,18 @@
Optional<HeadersContext> headersContext = HeadersContext.get();
headersContext.ifPresent(hc -> inbound.putAll(hc.inboundHeaders()));
if (!headersContext.isPresent()) {
- for (InboundHeadersProvider provider : interfaceModel.getInboundHeadersProviders()) {
+ for (InboundHeadersProvider provider : interfaceModel.context().inboundHeadersProviders()) {
inbound.putAll(provider.inboundHeaders());
}
}
- AtomicReference<MultivaluedMap<String, String>> toReturn = new AtomicReference<>(customHeaders);
- interfaceModel.getClientHeadersFactory()
- .ifPresent(clientHeadersFactory -> toReturn.set(clientHeadersFactory.update(inbound, customHeaders)));
- return toReturn.get();
+ ImmutableMultivaluedMap<String, String> unmodif = new ImmutableMultivaluedMap<>(customHeaders);
+ if (interfaceModel.getClientHeadersFactory().isPresent()) {
+ ClientHeadersFactory factory = interfaceModel.getClientHeadersFactory().get();
+ MultivaluedMap<String, String> fromFactory = factory.update(inbound, unmodif);
+ customHeaders.putAll(fromFactory);
+ }
+ return customHeaders;
}
private <T> MultivaluedMap<String, String> createMultivaluedHeadersMap(List<ClientHeaderParamModel> clientHeaders) {
@@ -453,7 +454,7 @@
private void evaluateResponse(Response response, Method method) {
ResponseExceptionMapper lowestMapper = null;
Throwable throwable = null;
- for (ResponseExceptionMapper responseExceptionMapper : interfaceModel.getResponseExceptionMappers()) {
+ for (ResponseExceptionMapper responseExceptionMapper : interfaceModel.context().responseExceptionMappers()) {
if (responseExceptionMapper.handles(response.getStatus(), response.getHeaders())) {
if (lowestMapper == null
|| throwable == null
@@ -528,7 +529,7 @@
private void filterAllInterceptorAnnotations() {
invocationInterceptors = new ArrayList<>();
- BeanManager beanManager = interfaceModel.getBeanManager();
+ BeanManager beanManager = interfaceModel.context().beanManager();
if (beanManager != null) {
Set<Annotation> interceptorAnnotations = new HashSet<>();
for (Annotation annotation : method.getAnnotations()) {
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/QueryParamModel.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/QueryParamModel.java
index 4c0b161..0b72fe3 100644
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/QueryParamModel.java
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/QueryParamModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -17,6 +17,7 @@
package org.glassfish.jersey.microprofile.restclient;
import java.lang.annotation.Annotation;
+import java.util.Collection;
import java.util.Map;
import jakarta.ws.rs.QueryParam;
@@ -43,8 +44,10 @@
Object resolvedValue = interfaceModel.resolveParamValue(instance, parameter);
if (resolvedValue instanceof Object[]) {
requestPart.put(queryParamName, (Object[]) resolvedValue);
+ } else if (resolvedValue instanceof Collection) {
+ requestPart.put(queryParamName, ((Collection) resolvedValue).toArray());
} else {
- requestPart.put(queryParamName, new Object[] {resolvedValue});
+ requestPart.put(queryParamName, new Object[]{resolvedValue});
}
return requestPart;
}
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 c74529f..fc28447 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
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -56,9 +56,11 @@
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor;
import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptorFactory;
+import org.eclipse.microprofile.rest.client.ext.QueryParamStyle;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
import org.eclipse.microprofile.rest.client.spi.RestClientListener;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.Initializable;
import org.glassfish.jersey.client.spi.ConnectorProvider;
import org.glassfish.jersey.ext.cdi1x.internal.CdiUtil;
@@ -66,6 +68,7 @@
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.InjectionManagerSupplier;
import org.glassfish.jersey.internal.util.ReflectionHelper;
+import org.glassfish.jersey.uri.JerseyQueryParamStyle;
/**
* Rest client builder implementation. Creates proxy instance of requested interface.
@@ -81,7 +84,7 @@
private static final String CONFIG_PROVIDER_PRIORITY = "/priority";
private static final String PROVIDER_SEPARATOR = ",";
- private final Set<ResponseExceptionMapper> responseExceptionMappers;
+ private final Set<ResponseExceptionMapper<?>> responseExceptionMappers;
private final Set<ParamConverterProvider> paramConverterProviders;
private final Set<InboundHeadersProvider> inboundHeaderProviders;
private final List<AsyncInvocationInterceptorFactoryPriorityWrapper> asyncInterceptorFactories;
@@ -96,6 +99,7 @@
private KeyStore sslKeyStore;
private char[] sslKeyStorePassword;
private ConnectorProvider connector;
+ private boolean followRedirects;
RestClientBuilderImpl() {
clientBuilder = ClientBuilder.newBuilder();
@@ -154,12 +158,20 @@
processProviders(interfaceClass);
InjectionManagerExposer injectionManagerExposer = new InjectionManagerExposer();
register(injectionManagerExposer);
+ register(SseMessageBodyReader.class);
//We need to check first if default exception mapper was not disabled by property on builder.
registerExceptionMapper();
//sort all AsyncInvocationInterceptorFactory by priority
asyncInterceptorFactories.sort(Comparator.comparingInt(AsyncInvocationInterceptorFactoryPriorityWrapper::getPriority));
+ if (connector != null) {
+ ClientConfig config = new ClientConfig();
+ config.loadFrom(getConfiguration());
+ config.connectorProvider(connector);
+ clientBuilder = clientBuilder.withConfig(config); // apply config...
+ }
+ // override ClientConfig with values that have been set explicitly
clientBuilder.executorService(new ExecutorServiceWrapper(executorService.get()));
if (null != sslContext) {
@@ -178,28 +190,24 @@
clientBuilder.keyStore(sslKeyStore, sslKeyStorePassword);
}
- Client client;
- if (connector == null) {
- client = clientBuilder.build();
- } else {
- ClientConfig config = new ClientConfig();
- config.loadFrom(getConfiguration());
- config.connectorProvider(connector);
- client = ClientBuilder.newClient(config);
- }
+ Client client = clientBuilder.build();
if (client instanceof Initializable) {
((Initializable) client).preInitialize();
}
WebTarget webTarget = client.target(this.uri);
+ webTarget.property(ClientProperties.FOLLOW_REDIRECTS, followRedirects);
- RestClientModel restClientModel = RestClientModel.from(interfaceClass,
- responseExceptionMappers,
- paramConverterProviders,
- inboundHeaderProviders,
- new ArrayList<>(asyncInterceptorFactories),
- injectionManagerExposer.injectionManager,
- CdiUtil.getBeanManager());
+ RestClientContext context = RestClientContext.builder(interfaceClass)
+ .responseExceptionMappers(responseExceptionMappers)
+ .paramConverterProviders(paramConverterProviders)
+ .inboundHeadersProviders(inboundHeaderProviders)
+ .asyncInterceptorFactories(new ArrayList<>(asyncInterceptorFactories))
+ .injectionManager(injectionManagerExposer.injectionManager)
+ .beanManager(CdiUtil.getBeanManager())
+ .build();
+
+ RestClientModel restClientModel = RestClientModel.from(context);
return (T) Proxy.newProxyInstance(interfaceClass.getClassLoader(),
new Class[] {interfaceClass, AutoCloseable.class, Closeable.class},
@@ -423,6 +431,33 @@
}
}
+ @Override
+ public RestClientBuilder followRedirects(boolean followRedirects) {
+ this.followRedirects = followRedirects;
+ return this;
+ }
+
+ @Override
+ public RestClientBuilder proxyAddress(String proxyHost, int proxyPort) {
+ if (proxyHost == null) {
+ throw new IllegalArgumentException("Proxy host must not be null");
+ }
+ if (proxyPort <= 0 || proxyPort > 65535) {
+ throw new IllegalArgumentException("Invalid proxy port");
+ }
+ property(ClientProperties.PROXY_URI, proxyHost + ":" + proxyPort);
+ return this;
+ }
+
+ @Override
+ public RestClientBuilder queryParamStyle(QueryParamStyle queryParamStyle) {
+ if (queryParamStyle != null) {
+ property(ClientProperties.QUERY_PARAM_STYLE,
+ JerseyQueryParamStyle.valueOf(queryParamStyle.toString()));
+ }
+ return this;
+ }
+
private static class InjectionManagerExposer implements Feature {
InjectionManager injectionManager;
@@ -463,4 +498,4 @@
}
}
-}
+}
\ No newline at end of file
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientContext.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientContext.java
new file mode 100644
index 0000000..46d7051
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientContext.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 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
+ * 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 java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.ws.rs.ext.ParamConverterProvider;
+
+import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptor;
+import org.eclipse.microprofile.rest.client.ext.AsyncInvocationInterceptorFactory;
+import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
+import org.glassfish.jersey.internal.inject.InjectionManager;
+
+/**
+ * RestClientContext stores all of the date needed in RestClient runtime.
+ */
+class RestClientContext {
+
+ private final Class<?> restClientClass;
+ private final Set<ResponseExceptionMapper<?>> responseExceptionMappers;
+ private final Set<ParamConverterProvider> paramConverterProviders;
+ private final Set<InboundHeadersProvider> inboundHeadersProviders;
+ private final List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories;
+ private final InjectionManager injectionManager;
+ private final BeanManager beanManager;
+
+ RestClientContext(Builder builder) {
+ this.restClientClass = builder.restClientClass;
+ this.responseExceptionMappers = builder.responseExceptionMappers;
+ this.paramConverterProviders = builder.paramConverterProviders;
+ this.inboundHeadersProviders = builder.inboundHeadersProviders;
+ this.asyncInterceptorFactories = builder.asyncInterceptorFactories;
+ this.injectionManager = builder.injectionManager;
+ this.beanManager = builder.beanManager;
+ }
+
+ static Builder builder(Class<?> restClientClass) {
+ return new Builder(restClientClass);
+ }
+
+ Class<?> restClientClass() {
+ return restClientClass;
+ }
+
+ /**
+ * Return {@link Set} of registered {@link ResponseExceptionMapper}
+ *
+ * @return registered exception mappers
+ */
+ Set<ResponseExceptionMapper<?>> responseExceptionMappers() {
+ return responseExceptionMappers;
+ }
+
+ /**
+ * Returns {@link Set} of registered {@link ParamConverterProvider}
+ *
+ * @return registered param converter providers
+ */
+ Set<ParamConverterProvider> paramConverterProviders() {
+ return paramConverterProviders;
+ }
+
+ /**
+ * Returns {@link Set} of registered {@link InboundHeadersProvider}
+ *
+ * @return registered inbound header providers
+ */
+ Set<InboundHeadersProvider> inboundHeadersProviders() {
+ return inboundHeadersProviders;
+ }
+
+ /**
+ * Return {@link List} of registered {@link AsyncInvocationInterceptor}
+ *
+ * @return registered async interceptors
+ */
+ List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories() {
+ return asyncInterceptorFactories;
+ }
+
+ /**
+ * Return current {@link InjectionManager}.
+ *
+ * @return injection manager
+ */
+ InjectionManager injectionManager() {
+ return injectionManager;
+ }
+
+ /**
+ * Return current {@link BeanManager}.
+ *
+ * @return bean manager
+ */
+ BeanManager beanManager() {
+ return beanManager;
+ }
+
+ /**
+ * {@link RestClientContext} builder.
+ */
+ static class Builder {
+
+ private final Class<?> restClientClass;
+ private Set<ResponseExceptionMapper<?>> responseExceptionMappers = Collections.emptySet();
+ private Set<ParamConverterProvider> paramConverterProviders = Collections.emptySet();
+ private Set<InboundHeadersProvider> inboundHeadersProviders = Collections.emptySet();
+ private List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories = Collections.emptyList();
+ private InjectionManager injectionManager;
+ private BeanManager beanManager;
+
+ private Builder(Class<?> restClientClass) {
+ this.restClientClass = Objects.requireNonNull(restClientClass);
+ }
+
+ Builder copyFrom(RestClientContext context) {
+ responseExceptionMappers = context.responseExceptionMappers;
+ paramConverterProviders = context.paramConverterProviders;
+ inboundHeadersProviders = context.inboundHeadersProviders;
+ asyncInterceptorFactories = context.asyncInterceptorFactories;
+ injectionManager = context.injectionManager;
+ beanManager = context.beanManager;
+ return this;
+ }
+
+ Builder responseExceptionMappers(Set<ResponseExceptionMapper<?>> responseExceptionMappers) {
+ this.responseExceptionMappers = new HashSet<>(responseExceptionMappers);
+ return this;
+ }
+
+ Builder paramConverterProviders(Set<ParamConverterProvider> paramConverterProviders) {
+ this.paramConverterProviders = new HashSet<>(paramConverterProviders);
+ return this;
+ }
+
+ Builder inboundHeadersProviders(Set<InboundHeadersProvider> inboundHeadersProviders) {
+ this.inboundHeadersProviders = new HashSet<>(inboundHeadersProviders);
+ return this;
+ }
+
+ Builder asyncInterceptorFactories(List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories) {
+ this.asyncInterceptorFactories = new ArrayList<>(asyncInterceptorFactories);
+ return this;
+ }
+
+ Builder injectionManager(InjectionManager injectionManager) {
+ this.injectionManager = injectionManager;
+ return this;
+ }
+
+ Builder beanManager(BeanManager beanManager) {
+ this.beanManager = beanManager;
+ return this;
+ }
+
+ RestClientContext build() {
+ return new RestClientContext(this);
+ }
+
+ }
+
+}
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientModel.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientModel.java
index ba17627..bb30b7f 100644
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientModel.java
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -46,28 +46,11 @@
/**
* Creates new instance of the {@link RestClientModel} base on interface class.
*
- * @param restClientClass rest client interface
- * @param responseExceptionMappers registered exception mappers
- * @param paramConverterProviders registered param converters
- * @param inboundHeadersProviders registered inbound header providers
- * @param asyncInterceptorFactories registered async interceptor factories
- * @param injectionManager
+ * @param context RestClient data context
* @return new instance
*/
- static RestClientModel from(Class<?> restClientClass,
- Set<ResponseExceptionMapper> responseExceptionMappers,
- Set<ParamConverterProvider> paramConverterProviders,
- Set<InboundHeadersProvider> inboundHeadersProviders,
- List<AsyncInvocationInterceptorFactory> asyncInterceptorFactories,
- InjectionManager injectionManager,
- BeanManager beanManager) {
- InterfaceModel interfaceModel = InterfaceModel.from(restClientClass,
- responseExceptionMappers,
- paramConverterProviders,
- inboundHeadersProviders,
- asyncInterceptorFactories,
- injectionManager,
- beanManager);
+ static RestClientModel from(RestClientContext context) {
+ InterfaceModel interfaceModel = InterfaceModel.from(context);
return new Builder()
.interfaceModel(interfaceModel)
.methodModels(parseMethodModels(interfaceModel))
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java
index a95e7fe..f2b3b9e 100644
--- a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/RestClientProducer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -55,6 +55,7 @@
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.rest.client.RestClientBuilder;
+import org.eclipse.microprofile.rest.client.ext.QueryParamStyle;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.glassfish.jersey.internal.util.ReflectionHelper;
@@ -83,6 +84,9 @@
private static final String CONFIG_SSL_KEY_STORE_PASSWORD = "/mp-rest/keyStorePassword";
private static final String CONFIG_SSL_HOSTNAME_VERIFIER = "/mp-rest/hostnameVerifier";
private static final String CONFIG_PROVIDERS = "/mp-rest/providers";
+ private static final String CONFIG_FOLLOW_REDIRECTS = "/mp-rest/followRedirects";
+ private static final String CONFIG_QUERY_PARAM_STYLE = "/mp-rest/queryParamStyle";
+ private static final String CONFIG_PROXY_ADDRESS = "/mp-rest/proxyAddress";
private static final String DEFAULT_KEYSTORE_TYPE = "JKS";
private static final String CLASSPATH_LOCATION = "classpath:";
private static final String FILE_LOCATION = "file:";
@@ -134,6 +138,27 @@
// Connection read timeout (if configured)
getConfigOption(Long.class, CONFIG_READ_TIMEOUT)
.ifPresent(aLong -> restClientBuilder.readTimeout(aLong, TimeUnit.MILLISECONDS));
+ getConfigOption(Boolean.class, CONFIG_FOLLOW_REDIRECTS)
+ .ifPresent(restClientBuilder::followRedirects);
+ getConfigOption(String.class, CONFIG_QUERY_PARAM_STYLE)
+ .ifPresent(value -> restClientBuilder.queryParamStyle(QueryParamStyle.valueOf(value)));
+ getConfigOption(String.class, CONFIG_PROXY_ADDRESS)
+ .ifPresent(proxy -> {
+ int index = proxy.lastIndexOf(':');
+ //If : was not found at all or it is the last character of the proxy string
+ if (index < 0 || proxy.length() - 1 == index) {
+ throw new IllegalArgumentException("Invalid proxy URI: " + proxy);
+ }
+ String proxyHost = proxy.substring(0, index);
+ int proxyPort;
+ String proxyPortStr = proxy.substring(index + 1);
+ try {
+ proxyPort = Integer.parseInt(proxyPortStr);
+ } catch (NumberFormatException nfe) {
+ throw new IllegalArgumentException("Invalid proxy port: " + proxyPortStr, nfe);
+ }
+ restClientBuilder.proxyAddress(proxyHost, proxyPort);
+ });
// Providers from configuration
addConfiguredProviders(restClientBuilder);
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java
new file mode 100644
index 0000000..d129589
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventPublisher.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * 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 java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.sse.InboundSseEvent;
+import org.glassfish.jersey.client.ChunkedInput;
+import org.glassfish.jersey.internal.PropertiesDelegate;
+import org.glassfish.jersey.internal.util.JerseyPublisher;
+import org.glassfish.jersey.media.sse.EventInput;
+import org.glassfish.jersey.media.sse.InboundEvent;
+import org.glassfish.jersey.message.MessageBodyWorkers;
+import org.reactivestreams.Publisher;
+import org.reactivestreams.Subscriber;
+
+public class SseEventPublisher extends EventInput implements Publisher<InboundEvent> {
+
+ private final Executor executor;
+ private final Type genericType;
+ private final JerseyPublisher<Object> publisher;
+
+ /**
+ * Package-private constructor used by the
+ * {@link org.glassfish.jersey.microprofile.restclient.SseMessageBodyReader}.
+ *
+ * @param inputStream response input stream.
+ * @param annotations annotations associated with response entity.
+ * @param mediaType response entity media type.
+ * @param headers response headers.
+ * @param messageBodyWorkers message body workers.
+ * @param propertiesDelegate properties delegate for this request/response.
+ */
+ SseEventPublisher(InputStream inputStream,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType,
+ MultivaluedMap<String, String> headers,
+ MessageBodyWorkers messageBodyWorkers,
+ PropertiesDelegate propertiesDelegate,
+ ExecutorService executor) {
+ super(inputStream, annotations, mediaType, headers, messageBodyWorkers, propertiesDelegate);
+
+ this.executor = executor;
+ this.genericType = genericType;
+ this.publisher = new JerseyPublisher<>(executor::submit, JerseyPublisher.PublisherStrategy.BEST_EFFORT);
+ }
+
+ private static final Logger LOG = Logger.getLogger(SseEventPublisher.class.getName());
+
+ /**
+ * Request {@link SseEventPublisher} to start streaming data.
+ *
+ * Each {@link SseEventSubscription} will work for only a single
+ * {@link Subscriber}. If the {@link SseEventPublisher} rejects the
+ * subscription attempt or otherwise fails it will signal the error via
+ * {@link Subscriber#onError(Throwable)}.
+ *
+ * @param subscriber the {@link Subscriber} that will consume signals from
+ * the {@link SseEventPublisher}
+ */
+ @Override
+ public void subscribe(Subscriber subscriber) {
+ if (subscriber == null) {
+ throw new NullPointerException("The subscriber is `null`");
+ }
+ this.publisher.subscribe(new SseEventSuscriber(subscriber));
+
+ Runnable readEventTask = () -> {
+ Type typeArgument;
+ if (genericType instanceof ParameterizedType) {
+ typeArgument = ((ParameterizedType) genericType).getActualTypeArguments()[0];
+ ChunkedInput<InboundEvent> input = SseEventPublisher.this;
+ try {
+ InboundSseEvent event;
+ // org.reactivestreams.Publisher<javax.ws.rs.sse.InboundSseEvent>
+ if (typeArgument.equals(InboundSseEvent.class)) {
+ while ((event = input.read()) != null) {
+ this.publisher.publish(event);
+ }
+ } else {
+ // Read event data as a given Java type e.g org.reactivestreams.Publisher<CustomEvent>
+ while ((event = input.read()) != null) {
+ this.publisher.publish(event.readData((Class) typeArgument));
+ }
+ }
+ } catch (Throwable t) {
+ subscriber.onError(t);
+ return;
+ }
+ this.publisher.close();
+ }
+ };
+ try {
+ executor.execute(readEventTask);
+ } catch (RejectedExecutionException ex) {
+ LOG.log(Level.WARNING, "Executor {0} rejected emit event task", executor);
+ }
+ }
+
+}
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSubscription.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSubscription.java
new file mode 100644
index 0000000..18dbf4c
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSubscription.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * 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.glassfish.jersey.internal.jsr166.Flow;
+import java.util.logging.Logger;
+import org.reactivestreams.Subscriber;
+import org.reactivestreams.Subscription;
+
+/**
+ * A {@link SseEventSubscription} represents a one-to-one life-cycle of a
+ * {@link Subscriber} subscribing to a {@link SseEventPublisher}.
+ *
+ * @param <T> the type of event
+ */
+public class SseEventSubscription<T> implements Subscription {
+
+ private final Subscriber subscriber;
+ private final Flow.Subscription subscription;
+
+ SseEventSubscription(Subscriber<T> subscriber, Flow.Subscription subscription) {
+ this.subscriber = subscriber;
+ this.subscription = subscription;
+ }
+
+ /**
+ * No events will be sent by a {@link SseEventPublisher} until demand is
+ * signaled via {@link SseEventSubscription#request} method.
+ *
+ * @param n the strictly positive number of elements to requests to the
+ * {@link SseEventPublisher}
+ */
+ @Override
+ public void request(long n) {
+ if (n > 0) {
+ subscription.request(n);
+ } else {
+ cancel();
+ subscriber.onError(
+ new IllegalArgumentException(
+ "Request must be positive number " + n
+ )
+ );
+ }
+ }
+
+ /**
+ * Request the {@link SseEventPublisher} to stop sending data and clean up
+ * resources.
+ *
+ * Data may still be sent to meet previously signaled demand after calling
+ * cancel.
+ */
+ @Override
+ public void cancel() {
+ subscription.cancel();
+ }
+
+}
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSuscriber.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSuscriber.java
new file mode 100644
index 0000000..da628a0
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseEventSuscriber.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * 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.reactivestreams.Subscriber;
+import org.reactivestreams.Subscription;
+import org.glassfish.jersey.internal.jsr166.Flow;
+
+public class SseEventSuscriber<T> implements Flow.Subscriber<T> {
+
+ private final Subscriber<T> subscriber;
+ private Subscription subscription;
+
+ public SseEventSuscriber(Subscriber<T> subscriber) {
+ this.subscriber = subscriber;
+ }
+
+ @Override
+ public void onSubscribe(final Flow.Subscription flowsubscription) {
+ subscription = new SseEventSubscription<T>(subscriber, flowsubscription);
+ subscriber.onSubscribe(subscription);
+ }
+
+ @Override
+ public void onNext(final T item) {
+ subscriber.onNext(item);
+ }
+
+ @Override
+ public void onError(final Throwable t) {
+ // As per Reactive Streams Rule 2.13, we need to throw a `java.lang.NullPointerException` if the `Throwable` is `null`
+ if (t == null) {
+ throw new NullPointerException("Reactive Streams Rule 2.13 violated: The received error is `null`");
+ }
+ subscriber.onError(t);
+ }
+
+ @Override
+ public void onComplete() {
+ subscriber.onComplete();
+ }
+
+ /**
+ * Get reference to subscriber's {@link Flow.Subscription}.
+ *
+ * @return subscriber's {@code subscription}
+ */
+ Subscription getSubscription() {
+ return this.subscription;
+ }
+}
diff --git a/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseMessageBodyReader.java b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseMessageBodyReader.java
new file mode 100644
index 0000000..6bf3fc3
--- /dev/null
+++ b/ext/microprofile/mp-rest-client/src/main/java/org/glassfish/jersey/microprofile/restclient/SseMessageBodyReader.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+ * 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 java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.concurrent.ExecutorService;
+import javax.inject.Inject;
+import javax.inject.Provider;
+import javax.ws.rs.ConstrainedTo;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.Providers;
+import org.glassfish.jersey.internal.PropertiesDelegate;
+import org.glassfish.jersey.media.sse.InboundEvent;
+import org.glassfish.jersey.message.MessageBodyWorkers;
+import org.glassfish.jersey.message.internal.ReaderInterceptorExecutor;
+import org.reactivestreams.Publisher;
+
+@Consumes(MediaType.SERVER_SENT_EVENTS)
+@ConstrainedTo(RuntimeType.CLIENT)
+public class SseMessageBodyReader implements MessageBodyReader<Publisher<InboundEvent>> {
+
+ @Context
+ protected Providers providers;
+
+ @Inject
+ private Provider<MessageBodyWorkers> messageBodyWorkers;
+
+ @Inject
+ private Provider<PropertiesDelegate> propertiesDelegateProvider;
+
+ @Inject
+ private Provider<ExecutorService> executorServiceProvider;
+
+ @Override
+ public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
+ return Publisher.class.isAssignableFrom(type)
+ && MediaType.SERVER_SENT_EVENTS_TYPE.isCompatible(mediaType);
+ }
+
+ @Override
+ public Publisher<InboundEvent> readFrom(Class<Publisher<InboundEvent>> chunkedInputClass,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType,
+ MultivaluedMap<String, String> headers,
+ InputStream inputStream) throws IOException, WebApplicationException {
+ InputStream closeableInputStream = ReaderInterceptorExecutor.closeableInputStream(inputStream);
+ return new SseEventPublisher(
+ closeableInputStream,
+ genericType,
+ annotations,
+ mediaType,
+ headers,
+ messageBodyWorkers.get(),
+ propertiesDelegateProvider.get(),
+ executorServiceProvider.get()
+ );
+ }
+}
diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml
index 0c45e19..6bc3d24 100644
--- a/ext/microprofile/pom.xml
+++ b/ext/microprofile/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 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
diff --git a/ext/mvc-bean-validation/pom.xml b/ext/mvc-bean-validation/pom.xml
index 69b4306..a030400 100644
--- a/ext/mvc-bean-validation/pom.xml
+++ b/ext/mvc-bean-validation/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/ext/mvc-freemarker/pom.xml b/ext/mvc-freemarker/pom.xml
index 55af665..029cbd0 100644
--- a/ext/mvc-freemarker/pom.xml
+++ b/ext/mvc-freemarker/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- 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
@@ -56,7 +56,7 @@
</build>
<dependencies>
-
+
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
@@ -69,7 +69,7 @@
<version>${servlet5.version}</version>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-mvc</artifactId>
diff --git a/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java b/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
index a97d223..75e736a 100644
--- a/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
+++ b/ext/mvc-freemarker/src/main/java/org/glassfish/jersey/server/mvc/freemarker/FreemarkerDefaultConfigurationFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/ext/mvc-jsp/pom.xml b/ext/mvc-jsp/pom.xml
index df07301..1235bbc 100644
--- a/ext/mvc-jsp/pom.xml
+++ b/ext/mvc-jsp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- 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
diff --git a/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/Include.java b/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/Include.java
index 127ff7c..cdf2747 100644
--- a/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/Include.java
+++ b/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/Include.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/RequestDispatcherWrapper.java b/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/RequestDispatcherWrapper.java
index a31400a..87ccccb 100644
--- a/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/RequestDispatcherWrapper.java
+++ b/ext/mvc-jsp/src/main/java/org/glassfish/jersey/server/mvc/jsp/RequestDispatcherWrapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml
index 4791e41..012bb36 100644
--- a/ext/mvc-mustache/pom.xml
+++ b/ext/mvc-mustache/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/ext/mvc/pom.xml b/ext/mvc/pom.xml
index 48d215c..168afa7 100644
--- a/ext/mvc/pom.xml
+++ b/ext/mvc/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/ext/pom.xml b/ext/pom.xml
index 009c92b..c4f3784 100644
--- a/ext/pom.xml
+++ b/ext/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml
index 1721fde..3aef094 100644
--- a/ext/proxy-client/pom.xml
+++ b/ext/proxy-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- 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
diff --git a/ext/rx/pom.xml b/ext/rx/pom.xml
index 44f007f..6b88f86 100644
--- a/ext/rx/pom.xml
+++ b/ext/rx/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml
index 02458e0..a753c89 100644
--- a/ext/rx/rx-client-guava/pom.xml
+++ b/ext/rx/rx-client-guava/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/rx/rx-client-rxjava/pom.xml b/ext/rx/rx-client-rxjava/pom.xml
index 71d9189..28b3cab 100644
--- a/ext/rx/rx-client-rxjava/pom.xml
+++ b/ext/rx/rx-client-rxjava/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml
index c2124af..ad824b8 100644
--- a/ext/rx/rx-client-rxjava2/pom.xml
+++ b/ext/rx/rx-client-rxjava2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/ext/spring4/pom.xml b/ext/spring4/pom.xml
index b9105ad..9e7b5c7 100644
--- a/ext/spring4/pom.xml
+++ b/ext/spring4/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/ext/spring4/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java b/ext/spring4/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java
index 018de18..42a2eee 100644
--- a/ext/spring4/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.java
+++ b/ext/spring4/src/main/java/org/glassfish/jersey/server/spring/SpringComponentProvider.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
diff --git a/ext/spring5/pom.xml b/ext/spring5/pom.xml
index faa243c..ab7ae54 100644
--- a/ext/spring5/pom.xml
+++ b/ext/spring5/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml
index a2fb48c..d742e7d 100644
--- a/ext/wadl-doclet/pom.xml
+++ b/ext/wadl-doclet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml
index dbc093d..c7cdc27 100644
--- a/incubator/declarative-linking/pom.xml
+++ b/incubator/declarative-linking/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/incubator/gae-integration/pom.xml b/incubator/gae-integration/pom.xml
index 0729586..bb02256 100644
--- a/incubator/gae-integration/pom.xml
+++ b/incubator/gae-integration/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml
index d3eacc0..9a778b3 100644
--- a/incubator/html-json/pom.xml
+++ b/incubator/html-json/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml
index 43d687b..3e7eda6 100644
--- a/incubator/kryo/pom.xml
+++ b/incubator/kryo/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/incubator/open-tracing/pom.xml b/incubator/open-tracing/pom.xml
index da77b12..dc74700 100644
--- a/incubator/open-tracing/pom.xml
+++ b/incubator/open-tracing/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/incubator/pom.xml b/incubator/pom.xml
index 90fe57d..7228557 100644
--- a/incubator/pom.xml
+++ b/incubator/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml
index 3baa62f..580350f 100644
--- a/inject/cdi2-se/pom.xml
+++ b/inject/cdi2-se/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index bcaa771..0e94b18 100644
--- a/inject/hk2/pom.xml
+++ b/inject/hk2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/inject/pom.xml b/inject/pom.xml
index ad9e45b..7e39ebd 100644
--- a/inject/pom.xml
+++ b/inject/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlInputFactoryInjectionProvider.java b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlInputFactoryInjectionProvider.java
index 7ca2fab..99aacb3 100644
--- a/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlInputFactoryInjectionProvider.java
+++ b/media/jaxb/src/main/java/org/glassfish/jersey/jaxb/internal/XmlInputFactoryInjectionProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties b/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties
index f5886e5..9cb460f 100644
--- a/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties
+++ b/media/jaxb/src/main/resources/org/glassfish/jersey/jaxb/internal/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 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
@@ -14,6 +14,8 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
+
+
error.unmarshalling.jaxb=Error un-marshalling JAXB object of type: {0}.
error.reading.entity.missing=Missing entity.
no.param.constructor.missing=No-param constructor not found in the class [{0}].
diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml
index e46f9d5..bae44fa 100644
--- a/media/json-binding/pom.xml
+++ b/media/json-binding/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml
index 65cfca4..cbc0177 100644
--- a/media/json-jackson/pom.xml
+++ b/media/json-jackson/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml
index 79262ad..78748cc 100644
--- a/media/json-jettison/pom.xml
+++ b/media/json-jettison/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml
index 260b717..834aef8 100644
--- a/media/json-processing/pom.xml
+++ b/media/json-processing/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml
index d1ff540..b4f2a65 100644
--- a/media/multipart/pom.xml
+++ b/media/multipart/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java
index df58442..9a5edc4 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/FormDataMultiPart.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
diff --git a/media/pom.xml b/media/pom.xml
index cde2fb4..b1028e8 100644
--- a/media/pom.xml
+++ b/media/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/media/sse/pom.xml b/media/sse/pom.xml
index 3f20fe6..268aab1 100644
--- a/media/sse/pom.xml
+++ b/media/sse/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/media/sse/src/main/java/org/glassfish/jersey/media/sse/EventInput.java b/media/sse/src/main/java/org/glassfish/jersey/media/sse/EventInput.java
index e7eb359..6a4f7c7 100644
--- a/media/sse/src/main/java/org/glassfish/jersey/media/sse/EventInput.java
+++ b/media/sse/src/main/java/org/glassfish/jersey/media/sse/EventInput.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
@@ -50,7 +50,7 @@
* @param messageBodyWorkers message body workers.
* @param propertiesDelegate properties delegate for this request/response.
*/
- EventInput(InputStream inputStream,
+ protected EventInput(InputStream inputStream,
Annotation[] annotations,
MediaType mediaType,
MultivaluedMap<String, String> headers,
diff --git a/media/sse/src/main/java/org/glassfish/jersey/media/sse/InboundEvent.java b/media/sse/src/main/java/org/glassfish/jersey/media/sse/InboundEvent.java
index 5684fa5..6516420 100644
--- a/media/sse/src/main/java/org/glassfish/jersey/media/sse/InboundEvent.java
+++ b/media/sse/src/main/java/org/glassfish/jersey/media/sse/InboundEvent.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
diff --git a/pom.xml b/pom.xml
index 736c1d0..2f27a94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -456,8 +456,8 @@
All Rights Reserved. Use is subject to license terms.]]>
</bottom>
<links>
- <link>https://jax-rs.github.io/apidocs/2.1/</link>
- <link>http://hk2.java.net/nonav/hk2-api/apidocs</link>
+ <link>https://eclipse-ee4j.github.io/jaxrs-api/apidocs/2.1.6/</link>
+ <link>https://javaee.github.io/hk2/apidocs/</link>
</links>
<excludePackageNames>
*.internal.*:*.tests.*
@@ -641,7 +641,6 @@
<plugin>
<groupId>org.glassfish.copyright</groupId>
<artifactId>glassfish-copyright-maven-plugin</artifactId>
- <version>2.0</version>
<configuration>
<excludeFile>etc/config/copyright-exclude</excludeFile>
<!--svn|mercurial|git - defaults to svn-->
@@ -651,7 +650,7 @@
<!-- skip files not under SCM-->
<scmOnly>true</scmOnly>
<!-- turn off warnings -->
- <warn>true</warn>
+ <warn>false</warn>
<!-- for use with repair -->
<update>false</update>
<!-- check that year is correct -->
@@ -763,12 +762,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
+ <version>3.0.0</version>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.10.7</version>
+ <version>1.10.9</version>
</dependency>
</dependencies>
</plugin>
@@ -2041,7 +2040,7 @@
<bnd.plugin.version>2.3.6</bnd.plugin.version>
<commons-lang3.version>3.3.2</commons-lang3.version>
- <config.version>1.2.1</config.version>
+ <microprofile.config.version>2.0</microprofile.config.version>
<checkstyle.mvn.plugin.version>3.1.0</checkstyle.mvn.plugin.version>
<checkstyle.version>8.28</checkstyle.version>
<easymock.version>3.3</easymock.version>
diff --git a/security/oauth1-client/pom.xml b/security/oauth1-client/pom.xml
index 71d2309..09be3d2 100644
--- a/security/oauth1-client/pom.xml
+++ b/security/oauth1-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/security/oauth1-server/pom.xml b/security/oauth1-server/pom.xml
index d1ce9a1..5309565 100644
--- a/security/oauth1-server/pom.xml
+++ b/security/oauth1-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/security/oauth1-signature/pom.xml b/security/oauth1-signature/pom.xml
index b577661..b96a096 100644
--- a/security/oauth1-signature/pom.xml
+++ b/security/oauth1-signature/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/security/oauth2-client/pom.xml b/security/oauth2-client/pom.xml
index 2b3bb31..dc1923a 100644
--- a/security/oauth2-client/pom.xml
+++ b/security/oauth2-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/security/pom.xml b/security/pom.xml
index 76682ea..8d2e7bd 100644
--- a/security/pom.xml
+++ b/security/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml
index b3a0fea..db80a99 100644
--- a/test-framework/core/pom.xml
+++ b/test-framework/core/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/core/src/main/java/org/glassfish/jersey/test/DeploymentContext.java b/test-framework/core/src/main/java/org/glassfish/jersey/test/DeploymentContext.java
index 0954605..8a4754e 100644
--- a/test-framework/core/src/main/java/org/glassfish/jersey/test/DeploymentContext.java
+++ b/test-framework/core/src/main/java/org/glassfish/jersey/test/DeploymentContext.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/test-framework/core/src/main/java/org/glassfish/jersey/test/JerseyTest.java b/test-framework/core/src/main/java/org/glassfish/jersey/test/JerseyTest.java
index faced23..a12e982 100644
--- a/test-framework/core/src/main/java/org/glassfish/jersey/test/JerseyTest.java
+++ b/test-framework/core/src/main/java/org/glassfish/jersey/test/JerseyTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml
index d7e99c0..0db1348 100644
--- a/test-framework/maven/custom-enforcer-rules/pom.xml
+++ b/test-framework/maven/custom-enforcer-rules/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/test-framework/maven/pom.xml b/test-framework/maven/pom.xml
index 07ee5c6..5bdb5a3 100644
--- a/test-framework/maven/pom.xml
+++ b/test-framework/maven/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/memleak-test-common/pom.xml b/test-framework/memleak-test-common/pom.xml
index 32bfbed..ffef988 100644
--- a/test-framework/memleak-test-common/pom.xml
+++ b/test-framework/memleak-test-common/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/test-framework/pom.xml b/test-framework/pom.xml
index 9648220..25fbfb3 100644
--- a/test-framework/pom.xml
+++ b/test-framework/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/bundle/pom.xml b/test-framework/providers/bundle/pom.xml
index b2e3e9f..2101fb6 100644
--- a/test-framework/providers/bundle/pom.xml
+++ b/test-framework/providers/bundle/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/test-framework/providers/external/pom.xml b/test-framework/providers/external/pom.xml
index 8c49638..b219cec 100644
--- a/test-framework/providers/external/pom.xml
+++ b/test-framework/providers/external/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/grizzly2/pom.xml b/test-framework/providers/grizzly2/pom.xml
index ef3301b..efcf674 100644
--- a/test-framework/providers/grizzly2/pom.xml
+++ b/test-framework/providers/grizzly2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyTestContainerFactory.java b/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyTestContainerFactory.java
index 9b9f982..75d59d4 100644
--- a/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyTestContainerFactory.java
+++ b/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyTestContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyWebTestContainerFactory.java b/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyWebTestContainerFactory.java
index fe18042..74fa7b9 100644
--- a/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyWebTestContainerFactory.java
+++ b/test-framework/providers/grizzly2/src/main/java/org/glassfish/jersey/test/grizzly/GrizzlyWebTestContainerFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyOneWaySslWebTest.java b/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyOneWaySslWebTest.java
index cc312f2..0d39d60 100644
--- a/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyOneWaySslWebTest.java
+++ b/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyOneWaySslWebTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyTwoWaySslWebTest.java b/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyTwoWaySslWebTest.java
index fe7911f..53bb930 100644
--- a/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyTwoWaySslWebTest.java
+++ b/test-framework/providers/grizzly2/src/test/java/org/glassfish/jersey/test/grizzly/web/ssl/GrizzlyTwoWaySslWebTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/test-framework/providers/inmemory/pom.xml b/test-framework/providers/inmemory/pom.xml
index a8344e0..d263085 100644
--- a/test-framework/providers/inmemory/pom.xml
+++ b/test-framework/providers/inmemory/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/jdk-http/pom.xml b/test-framework/providers/jdk-http/pom.xml
index 4e782dc..a2bb0e8 100644
--- a/test-framework/providers/jdk-http/pom.xml
+++ b/test-framework/providers/jdk-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/netty/pom.xml b/test-framework/providers/netty/pom.xml
index 3752800..db110cf 100644
--- a/test-framework/providers/netty/pom.xml
+++ b/test-framework/providers/netty/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 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
diff --git a/test-framework/providers/pom.xml b/test-framework/providers/pom.xml
index 3ca5a55..6671a27 100644
--- a/test-framework/providers/pom.xml
+++ b/test-framework/providers/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/providers/simple/pom.xml b/test-framework/providers/simple/pom.xml
index 917b2e0..49b7e99 100644
--- a/test-framework/providers/simple/pom.xml
+++ b/test-framework/providers/simple/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/test-framework/util/pom.xml b/test-framework/util/pom.xml
index 39bfcb3..a5663ae 100644
--- a/test-framework/util/pom.xml
+++ b/test-framework/util/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/IgnoreExceptionResponseTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/IgnoreExceptionResponseTest.java
index b51e4ea..9e21b10 100644
--- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/IgnoreExceptionResponseTest.java
+++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/IgnoreExceptionResponseTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 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
diff --git a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/SslHttpUrlConnectorTest.java b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/SslHttpUrlConnectorTest.java
index 2fbab4c..3a24930 100644
--- a/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/SslHttpUrlConnectorTest.java
+++ b/tests/e2e-client/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/SslHttpUrlConnectorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/e2e-core-common/pom.xml b/tests/e2e-core-common/pom.xml
index cd50325..172e277 100644
--- a/tests/e2e-core-common/pom.xml
+++ b/tests/e2e-core-common/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/model/internal/CommonConfigTest.java b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/model/internal/CommonConfigTest.java
index 0d2cee7..e6d18a0 100644
--- a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/model/internal/CommonConfigTest.java
+++ b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/model/internal/CommonConfigTest.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
diff --git a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/uri/internal/JerseyUriBuilderTest.java b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/uri/internal/JerseyUriBuilderTest.java
index d0bcb94..755b805 100644
--- a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/uri/internal/JerseyUriBuilderTest.java
+++ b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/uri/internal/JerseyUriBuilderTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -33,6 +33,7 @@
import jakarta.ws.rs.core.PathSegment;
import jakarta.ws.rs.core.UriBuilder;
+import org.glassfish.jersey.uri.JerseyQueryParamStyle;
import org.glassfish.jersey.uri.UriComponent;
import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
@@ -1628,4 +1629,42 @@
uriBuilder.build().toString());
}
+ @Test
+ public void testQueryParamStyleCommaSeparated() {
+ checkQueryFormat("http://localhost:8080/path",
+ JerseyQueryParamStyle.COMMA_SEPARATED,
+ "key1=val1,val2,val3&key2=val1");
+ }
+
+ @Test
+ public void testQueryParamStyleArrayPairs() {
+ checkQueryFormat("http://localhost:8080/path",
+ JerseyQueryParamStyle.ARRAY_PAIRS,
+ "key1[]=val1&key1[]=val2&key2[]=val1&key1[]=val3");
+ }
+
+ @Test
+ public void testQueryParamStyleArrayPairsWithPreviouslyCreatedQuery() {
+ checkQueryFormat("http://localhost:8080/path?notArray=value",
+ JerseyQueryParamStyle.ARRAY_PAIRS,
+ "notArray=value&key1[]=val1&key1[]=val2&key2[]=val1&key1[]=val3");
+ }
+
+ @Test
+ public void testQueryParamStyleMultiPairs() {
+ checkQueryFormat("http://localhost:8080/path",
+ JerseyQueryParamStyle.MULTI_PAIRS,
+ "key1=val1&key1=val2&key2=val1&key1=val3");
+ }
+
+ private void checkQueryFormat(String fromUri, JerseyQueryParamStyle queryParamStyle, String expected) {
+ final URI uri = ((JerseyUriBuilder) UriBuilder.fromUri(fromUri))
+ .setQueryParamStyle(queryParamStyle)
+ .queryParam("key1", "val1", "val2")
+ .queryParam("key2", "val1")
+ .queryParam("key1", "val3")
+ .build();
+ Assert.assertEquals(expected, uri.getQuery());
+ }
+
}
diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/Jersey1199Test.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/Jersey1199Test.java
index a22d1e6..70fcfda 100644
--- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/Jersey1199Test.java
+++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/Jersey1199Test.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/entity/CustomJsonbVisibilityStrategy.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/entity/CustomJsonbVisibilityStrategy.java
index 398e804..7a43c20 100644
--- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/entity/CustomJsonbVisibilityStrategy.java
+++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/entity/CustomJsonbVisibilityStrategy.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
diff --git a/tests/e2e-inject/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml
index 7b69ca4..6ba3e9a 100644
--- a/tests/e2e-inject/cdi2-se/pom.xml
+++ b/tests/e2e-inject/cdi2-se/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/tests/e2e-inject/hk2/pom.xml b/tests/e2e-inject/hk2/pom.xml
index bd18406..aac4c5c 100644
--- a/tests/e2e-inject/hk2/pom.xml
+++ b/tests/e2e-inject/hk2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 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
@@ -39,4 +39,4 @@
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/e2e-inject/pom.xml b/tests/e2e-inject/pom.xml
index 7b9515e..5faf994 100644
--- a/tests/e2e-inject/pom.xml
+++ b/tests/e2e-inject/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml
index d52cb98..65872af 100644
--- a/tests/e2e-server/pom.xml
+++ b/tests/e2e-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/CompletionStageTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/CompletionStageTest.java
index acfa420..50d4255 100644
--- a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/CompletionStageTest.java
+++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/CompletionStageTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 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
diff --git a/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/ScheduledThreadPoolExecutorProviderTest.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/ScheduledThreadPoolExecutorProviderTest.java
new file mode 100644
index 0000000..1cc76a0
--- /dev/null
+++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/ScheduledThreadPoolExecutorProviderTest.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.e2e.server;
+
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.ThreadFactory;
+
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.core.Application;
+
+import org.glassfish.jersey.server.BackgroundScheduler;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.spi.ScheduledThreadPoolExecutorProvider;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+public class ScheduledThreadPoolExecutorProviderTest {
+
+ @Test
+ public void restartShutsdownScheduler() throws Exception {
+ WebContainer container = new WebContainer();
+ container.setUp();
+ container.tearDown();
+ assertNotNull(CustomScheduledThreadPoolExecutorProvider.executor);
+ assertTrue(CustomScheduledThreadPoolExecutorProvider.selfRef.isClosed());
+ assertTrue(CustomScheduledThreadPoolExecutorProvider.executor.isShutdown());
+ }
+
+ private static class WebContainer extends JerseyTest {
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(CustomScheduledThreadPoolExecutorProvider.class);
+ }
+ }
+
+ @BackgroundScheduler
+ @Singleton
+ public static class CustomScheduledThreadPoolExecutorProvider extends ScheduledThreadPoolExecutorProvider {
+
+ private static CustomScheduledThreadPoolExecutorProvider selfRef;
+ private static ScheduledThreadPoolExecutor executor;
+
+ public CustomScheduledThreadPoolExecutorProvider() {
+ this("CustomScheduledThreadPoolExecutorProvider");
+ }
+
+ public CustomScheduledThreadPoolExecutorProvider(String name) {
+ super(name);
+ CustomScheduledThreadPoolExecutorProvider.selfRef = this;
+ }
+
+ @Override
+ protected ScheduledThreadPoolExecutor createExecutor(int corePoolSize, ThreadFactory threadFactory,
+ RejectedExecutionHandler handler) {
+ executor = new ScheduledThreadPoolExecutor(5, threadFactory, handler);
+ return executor;
+ }
+ }
+}
diff --git a/tests/e2e-testng/pom.xml b/tests/e2e-testng/pom.xml
index 86a6fe2..8c51420 100644
--- a/tests/e2e-testng/pom.xml
+++ b/tests/e2e-testng/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/asm/pom.xml b/tests/integration/asm/pom.xml
index a87fdcd..d28ead4 100644
--- a/tests/integration/asm/pom.xml
+++ b/tests/integration/asm/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -54,4 +54,4 @@
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/integration/asm/src/test/java/org/glassfish/jersey/integration/asm/AnnotatedClassVisitorTest.java b/tests/integration/asm/src/test/java/org/glassfish/jersey/integration/asm/AnnotatedClassVisitorTest.java
index 041da27..74570b7 100644
--- a/tests/integration/asm/src/test/java/org/glassfish/jersey/integration/asm/AnnotatedClassVisitorTest.java
+++ b/tests/integration/asm/src/test/java/org/glassfish/jersey/integration/asm/AnnotatedClassVisitorTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
@@ -13,6 +13,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
+
package org.glassfish.jersey.integration.asm;
import jersey.repackaged.org.objectweb.asm.ClassVisitor;
diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml
index d5cf56f..5d424e7 100644
--- a/tests/integration/async-jersey-filter/pom.xml
+++ b/tests/integration/async-jersey-filter/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiApplication.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiApplication.java
index 504a386..fc33e5b 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiApplication.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiApplication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 220 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiValidationResultBinder.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiValidationResultBinder.java
index ebcbeaf..639ce81 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiValidationResultBinder.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/CdiValidationResultBinder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
index 72ec78b..a531b9a 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationResult.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationResult.java
index ff21135..2c8dc41 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationResult.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResult.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResult.java
index f5984a5..c3da62d 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResult.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
index 6bf3ab3..498f91d 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
index 1d9cc6c..2b8160f 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
new file mode 100644
index 0000000..b4d76a6
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2019, 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
+ 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
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
+ <artifactId>cdi-integration-project</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>cdi-client-on-server</artifactId>
+ <name>jersey-tests-cdi-client-on-server</name>
+ <packaging>war</packaging>
+
+ <description>CDI works on a client on a server resource</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>jakarta.ws.rs</groupId>
+ <artifactId>jakarta.ws.rs-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.interceptor</groupId>
+ <artifactId>jakarta.interceptor-api</artifactId>
+ <version>${jakarta.interceptor.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-bundle</artifactId>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-util</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-weld2-se</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld.se</groupId>
+ <artifactId>weld-se-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-cdi1x</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>run-external-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <jersey.config.test.container.factory>${external.container.factory}</jersey.config.test.container.factory>
+ <jersey.config.test.container.port>${external.container.port}</jersey.config.test.container.port>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <!-- External test container configuration is done via properties to allow overriding via command line. -->
+ <external.container.factory>org.glassfish.jersey.test.external.ExternalTestContainerFactory</external.container.factory>
+ <external.container.port>8080</external.container.port>
+ <maven.test.skip>false</maven.test.skip>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java
new file mode 100644
index 0000000..fc0c3f1
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.spi.BeanManager;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+
+@ApplicationScoped
+public class CdiClientFilter implements ClientRequestFilter {
+ @Inject
+ BeanManager beanManager;
+
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ final Response.Status status = beanManager == null ? Response.Status.INTERNAL_SERVER_ERROR : Response.Status.OK;
+ requestContext.abortWith(Response.status(status).build());
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java
new file mode 100644
index 0000000..c3f92a6
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerApplication.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import org.glassfish.jersey.server.ResourceConfig;
+
+class CdiEnabledClientOnServerApplication extends ResourceConfig {
+ CdiEnabledClientOnServerApplication() {
+ register(CdiEnabledClientOnServerResource.class);
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerResource.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerResource.java
new file mode 100644
index 0000000..c79cceb
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiEnabledClientOnServerResource.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import jakarta.enterprise.context.RequestScoped;
+import jakarta.enterprise.inject.spi.BeanManager;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Priorities;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriInfo;
+
+@RequestScoped
+@Path("/resource")
+public class CdiEnabledClientOnServerResource {
+ @Inject
+ BeanManager beanManager;
+
+ @Context
+ UriInfo uriInfo;
+
+ @Path("main")
+ @GET
+ public Response getResponse() {
+ try (Response r = ClientBuilder.newBuilder()
+ .register(CdiClientFilter.class, Priorities.USER - 500)
+ .register(CdiLowerPriorityClientFilter.class, Priorities.USER)
+ .build().target(uriInfo.getBaseUri()).path("/resource/nomain").request().get()) {
+ return Response.status(r.getStatus()).build();
+ }
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java
new file mode 100644
index 0000000..a3196f6
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+
+@ApplicationScoped
+public class CdiLowerPriorityClientFilter implements ClientRequestFilter {
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ final Response.Status status = Response.Status.fromStatusCode(503);
+ requestContext.abortWith(Response.status(status).build());
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..dc38505
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 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
+ 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
+
+-->
+
+
+<beans
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>
+
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
new file mode 100644
index 0000000..6d513ff
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.external.ExternalTestContainerFactory;
+import org.jboss.weld.environment.se.Weld;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Response;
+
+public class BeanManagerInjectedOnClientTest extends JerseyTest {
+ private Weld weld;
+
+ @Before
+ public void setup() {
+ Assume.assumeTrue(Hk2InjectionManagerFactory.isImmediateStrategy());
+ }
+
+ @Override
+ public void setUp() throws Exception {
+ if (Hk2InjectionManagerFactory.isImmediateStrategy()) {
+ if (!ExternalTestContainerFactory.class.isAssignableFrom(getTestContainerFactory().getClass())) {
+ weld = new Weld();
+ weld.initialize();
+ }
+ super.setUp();
+ }
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ if (Hk2InjectionManagerFactory.isImmediateStrategy()) {
+ if (!ExternalTestContainerFactory.class.isAssignableFrom(getTestContainerFactory().getClass())) {
+ weld.shutdown();
+ }
+ super.tearDown();
+ }
+ }
+
+ @Override
+ protected Application configure() {
+ return new CdiEnabledClientOnServerApplication();
+ }
+
+ @Test
+ public void testBeanManagerIsInjected() {
+ try (Response r = target("resource").path("main").request().get()) {
+ Assert.assertEquals(Response.Status.OK.getStatusCode(), r.getStatus());
+ System.out.println(r.readEntity(String.class));
+ }
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml
new file mode 100644
index 0000000..e51e554
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 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
+ 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
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
+ <artifactId>cdi-integration-project</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>cdi-client</artifactId>
+ <name>jersey-tests-cdi-client</name>
+
+ <description>CDI works on a client when no Jersey server dependencies</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>jakarta.ws.rs</groupId>
+ <artifactId>jakarta.ws.rs-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld.se</groupId>
+ <artifactId>weld-se-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-cdi1x</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>${skip.tests}</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java b/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java
new file mode 100644
index 0000000..641cf2c
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiClientFilter.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.spi.BeanManager;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+
+@ApplicationScoped
+public class CdiClientFilter implements ClientRequestFilter {
+ @Inject
+ BeanManager beanManager;
+
+ @Context
+ HttpHeaders headers;
+
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ final Response.Status status = beanManager == null ? Response.Status.INTERNAL_SERVER_ERROR : Response.Status.OK;
+ requestContext.abortWith(Response.status(status).build());
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java b/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java
new file mode 100644
index 0000000..a3196f6
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/main/java/org/glassfish/jersey/tests/cdi/client/CdiLowerPriorityClientFilter.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+
+@ApplicationScoped
+public class CdiLowerPriorityClientFilter implements ClientRequestFilter {
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ final Response.Status status = Response.Status.fromStatusCode(503);
+ requestContext.abortWith(Response.status(status).build());
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-client/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-client/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..27909ad
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 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
+ 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
+
+-->
+
+<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
+ bean-discovery-mode="annotated">
+</beans>
+
diff --git a/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
new file mode 100644
index 0000000..bec10aa
--- /dev/null
+++ b/tests/integration/cdi-integration/cdi-client/src/test/java/org/glassfish/jersey/tests/cdi/client/BeanManagerInjectedOnClientTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.cdi.client;
+
+import org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory;
+import org.glassfish.jersey.internal.util.ReflectionHelper;
+import org.jboss.weld.environment.se.Weld;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import jakarta.ws.rs.Priorities;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Response;
+import java.security.AccessController;
+
+public class BeanManagerInjectedOnClientTest {
+ private static Weld weld;
+
+ @BeforeAll
+ public static void setup() {
+ Assumptions.assumeTrue(Hk2InjectionManagerFactory.isImmediateStrategy());
+ weld = new Weld();
+ weld.initialize();
+ }
+
+ @AfterAll
+ public static void tearDown() throws Exception {
+ if (Hk2InjectionManagerFactory.isImmediateStrategy()) {
+ weld.shutdown();
+ }
+ }
+
+ @Test
+ public void testBeanManagerIsInjected() {
+ // test that there is no server is available
+
+ final String serverComponentProvider = "org.glassfish.jersey.server.spi.ComponentProvider";
+ final Class<?> aClass = AccessController.doPrivileged(ReflectionHelper.classForNamePA(serverComponentProvider));
+ Assertions.assertNull(aClass);
+
+ // test CDI injection
+ try (Response r = ClientBuilder.newClient()
+ .register(CdiClientFilter.class, Priorities.USER - 500)
+ .register(CdiLowerPriorityClientFilter.class, Priorities.USER)
+ .target("http://localhost:8080/abort").request().get()) {
+ Assertions.assertEquals(Response.Status.OK.getStatusCode(), r.getStatus());
+ }
+ }
+}
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
index fb5dca1..5cc62c5 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/BasicTimer.java b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/BasicTimer.java
index 5d11aad..c7b9be6 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/BasicTimer.java
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/BasicTimer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 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
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbSingletonTimer.java b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbSingletonTimer.java
index 6ce5534..ad2020d 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbSingletonTimer.java
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbSingletonTimer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbStatelessTimer.java b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbStatelessTimer.java
index 917fe1b..b54209e 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbStatelessTimer.java
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/EjbStatelessTimer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/web.xml
index 71e6b6e..f979ac1 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
index c91035d..2890122 100644
--- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/web.xml
index 71e6b6e..f979ac1 100644
--- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/Fooed.java b/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/Fooed.java
index 6b7d9c3..923a83c 100644
--- a/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/Fooed.java
+++ b/tests/integration/cdi-integration/cdi-log-check/src/main/java/org/glassfish/jersey/tests/cdi/resources/Fooed.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
index bd18147..a8289d2 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
+++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -16,6 +16,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -77,4 +78,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
index dbdbefc..0c2d8d4 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
index 5bc33e3..99f073a 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
index 3b46d69..449fa1c 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-multimodule/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/pom.xml
index 19c41d5..189f626 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
index b3828e4..8ffa7f3 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
index 741e9c7..9220145 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
index e577d36..a54e94c 100644
--- a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
index aaf0547..c8df7fe 100644
--- a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JCDIBeanExceptionMapper.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JCDIBeanExceptionMapper.java
index 991cd2a..7e8885b 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JCDIBeanExceptionMapper.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JCDIBeanExceptionMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanDependentException.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanDependentException.java
index 73e837a..8b4fa1d 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanDependentException.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanDependentException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanException.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanException.java
index 2b80a0c..db49d4d 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanException.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JDCIBeanException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedBean.java b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedBean.java
index c9a3e1f..85312e0 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedBean.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/java/org/glassfish/jersey/tests/cdi/resources/JaxRsInjectedBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/web.xml
index ff67ca5..408b7e8 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java
index 704276c..7e46592 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/test/java/org/glassfish/jersey/tests/cdi/resources/ConstructorInjectionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
index 446dcaf..579da31 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/web.xml
index ff67ca5..408b7e8 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
index 90987fa..2f9e905 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/web.xml
index ff67ca5..408b7e8 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
index 4d9513c..c3c7849 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
index 07df368..14ea61e 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/web.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/web.xml
index ff67ca5..408b7e8 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 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
diff --git a/tests/integration/cdi-integration/pom.xml b/tests/integration/cdi-integration/pom.xml
index f895f34..afc6b5f 100644
--- a/tests/integration/cdi-integration/pom.xml
+++ b/tests/integration/cdi-integration/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -16,6 +16,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -32,6 +33,8 @@
<name>cdi-integration-project</name>
<modules>
<module>cdi-beanvalidation-webapp</module>
+ <module>cdi-client</module>
+ <module>cdi-client-on-server</module>
<module>cdi-ejb-test-webapp</module>
<module>cdi-iface-with-non-jaxrs-impl-test-webapp</module>
<module>cdi-manually-bound</module>
@@ -55,4 +58,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml
index 22ef2dc..19579b2 100644
--- a/tests/integration/client-connector-provider/pom.xml
+++ b/tests/integration/client-connector-provider/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule-reload/ear/pom.xml b/tests/integration/ejb-multimodule-reload/ear/pom.xml
index b9e4f2e..7a2ba1b 100644
--- a/tests/integration/ejb-multimodule-reload/ear/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/ear/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule-reload/lib/pom.xml b/tests/integration/ejb-multimodule-reload/lib/pom.xml
index 442d9c3..af81403 100644
--- a/tests/integration/ejb-multimodule-reload/lib/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/lib/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule-reload/lib/src/main/java/org/glassfish/jersey/tests/integration/multimodule/ejb/reload/lib/EjbReloaderService.java b/tests/integration/ejb-multimodule-reload/lib/src/main/java/org/glassfish/jersey/tests/integration/multimodule/ejb/reload/lib/EjbReloaderService.java
index 0800c85..17cead7 100644
--- a/tests/integration/ejb-multimodule-reload/lib/src/main/java/org/glassfish/jersey/tests/integration/multimodule/ejb/reload/lib/EjbReloaderService.java
+++ b/tests/integration/ejb-multimodule-reload/lib/src/main/java/org/glassfish/jersey/tests/integration/multimodule/ejb/reload/lib/EjbReloaderService.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/integration/ejb-multimodule-reload/pom.xml b/tests/integration/ejb-multimodule-reload/pom.xml
index 077e85b..a37d861 100644
--- a/tests/integration/ejb-multimodule-reload/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule-reload/war1/pom.xml b/tests/integration/ejb-multimodule-reload/war1/pom.xml
index 9121af4..68ba110 100644
--- a/tests/integration/ejb-multimodule-reload/war1/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/war1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule-reload/war2/pom.xml b/tests/integration/ejb-multimodule-reload/war2/pom.xml
index 57ea8ec..ce3e0c3 100644
--- a/tests/integration/ejb-multimodule-reload/war2/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/war2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/ejb-multimodule/ear/pom.xml b/tests/integration/ejb-multimodule/ear/pom.xml
index 34f86e2..64a4091 100644
--- a/tests/integration/ejb-multimodule/ear/pom.xml
+++ b/tests/integration/ejb-multimodule/ear/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/ejb-multimodule/lib/pom.xml b/tests/integration/ejb-multimodule/lib/pom.xml
index 4090ebd..4a2170d 100644
--- a/tests/integration/ejb-multimodule/lib/pom.xml
+++ b/tests/integration/ejb-multimodule/lib/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/ejb-multimodule/pom.xml b/tests/integration/ejb-multimodule/pom.xml
index e18f402..a853118 100644
--- a/tests/integration/ejb-multimodule/pom.xml
+++ b/tests/integration/ejb-multimodule/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/ejb-multimodule/war/pom.xml b/tests/integration/ejb-multimodule/war/pom.xml
index bbb012c..700e2e7 100644
--- a/tests/integration/ejb-multimodule/war/pom.xml
+++ b/tests/integration/ejb-multimodule/war/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/ejb-test-webapp/pom.xml b/tests/integration/ejb-test-webapp/pom.xml
index 581c2a7..e0de691 100644
--- a/tests/integration/ejb-test-webapp/pom.xml
+++ b/tests/integration/ejb-test-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterBean.java b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterBean.java
index 289f97d..c20c823 100644
--- a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterBean.java
+++ b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/CounterBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/Echo.java b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/Echo.java
index 135f682..eac755b 100644
--- a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/Echo.java
+++ b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/Echo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/EchoBean.java b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/EchoBean.java
index 77991e9..5176b0a 100644
--- a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/EchoBean.java
+++ b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/EchoBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/StandaloneServlet.java b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/StandaloneServlet.java
index 59967dd..af6dd89 100644
--- a/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/StandaloneServlet.java
+++ b/tests/integration/ejb-test-webapp/src/main/java/org/glassfish/jersey/tests/ejb/resources/StandaloneServlet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/j-376/src/main/java/org/glassfish/jersey/tests/integration/j376/SecondBean.java b/tests/integration/j-376/src/main/java/org/glassfish/jersey/tests/integration/j376/SecondBean.java
index d7c2582..1bfcb0c 100644
--- a/tests/integration/j-376/src/main/java/org/glassfish/jersey/tests/integration/j376/SecondBean.java
+++ b/tests/integration/j-376/src/main/java/org/glassfish/jersey/tests/integration/j376/SecondBean.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/integration/j-441/ear/pom.xml b/tests/integration/j-441/ear/pom.xml
index b1a6830..685e244 100644
--- a/tests/integration/j-441/ear/pom.xml
+++ b/tests/integration/j-441/ear/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/j-441/pom.xml b/tests/integration/j-441/pom.xml
index 5abfedf..971d45c 100644
--- a/tests/integration/j-441/pom.xml
+++ b/tests/integration/j-441/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/j-441/war1/pom.xml b/tests/integration/j-441/war1/pom.xml
index 8414fc5..4f93886 100644
--- a/tests/integration/j-441/war1/pom.xml
+++ b/tests/integration/j-441/war1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/j-441/war2/pom.xml b/tests/integration/j-441/war2/pom.xml
index 6c14751..a08e17d 100644
--- a/tests/integration/j-441/war2/pom.xml
+++ b/tests/integration/j-441/war2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/j-59/ear/pom.xml b/tests/integration/j-59/ear/pom.xml
index dcc7cad..ef96aa3 100644
--- a/tests/integration/j-59/ear/pom.xml
+++ b/tests/integration/j-59/ear/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/j-59/lib/pom.xml b/tests/integration/j-59/lib/pom.xml
index 730f726..4f4290b 100644
--- a/tests/integration/j-59/lib/pom.xml
+++ b/tests/integration/j-59/lib/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/j-59/lib/src/main/java/org/glassfish/jersey/tests/integration/j59/ejb/lib/LocalBeanWithRemoteInterface.java b/tests/integration/j-59/lib/src/main/java/org/glassfish/jersey/tests/integration/j59/ejb/lib/LocalBeanWithRemoteInterface.java
index 92d6dff..83b9073 100644
--- a/tests/integration/j-59/lib/src/main/java/org/glassfish/jersey/tests/integration/j59/ejb/lib/LocalBeanWithRemoteInterface.java
+++ b/tests/integration/j-59/lib/src/main/java/org/glassfish/jersey/tests/integration/j59/ejb/lib/LocalBeanWithRemoteInterface.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
diff --git a/tests/integration/j-59/pom.xml b/tests/integration/j-59/pom.xml
index 56e1eee..f1a51cc 100644
--- a/tests/integration/j-59/pom.xml
+++ b/tests/integration/j-59/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/j-59/war/pom.xml b/tests/integration/j-59/war/pom.xml
index 0484e2b..5743c61 100644
--- a/tests/integration/j-59/war/pom.xml
+++ b/tests/integration/j-59/war/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jaxrs-component-inject/pom.xml b/tests/integration/jaxrs-component-inject/pom.xml
index dd84a66..4984111 100644
--- a/tests/integration/jaxrs-component-inject/pom.xml
+++ b/tests/integration/jaxrs-component-inject/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2020 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
diff --git a/tests/integration/jersey-1107/pom.xml b/tests/integration/jersey-1107/pom.xml
index 3a71dc1..96b953d 100644
--- a/tests/integration/jersey-1107/pom.xml
+++ b/tests/integration/jersey-1107/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/jersey-1223/pom.xml b/tests/integration/jersey-1223/pom.xml
index 076fc61..b36bf24 100644
--- a/tests/integration/jersey-1223/pom.xml
+++ b/tests/integration/jersey-1223/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml
index 77c7b5c..aff35ea 100644
--- a/tests/integration/jersey-1604/pom.xml
+++ b/tests/integration/jersey-1604/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1667/pom.xml b/tests/integration/jersey-1667/pom.xml
index e863e54..caf5240 100644
--- a/tests/integration/jersey-1667/pom.xml
+++ b/tests/integration/jersey-1667/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1829/pom.xml b/tests/integration/jersey-1829/pom.xml
index d58669e..c95e0b2 100644
--- a/tests/integration/jersey-1829/pom.xml
+++ b/tests/integration/jersey-1829/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1883/pom.xml b/tests/integration/jersey-1883/pom.xml
index 865a832..a1af8ff 100644
--- a/tests/integration/jersey-1883/pom.xml
+++ b/tests/integration/jersey-1883/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-1928/pom.xml b/tests/integration/jersey-1928/pom.xml
index 7d5869e..40d6caa 100644
--- a/tests/integration/jersey-1928/pom.xml
+++ b/tests/integration/jersey-1928/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1960/pom.xml b/tests/integration/jersey-1960/pom.xml
index aaf904c..4787ec8 100644
--- a/tests/integration/jersey-1960/pom.xml
+++ b/tests/integration/jersey-1960/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-1964/pom.xml b/tests/integration/jersey-1964/pom.xml
index abcb6a0..8f203f7 100644
--- a/tests/integration/jersey-1964/pom.xml
+++ b/tests/integration/jersey-1964/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2136/pom.xml b/tests/integration/jersey-2136/pom.xml
index 8d4c898..1cf9a81 100644
--- a/tests/integration/jersey-2136/pom.xml
+++ b/tests/integration/jersey-2136/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2137/pom.xml b/tests/integration/jersey-2137/pom.xml
index 23b94eb..7fc7b92 100644
--- a/tests/integration/jersey-2137/pom.xml
+++ b/tests/integration/jersey-2137/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2137/src/main/java/org/glassfish/jersey/tests/integration/jersey2137/Account.java b/tests/integration/jersey-2137/src/main/java/org/glassfish/jersey/tests/integration/jersey2137/Account.java
index dbc6590..fc1441d 100644
--- a/tests/integration/jersey-2137/src/main/java/org/glassfish/jersey/tests/integration/jersey2137/Account.java
+++ b/tests/integration/jersey-2137/src/main/java/org/glassfish/jersey/tests/integration/jersey2137/Account.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2154/pom.xml b/tests/integration/jersey-2154/pom.xml
index b646b4e..3a97c87 100644
--- a/tests/integration/jersey-2154/pom.xml
+++ b/tests/integration/jersey-2154/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2160/pom.xml b/tests/integration/jersey-2160/pom.xml
index f579949..72e3d5f 100644
--- a/tests/integration/jersey-2160/pom.xml
+++ b/tests/integration/jersey-2160/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2164/pom.xml b/tests/integration/jersey-2164/pom.xml
index da52fc0..9eb532b 100644
--- a/tests/integration/jersey-2164/pom.xml
+++ b/tests/integration/jersey-2164/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2167/pom.xml b/tests/integration/jersey-2167/pom.xml
index c1f7023..2d241f4 100644
--- a/tests/integration/jersey-2167/pom.xml
+++ b/tests/integration/jersey-2167/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2176/pom.xml b/tests/integration/jersey-2176/pom.xml
index 25f3d64..d7ad02c 100644
--- a/tests/integration/jersey-2176/pom.xml
+++ b/tests/integration/jersey-2176/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2184/pom.xml b/tests/integration/jersey-2184/pom.xml
index 861cc8d..b607899 100644
--- a/tests/integration/jersey-2184/pom.xml
+++ b/tests/integration/jersey-2184/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml
index c888dca..2392270 100644
--- a/tests/integration/jersey-2255/pom.xml
+++ b/tests/integration/jersey-2255/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2322/pom.xml b/tests/integration/jersey-2322/pom.xml
index 10cb63b..5b8de17 100644
--- a/tests/integration/jersey-2322/pom.xml
+++ b/tests/integration/jersey-2322/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2335/pom.xml b/tests/integration/jersey-2335/pom.xml
index 560a211..f5fc340 100644
--- a/tests/integration/jersey-2335/pom.xml
+++ b/tests/integration/jersey-2335/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2421/pom.xml b/tests/integration/jersey-2421/pom.xml
index 5fc122a..a239661 100644
--- a/tests/integration/jersey-2421/pom.xml
+++ b/tests/integration/jersey-2421/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2551/pom.xml b/tests/integration/jersey-2551/pom.xml
index 9569e00..7a982aa 100644
--- a/tests/integration/jersey-2551/pom.xml
+++ b/tests/integration/jersey-2551/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2612/pom.xml b/tests/integration/jersey-2612/pom.xml
index 806d379..ea86ae2 100644
--- a/tests/integration/jersey-2612/pom.xml
+++ b/tests/integration/jersey-2612/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/jersey-2637/pom.xml b/tests/integration/jersey-2637/pom.xml
index d8860e2..e83e666 100644
--- a/tests/integration/jersey-2637/pom.xml
+++ b/tests/integration/jersey-2637/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2654/pom.xml b/tests/integration/jersey-2654/pom.xml
index 617e0b7..cba4a5e 100644
--- a/tests/integration/jersey-2654/pom.xml
+++ b/tests/integration/jersey-2654/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2673/pom.xml b/tests/integration/jersey-2673/pom.xml
index b57d732..866cb3f 100644
--- a/tests/integration/jersey-2673/pom.xml
+++ b/tests/integration/jersey-2673/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2689/pom.xml b/tests/integration/jersey-2689/pom.xml
index ca60523..936f2ae 100644
--- a/tests/integration/jersey-2689/pom.xml
+++ b/tests/integration/jersey-2689/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/jersey-2704/pom.xml b/tests/integration/jersey-2704/pom.xml
index c5c9c4d..4fac5ad 100644
--- a/tests/integration/jersey-2704/pom.xml
+++ b/tests/integration/jersey-2704/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/jersey-2704/src/main/java/org/glassfish/jersey/tests/integration/jersey2704/ServiceLocatorSetup.java b/tests/integration/jersey-2704/src/main/java/org/glassfish/jersey/tests/integration/jersey2704/ServiceLocatorSetup.java
index f2f48ac..5eda03d 100644
--- a/tests/integration/jersey-2704/src/main/java/org/glassfish/jersey/tests/integration/jersey2704/ServiceLocatorSetup.java
+++ b/tests/integration/jersey-2704/src/main/java/org/glassfish/jersey/tests/integration/jersey2704/ServiceLocatorSetup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/tests/integration/jersey-2776/pom.xml b/tests/integration/jersey-2776/pom.xml
index 1d0c4ed..340e417 100644
--- a/tests/integration/jersey-2776/pom.xml
+++ b/tests/integration/jersey-2776/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2794/pom.xml b/tests/integration/jersey-2794/pom.xml
index eca6c5b..3a0d77b 100644
--- a/tests/integration/jersey-2794/pom.xml
+++ b/tests/integration/jersey-2794/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2846/pom.xml b/tests/integration/jersey-2846/pom.xml
index 21b5b3d..2c9613a 100644
--- a/tests/integration/jersey-2846/pom.xml
+++ b/tests/integration/jersey-2846/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2878/pom.xml b/tests/integration/jersey-2878/pom.xml
index ca45d10..148c488 100644
--- a/tests/integration/jersey-2878/pom.xml
+++ b/tests/integration/jersey-2878/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-2892/pom.xml b/tests/integration/jersey-2892/pom.xml
index 253a6dd..a7c8488 100644
--- a/tests/integration/jersey-2892/pom.xml
+++ b/tests/integration/jersey-2892/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/jersey-3670/pom.xml b/tests/integration/jersey-3670/pom.xml
index de6b88b..2301761 100644
--- a/tests/integration/jersey-3670/pom.xml
+++ b/tests/integration/jersey-3670/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
diff --git a/tests/integration/jersey-3796/pom.xml b/tests/integration/jersey-3796/pom.xml
index 2ec982b..05d3291 100644
--- a/tests/integration/jersey-3796/pom.xml
+++ b/tests/integration/jersey-3796/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2018, 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
diff --git a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResource.java b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResource.java
index da4abbc..716c77e 100644
--- a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResource.java
+++ b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResource.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResourceImpl.java b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResourceImpl.java
index 802fdff..2cf7582 100644
--- a/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResourceImpl.java
+++ b/tests/integration/jersey-3992/src/main/java/org/glassfish/jersey/tests/cdi/resources/UserResourceImpl.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java b/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java
index c88a1b4..afa5d08 100644
--- a/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java
+++ b/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/CdiTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/InheritanceTest.java b/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/InheritanceTest.java
index 132a7c5..4fdde3a 100644
--- a/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/InheritanceTest.java
+++ b/tests/integration/jersey-3992/src/test/java/org/glassfish/jersey/tests/cdi/resources/InheritanceTest.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyApplication.java b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyApplication.java
index 894a62b..a0e5fa5 100644
--- a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyApplication.java
+++ b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyApplication.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Christian Kaltepoth. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority100Mapper.java b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority100Mapper.java
index 15faade..5946bb0 100644
--- a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority100Mapper.java
+++ b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority100Mapper.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Christian Kaltepoth. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority200Mapper.java b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority200Mapper.java
index 7c1ce5b..c30a9a5 100644
--- a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority200Mapper.java
+++ b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyPriority200Mapper.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Christian Kaltepoth. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyResource.java b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyResource.java
index 0bbb981..791e1f7 100644
--- a/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyResource.java
+++ b/tests/integration/jersey-4099/src/main/java/org/glassfish/jersey/tests/integration/jersey4099/MyResource.java
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 Christian Kaltepoth. All rights reserved.
*
* This program and the accompanying materials are made available under the
diff --git a/tests/integration/jersey-4321/pom.xml b/tests/integration/jersey-4321/pom.xml
index 5b02a60..8138440 100644
--- a/tests/integration/jersey-4321/pom.xml
+++ b/tests/integration/jersey-4321/pom.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Christian Kaltepoth. All rights reserved.
+ Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019 Christian Kaltepoth. 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
@@ -16,6 +17,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -66,4 +68,4 @@
</dependency>
</dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/integration/jersey-4722/pom.xml b/tests/integration/jersey-4722/pom.xml
new file mode 100644
index 0000000..2748c6e
--- /dev/null
+++ b/tests/integration/jersey-4722/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 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
+ 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
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>project</artifactId>
+ <groupId>org.glassfish.jersey.tests.integration</groupId>
+ <version>3.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <description>
+ Reproducer of JERSEY-4722.
+
+ When jersey-media-jaxb is not on a classpath, the providers for */* media types are not available.
+ But they are not needed for void return type and/or when no entity argument.
+ </description>
+
+ <artifactId>jersey-4722</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
+ <version>${servlet5.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-jaxb</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jakarta.xml.bind</groupId>
+ <artifactId>jakarta.xml.bind-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Application4722.java b/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Application4722.java
new file mode 100644
index 0000000..b6a34f5
--- /dev/null
+++ b/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Application4722.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.integration.jersey4722;
+
+import org.glassfish.jersey.CommonProperties;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.ServerProperties;
+
+public class Application4722 extends ResourceConfig {
+ public Application4722() {
+ register(Resource4722.class);
+ property(ServerProperties.WADL_FEATURE_DISABLE, true);
+ property(CommonProperties.PROVIDER_DEFAULT_DISABLE, "ALL");
+ }
+}
diff --git a/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Resource4722.java b/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Resource4722.java
new file mode 100644
index 0000000..4dcce45
--- /dev/null
+++ b/tests/integration/jersey-4722/src/main/java/org/glassfish/jersey/tests/integration/jersey4722/Resource4722.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.integration.jersey4722;
+
+import jakarta.ws.rs.PUT;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.UriInfo;
+
+@Path("/")
+public class Resource4722 {
+ @PUT
+ public void test(@Context UriInfo uriInfo) {
+ // return 204
+ }
+}
diff --git a/tests/integration/jersey-4722/src/test/java/org/glassfish/jersey/tests/integration/jersey4722/Jersey4722Test.java b/tests/integration/jersey-4722/src/test/java/org/glassfish/jersey/tests/integration/jersey4722/Jersey4722Test.java
new file mode 100644
index 0000000..35d413b
--- /dev/null
+++ b/tests/integration/jersey-4722/src/test/java/org/glassfish/jersey/tests/integration/jersey4722/Jersey4722Test.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 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
+ * 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.tests.integration.jersey4722;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.servlet.ServletContainer;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.ServletDeploymentContext;
+import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
+import org.junit.Assert;
+import org.junit.Test;
+
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+
+public class Jersey4722Test extends JerseyTest {
+ @Override
+ protected ResourceConfig configure() {
+ return new Application4722();
+ }
+
+ @Override
+ protected TestContainerFactory getTestContainerFactory() {
+ return new GrizzlyWebTestContainerFactory();
+ }
+
+ @Override
+ protected DeploymentContext configureDeployment() {
+ return ServletDeploymentContext.forServlet(new ServletContainer(configure())).build();
+ }
+
+ @Test
+ public void testDefaultProducesMediaType() {
+ try (Response response = target().request()
+ .header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON)
+ .put(Entity.entity("ENTITY", MediaType.TEXT_PLAIN_TYPE))) {
+ Assert.assertEquals(204, response.getStatus());
+ }
+ }
+
+ @Test
+ public void testDefaultConsumesMediaType() {
+ try (Response response = target().request()
+ .put(Entity.entity("ENTITY", new MediaType("TEST", "TEST415")))) {
+ Assert.assertEquals(204, response.getStatus());
+ }
+ }
+}
diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml
index c2ca9e3..5e67050 100644
--- a/tests/integration/jersey-780/pom.xml
+++ b/tests/integration/jersey-780/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/microprofile/config/webapp/src/main/resources/META-INF/microprofile-config.properties b/tests/integration/microprofile/config/webapp/src/main/resources/META-INF/microprofile-config.properties
index dbb4a93..38c1e2b 100644
--- a/tests/integration/microprofile/config/webapp/src/main/resources/META-INF/microprofile-config.properties
+++ b/tests/integration/microprofile/config/webapp/src/main/resources/META-INF/microprofile-config.properties
@@ -1,3 +1,20 @@
+#
+# Copyright (c) 2020, 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
+# 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
+#
+
+
jersey.config.disableJsonProcessing = true
jersey.config.disableAutoDiscovery=1
-jersey.config.disableMetainfServicesLookup=true
\ No newline at end of file
+jersey.config.disableMetainfServicesLookup=true
diff --git a/tests/integration/microprofile/rest-client/pom.xml b/tests/integration/microprofile/rest-client/pom.xml
index e0de2c6..a682366 100644
--- a/tests/integration/microprofile/rest-client/pom.xml
+++ b/tests/integration/microprofile/rest-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -16,6 +16,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -55,7 +56,7 @@
<dependency>
<groupId>org.eclipse.microprofile.rest.client</groupId>
<artifactId>microprofile-rest-client-tck</artifactId>
- <version>1.3.3</version>
+ <version>2.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -108,8 +109,30 @@
<artifactId>jersey-apache-connector</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ <version>${jetty.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-weld2-se</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-bom</artifactId>
+ <version>${jetty.version}</version>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<profiles>
<profile>
<id>testRunner</id>
@@ -172,4 +195,4 @@
</properties>
-</project>
\ No newline at end of file
+</project>
diff --git a/tests/integration/microprofile/rest-client/tck-suite.xml b/tests/integration/microprofile/rest-client/tck-suite.xml
index 592f136..a317e79 100644
--- a/tests/integration/microprofile/rest-client/tck-suite.xml
+++ b/tests/integration/microprofile/rest-client/tck-suite.xml
@@ -1,7 +1,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<!--
- Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 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
@@ -16,6 +16,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
+
<suite name="microprofile-rest-client-TCK" verbose="2" configfailurepolicy="continue">
<test name="microprofile-rest-client TCK">
@@ -23,6 +24,14 @@
<package name="org.eclipse.microprofile.rest.client.tck.*">
</package>
</packages>
+ <classes>
+ <class name="org.eclipse.microprofile.rest.client.tck.ProxyServerTest">
+ <methods>
+ <!--https://github.com/eclipse/microprofile-rest-client/pull/298-->
+ <exclude name="testProxy"></exclude>
+ </methods>
+ </class>
+ </classes>
</test>
-</suite>
\ No newline at end of file
+</suite>
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index cbf2d2d..437eb2c 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018 Payara Foundation and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
@@ -54,6 +54,7 @@
<module>jersey-4321</module>
<module>jersey-4507</module>
<module>jersey-4542</module>
+ <module>jersey-4722</module>
<module>microprofile</module>
<!-- <module>spring4</module>-->
<!-- <module>spring5</module>-->
diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml
index ddcca02..2d3985d 100644
--- a/tests/integration/property-check/pom.xml
+++ b/tests/integration/property-check/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/security-digest/pom.xml b/tests/integration/security-digest/pom.xml
index a1893df..0e93329 100644
--- a/tests/integration/security-digest/pom.xml
+++ b/tests/integration/security-digest/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
index 406498b..5bcd396 100644
--- a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
+++ b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
index 077e384..a528fe4 100644
--- a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
+++ b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-filter/pom.xml b/tests/integration/servlet-2.5-filter/pom.xml
index 15e8069..f00289f 100644
--- a/tests/integration/servlet-2.5-filter/pom.xml
+++ b/tests/integration/servlet-2.5-filter/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/servlet-2.5-inflector-1/pom.xml b/tests/integration/servlet-2.5-inflector-1/pom.xml
index e839789..b6a4f15 100644
--- a/tests/integration/servlet-2.5-inflector-1/pom.xml
+++ b/tests/integration/servlet-2.5-inflector-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-2.5-init-1/pom.xml b/tests/integration/servlet-2.5-init-1/pom.xml
index 5897534..c87fbb7 100644
--- a/tests/integration/servlet-2.5-init-1/pom.xml
+++ b/tests/integration/servlet-2.5-init-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-2/pom.xml b/tests/integration/servlet-2.5-init-2/pom.xml
index f666450..ebfe4c1 100644
--- a/tests/integration/servlet-2.5-init-2/pom.xml
+++ b/tests/integration/servlet-2.5-init-2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-3/pom.xml b/tests/integration/servlet-2.5-init-3/pom.xml
index 75cbb4b..843bb40 100644
--- a/tests/integration/servlet-2.5-init-3/pom.xml
+++ b/tests/integration/servlet-2.5-init-3/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-4/pom.xml b/tests/integration/servlet-2.5-init-4/pom.xml
index 85e44ab..5d02efc 100644
--- a/tests/integration/servlet-2.5-init-4/pom.xml
+++ b/tests/integration/servlet-2.5-init-4/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-5/pom.xml b/tests/integration/servlet-2.5-init-5/pom.xml
index cf409c2..81ce779 100644
--- a/tests/integration/servlet-2.5-init-5/pom.xml
+++ b/tests/integration/servlet-2.5-init-5/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-6/pom.xml b/tests/integration/servlet-2.5-init-6/pom.xml
index 663acf5..b42c351 100644
--- a/tests/integration/servlet-2.5-init-6/pom.xml
+++ b/tests/integration/servlet-2.5-init-6/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-7/pom.xml b/tests/integration/servlet-2.5-init-7/pom.xml
index 5a39d63..a789216 100644
--- a/tests/integration/servlet-2.5-init-7/pom.xml
+++ b/tests/integration/servlet-2.5-init-7/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-init-8/pom.xml b/tests/integration/servlet-2.5-init-8/pom.xml
index 865134f..b334d2a 100644
--- a/tests/integration/servlet-2.5-init-8/pom.xml
+++ b/tests/integration/servlet-2.5-init-8/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-mvc-1/pom.xml b/tests/integration/servlet-2.5-mvc-1/pom.xml
index f471dd5..fae7e51 100644
--- a/tests/integration/servlet-2.5-mvc-1/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-mvc-2/pom.xml b/tests/integration/servlet-2.5-mvc-2/pom.xml
index bc71338..8e9f2bf 100644
--- a/tests/integration/servlet-2.5-mvc-2/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-mvc-3/pom.xml b/tests/integration/servlet-2.5-mvc-3/pom.xml
index 972134a..9e1bfaf 100644
--- a/tests/integration/servlet-2.5-mvc-3/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-3/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-2.5-reload/pom.xml b/tests/integration/servlet-2.5-reload/pom.xml
index 0f61772..76abecc 100644
--- a/tests/integration/servlet-2.5-reload/pom.xml
+++ b/tests/integration/servlet-2.5-reload/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-3-async/pom.xml b/tests/integration/servlet-3-async/pom.xml
index 53fa801..1a15a19 100644
--- a/tests/integration/servlet-3-async/pom.xml
+++ b/tests/integration/servlet-3-async/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-3-chunked-io/pom.xml b/tests/integration/servlet-3-chunked-io/pom.xml
index 7cbfa56..ffd1bd0 100644
--- a/tests/integration/servlet-3-chunked-io/pom.xml
+++ b/tests/integration/servlet-3-chunked-io/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-filter/pom.xml b/tests/integration/servlet-3-filter/pom.xml
index 532c7ef..a090e95 100644
--- a/tests/integration/servlet-3-filter/pom.xml
+++ b/tests/integration/servlet-3-filter/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/servlet-3-gf-async/pom.xml b/tests/integration/servlet-3-gf-async/pom.xml
index 1abedde..8b19544 100644
--- a/tests/integration/servlet-3-gf-async/pom.xml
+++ b/tests/integration/servlet-3-gf-async/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-3-inflector-1/pom.xml b/tests/integration/servlet-3-inflector-1/pom.xml
index 0d5f3b7..e0eff7c 100644
--- a/tests/integration/servlet-3-inflector-1/pom.xml
+++ b/tests/integration/servlet-3-inflector-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-init-1/pom.xml b/tests/integration/servlet-3-init-1/pom.xml
index 038c2fa..27f7afe 100644
--- a/tests/integration/servlet-3-init-1/pom.xml
+++ b/tests/integration/servlet-3-init-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-3-init-2/pom.xml b/tests/integration/servlet-3-init-2/pom.xml
index f32eace..29a4466 100644
--- a/tests/integration/servlet-3-init-2/pom.xml
+++ b/tests/integration/servlet-3-init-2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/servlet-3-init-3/pom.xml b/tests/integration/servlet-3-init-3/pom.xml
index 62d12a8..c1219f2 100644
--- a/tests/integration/servlet-3-init-3/pom.xml
+++ b/tests/integration/servlet-3-init-3/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-init-4/pom.xml b/tests/integration/servlet-3-init-4/pom.xml
index abc5fd6..42e6007 100644
--- a/tests/integration/servlet-3-init-4/pom.xml
+++ b/tests/integration/servlet-3-init-4/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-init-5/pom.xml b/tests/integration/servlet-3-init-5/pom.xml
index c322c1a..1e711e8 100644
--- a/tests/integration/servlet-3-init-5/pom.xml
+++ b/tests/integration/servlet-3-init-5/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-init-6/pom.xml b/tests/integration/servlet-3-init-6/pom.xml
index 8190d70..4e7758f 100644
--- a/tests/integration/servlet-3-init-6/pom.xml
+++ b/tests/integration/servlet-3-init-6/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/servlet-3-init-7/pom.xml b/tests/integration/servlet-3-init-7/pom.xml
index fa26b0c..1b092ea 100644
--- a/tests/integration/servlet-3-init-7/pom.xml
+++ b/tests/integration/servlet-3-init-7/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/integration/servlet-3-init-8/pom.xml b/tests/integration/servlet-3-init-8/pom.xml
index b2ad47b..b854701 100644
--- a/tests/integration/servlet-3-init-8/pom.xml
+++ b/tests/integration/servlet-3-init-8/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/servlet-3-init-9/src/test/java/org/glassfish/jersey/tests/integration/servlet_3_init_9/HelloWorldResourceITCase.java b/tests/integration/servlet-3-init-9/src/test/java/org/glassfish/jersey/tests/integration/servlet_3_init_9/HelloWorldResourceITCase.java
index 30dadc9..de329a1 100644
--- a/tests/integration/servlet-3-init-9/src/test/java/org/glassfish/jersey/tests/integration/servlet_3_init_9/HelloWorldResourceITCase.java
+++ b/tests/integration/servlet-3-init-9/src/test/java/org/glassfish/jersey/tests/integration/servlet_3_init_9/HelloWorldResourceITCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 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
diff --git a/tests/integration/servlet-3-init-provider/pom.xml b/tests/integration/servlet-3-init-provider/pom.xml
index 09d9a4e..184b69d 100644
--- a/tests/integration/servlet-3-init-provider/pom.xml
+++ b/tests/integration/servlet-3-init-provider/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestFilter.java b/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestFilter.java
index 80991ec..60972a1 100644
--- a/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestFilter.java
+++ b/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestServletContainerProvider.java b/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestServletContainerProvider.java
index 5a2605c..6cf2354 100644
--- a/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestServletContainerProvider.java
+++ b/tests/integration/servlet-3-init-provider/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_init_provider/TestServletContainerProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/servlet-3-params/pom.xml b/tests/integration/servlet-3-params/pom.xml
index 5e60249..189ad60 100644
--- a/tests/integration/servlet-3-params/pom.xml
+++ b/tests/integration/servlet-3-params/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-3-params/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_params/CustomContextListener.java b/tests/integration/servlet-3-params/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_params/CustomContextListener.java
index ae0c672..8bdc129 100644
--- a/tests/integration/servlet-3-params/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_params/CustomContextListener.java
+++ b/tests/integration/servlet-3-params/src/main/java/org/glassfish/jersey/tests/integration/servlet_3_params/CustomContextListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 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
diff --git a/tests/integration/servlet-3-sse-1/pom.xml b/tests/integration/servlet-3-sse-1/pom.xml
index 87f1d20..2ba4a49 100644
--- a/tests/integration/servlet-3-sse-1/pom.xml
+++ b/tests/integration/servlet-3-sse-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/integration/servlet-4.0-mvc-1/src/main/webapp/WEB-INF/web.xml b/tests/integration/servlet-4.0-mvc-1/src/main/webapp/WEB-INF/web.xml
index 5194230..d1b1ddf 100644
--- a/tests/integration/servlet-4.0-mvc-1/src/main/webapp/WEB-INF/web.xml
+++ b/tests/integration/servlet-4.0-mvc-1/src/main/webapp/WEB-INF/web.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 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
diff --git a/tests/integration/servlet-request-wrapper-binding-2/pom.xml b/tests/integration/servlet-request-wrapper-binding-2/pom.xml
index 7ac98f0..706d18d 100644
--- a/tests/integration/servlet-request-wrapper-binding-2/pom.xml
+++ b/tests/integration/servlet-request-wrapper-binding-2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/servlet-request-wrapper-binding/pom.xml b/tests/integration/servlet-request-wrapper-binding/pom.xml
index ab07ac0..3f6e4be 100644
--- a/tests/integration/servlet-request-wrapper-binding/pom.xml
+++ b/tests/integration/servlet-request-wrapper-binding/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/servlet-request-wrapper-binding/src/main/java/org/glassfish/jersey/tests/integration/servlet_request_wrapper_binding/RequestResponseWrapperProvider.java b/tests/integration/servlet-request-wrapper-binding/src/main/java/org/glassfish/jersey/tests/integration/servlet_request_wrapper_binding/RequestResponseWrapperProvider.java
index 31b7305..813475e 100644
--- a/tests/integration/servlet-request-wrapper-binding/src/main/java/org/glassfish/jersey/tests/integration/servlet_request_wrapper_binding/RequestResponseWrapperProvider.java
+++ b/tests/integration/servlet-request-wrapper-binding/src/main/java/org/glassfish/jersey/tests/integration/servlet_request_wrapper_binding/RequestResponseWrapperProvider.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/integration/servlet-tests/pom.xml b/tests/integration/servlet-tests/pom.xml
index b5f8ce8..a272dd0 100644
--- a/tests/integration/servlet-tests/pom.xml
+++ b/tests/integration/servlet-tests/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/FormConsumptionFilter.java b/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/FormConsumptionFilter.java
index e77fdde..6aa8c8c 100644
--- a/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/FormConsumptionFilter.java
+++ b/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/FormConsumptionFilter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018 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
diff --git a/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/SuppressContentLengthFilter.java b/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/SuppressContentLengthFilter.java
index 4d9fb93..53ad4bd 100644
--- a/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/SuppressContentLengthFilter.java
+++ b/tests/integration/servlet-tests/src/main/java/org/glassfish/jersey/tests/integration/servlettests/SuppressContentLengthFilter.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/integration/sonar-test/pom.xml b/tests/integration/sonar-test/pom.xml
index 60d0c1c..83697ac 100644
--- a/tests/integration/sonar-test/pom.xml
+++ b/tests/integration/sonar-test/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/integration/spring4/pom.xml b/tests/integration/spring4/pom.xml
index f0c2eb3..6a2700a 100644
--- a/tests/integration/spring4/pom.xml
+++ b/tests/integration/spring4/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/spring5/pom.xml b/tests/integration/spring5/pom.xml
index 75e4291..7d99e21 100644
--- a/tests/integration/spring5/pom.xml
+++ b/tests/integration/spring5/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/integration/tracing-support/pom.xml b/tests/integration/tracing-support/pom.xml
index 3be4d2f..b238dd5 100644
--- a/tests/integration/tracing-support/pom.xml
+++ b/tests/integration/tracing-support/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/jmockit/pom.xml b/tests/jmockit/pom.xml
index c0b0b45..2ffaaf3 100644
--- a/tests/jmockit/pom.xml
+++ b/tests/jmockit/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 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
diff --git a/tests/mem-leaks/pom.xml b/tests/mem-leaks/pom.xml
index dbd22f6..0b2105b 100644
--- a/tests/mem-leaks/pom.xml
+++ b/tests/mem-leaks/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/pom.xml b/tests/mem-leaks/redeployment/pom.xml
index 62c3276..3c1cdc0 100644
--- a/tests/mem-leaks/redeployment/pom.xml
+++ b/tests/mem-leaks/redeployment/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml
index cccadba..f18ee82 100644
--- a/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-hello-world-app-ref/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml
index f4b71aa..268f3b4 100644
--- a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml
index 8cbc6ec..9bffddd 100644
--- a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/src/main/java/org/glassfish/jersey/tests/memleaks/nojersey/MyServlet.java b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/src/main/java/org/glassfish/jersey/tests/memleaks/nojersey/MyServlet.java
index 5c97796..5775cd2 100644
--- a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/src/main/java/org/glassfish/jersey/tests/memleaks/nojersey/MyServlet.java
+++ b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/src/main/java/org/glassfish/jersey/tests/memleaks/nojersey/MyServlet.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
index 1e053db..cca3472 100644
--- a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/src/main/java/org/glassfish/jersey/tests/memleaks/threadlocal/ThreadLocalMemoryLeakServlet.java b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/src/main/java/org/glassfish/jersey/tests/memleaks/threadlocal/ThreadLocalMemoryLeakServlet.java
index cb0cebb..45c5b61 100644
--- a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/src/main/java/org/glassfish/jersey/tests/memleaks/threadlocal/ThreadLocalMemoryLeakServlet.java
+++ b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/src/main/java/org/glassfish/jersey/tests/memleaks/threadlocal/ThreadLocalMemoryLeakServlet.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml
index efb5b9f..9309351 100644
--- a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml
+++ b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml
index e6783d0..575c042 100644
--- a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml
+++ b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/test-cases/pom.xml b/tests/mem-leaks/test-cases/pom.xml
index 26640d1..aa72406 100644
--- a/tests/mem-leaks/test-cases/pom.xml
+++ b/tests/mem-leaks/test-cases/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml
index 783f35d..9127cf9 100644
--- a/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml
+++ b/tests/mem-leaks/test-cases/shutdown-hook-leak-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml
index d46b59f..59a0db2 100644
--- a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml
+++ b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/osgi/pom.xml b/tests/osgi/pom.xml
index 44ddbac..42b4d71 100644
--- a/tests/osgi/pom.xml
+++ b/tests/osgi/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/benchmarks/pom.xml b/tests/performance/benchmarks/pom.xml
index d9f3572..cc7a454 100644
--- a/tests/performance/benchmarks/pom.xml
+++ b/tests/performance/benchmarks/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/performance/pom.xml b/tests/performance/pom.xml
index af59652..c11bc84 100644
--- a/tests/performance/pom.xml
+++ b/tests/performance/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 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
diff --git a/tests/performance/runners/pom.xml b/tests/performance/runners/pom.xml
index 15952d3..7f06b93 100644
--- a/tests/performance/runners/pom.xml
+++ b/tests/performance/runners/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/performance/test-cases/assemblies/pom.xml b/tests/performance/test-cases/assemblies/pom.xml
index a0da60f..7a4ba86 100644
--- a/tests/performance/test-cases/assemblies/pom.xml
+++ b/tests/performance/test-cases/assemblies/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/performance/test-cases/filter-dynamic/pom.xml b/tests/performance/test-cases/filter-dynamic/pom.xml
index 806521b..f8bf30e 100644
--- a/tests/performance/test-cases/filter-dynamic/pom.xml
+++ b/tests/performance/test-cases/filter-dynamic/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/filter-global/pom.xml b/tests/performance/test-cases/filter-global/pom.xml
index da58966..ce5d342 100644
--- a/tests/performance/test-cases/filter-global/pom.xml
+++ b/tests/performance/test-cases/filter-global/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/filter-name/pom.xml b/tests/performance/test-cases/filter-name/pom.xml
index 0f911f1..8d5c157 100644
--- a/tests/performance/test-cases/filter-name/pom.xml
+++ b/tests/performance/test-cases/filter-name/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/interceptor-dynamic/pom.xml b/tests/performance/test-cases/interceptor-dynamic/pom.xml
index bb1b770..a3faeda 100644
--- a/tests/performance/test-cases/interceptor-dynamic/pom.xml
+++ b/tests/performance/test-cases/interceptor-dynamic/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/interceptor-global/pom.xml b/tests/performance/test-cases/interceptor-global/pom.xml
index 3b7e11c..d9eadfa 100644
--- a/tests/performance/test-cases/interceptor-global/pom.xml
+++ b/tests/performance/test-cases/interceptor-global/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/interceptor-name/pom.xml b/tests/performance/test-cases/interceptor-name/pom.xml
index 115d3e5..7d8d1e2 100644
--- a/tests/performance/test-cases/interceptor-name/pom.xml
+++ b/tests/performance/test-cases/interceptor-name/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-custom-provider/pom.xml b/tests/performance/test-cases/mbw-custom-provider/pom.xml
index e8fcff3..c7087ec 100644
--- a/tests/performance/test-cases/mbw-custom-provider/pom.xml
+++ b/tests/performance/test-cases/mbw-custom-provider/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-json-jackson/pom.xml b/tests/performance/test-cases/mbw-json-jackson/pom.xml
index 7c35ef2..8751ea6 100644
--- a/tests/performance/test-cases/mbw-json-jackson/pom.xml
+++ b/tests/performance/test-cases/mbw-json-jackson/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-json-moxy/pom.xml b/tests/performance/test-cases/mbw-json-moxy/pom.xml
index 80c74ad..3abe4b2 100644
--- a/tests/performance/test-cases/mbw-json-moxy/pom.xml
+++ b/tests/performance/test-cases/mbw-json-moxy/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-kryo/pom.xml b/tests/performance/test-cases/mbw-kryo/pom.xml
index 07ea2b5..9795aac 100644
--- a/tests/performance/test-cases/mbw-kryo/pom.xml
+++ b/tests/performance/test-cases/mbw-kryo/pom.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/performance/test-cases/mbw-text-plain/pom.xml b/tests/performance/test-cases/mbw-text-plain/pom.xml
index df345a3..cb2ca2c 100644
--- a/tests/performance/test-cases/mbw-text-plain/pom.xml
+++ b/tests/performance/test-cases/mbw-text-plain/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
index cb98fb6..9620115 100644
--- a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
+++ b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/mbw-xml-moxy/pom.xml b/tests/performance/test-cases/mbw-xml-moxy/pom.xml
index 79cdc43..ac448b8 100644
--- a/tests/performance/test-cases/mbw-xml-moxy/pom.xml
+++ b/tests/performance/test-cases/mbw-xml-moxy/pom.xml
@@ -1,6 +1,6 @@
<!--
- 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
diff --git a/tests/performance/test-cases/param-srl/pom.xml b/tests/performance/test-cases/param-srl/pom.xml
index c17e1cc..01c5e91 100644
--- a/tests/performance/test-cases/param-srl/pom.xml
+++ b/tests/performance/test-cases/param-srl/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
diff --git a/tests/performance/test-cases/pom.xml b/tests/performance/test-cases/pom.xml
index b743730..366cb54 100644
--- a/tests/performance/test-cases/pom.xml
+++ b/tests/performance/test-cases/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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
diff --git a/tests/performance/test-cases/proxy-injection/pom.xml b/tests/performance/test-cases/proxy-injection/pom.xml
index 6126f6c..4897bfd 100644
--- a/tests/performance/test-cases/proxy-injection/pom.xml
+++ b/tests/performance/test-cases/proxy-injection/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2020 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
diff --git a/tests/pom.xml b/tests/pom.xml
index ef354d6..259a689 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 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
diff --git a/tests/stress/pom.xml b/tests/stress/pom.xml
index 883b427..f1493b9 100644
--- a/tests/stress/pom.xml
+++ b/tests/stress/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 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