Merge remote-tracking branch 'origin/3.1' into 'origin/3.1.JPMS'
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/NOTICE.md b/NOTICE.md
index bd12480..1935ed0 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -70,7 +70,7 @@
* Project: http://www.javassist.org/
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
-Jackson JAX-RS Providers Version 2.17.2
+Jackson JAX-RS Providers Version 2.18.0
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2024 FasterXML, LLC. All rights reserved unless otherwise indicated.
@@ -95,7 +95,7 @@
* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS
* Copyright: Eric Rowell
-org.objectweb.asm Version 9.7
+org.objectweb.asm Version 9.7.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.
diff --git a/archetypes/jersey-example-java8-webapp/pom.xml b/archetypes/jersey-example-java8-webapp/pom.xml
index 9950ec2..0deeaea 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/archetypes/jersey-heroku-webapp/pom.xml
index ca84605..98a4479 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml
index 9bbefa0..ed7462f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml
index 77a762c..3ee5e7f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/archetypes/pom.xml
index b12574c..3899e2d 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 92dbe37..5aef522 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/bundles/examples/pom.xml b/bundles/examples/pom.xml
index 3aefefe..69f2757 100644
--- a/bundles/examples/pom.xml
+++ b/bundles/examples/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index 5d9b962..a90dd5a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/bundles/pom.xml b/bundles/pom.xml
index c3f6520..2a6ce36 100644
--- a/bundles/pom.xml
+++ b/bundles/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 95048b8..19829c2 100644
--- a/connectors/apache-connector/pom.xml
+++ b/connectors/apache-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/apache5-connector/pom.xml b/connectors/apache5-connector/pom.xml
index 825bcc8..0181c22 100644
--- a/connectors/apache5-connector/pom.xml
+++ b/connectors/apache5-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 852a203..5ec9ef8 100644
--- a/connectors/grizzly-connector/pom.xml
+++ b/connectors/grizzly-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jdk-connector/pom.xml b/connectors/jdk-connector/pom.xml
index 84b8324..55be765 100644
--- a/connectors/jdk-connector/pom.xml
+++ b/connectors/jdk-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty11-connector/pom.xml b/connectors/jetty11-connector/pom.xml
index 2fec1f1..b83092e 100644
--- a/connectors/jetty11-connector/pom.xml
+++ b/connectors/jetty11-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jnh-connector/pom.xml b/connectors/jnh-connector/pom.xml
index 5f7e685..3b1cd60 100644
--- a/connectors/jnh-connector/pom.xml
+++ b/connectors/jnh-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/netty-connector/pom.xml b/connectors/netty-connector/pom.xml
index 4432bc9..29a32ec 100644
--- a/connectors/netty-connector/pom.xml
+++ b/connectors/netty-connector/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -37,6 +37,7 @@
<surefire.coverage.argline>
--add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
--add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
--add-modules=ALL-MODULE-PATH
</surefire.coverage.argline>
</properties>
@@ -117,6 +118,28 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>InaccessibleObjectException</id>
+ <activation><jdk>[12,)</jdk></activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-opens org.glassfish.jersey.core.common/org.glassfish.jersey.innate.virtual=ALL-UNNAMED
+ --add-opens java.base/java.lang=org.glassfish.jersey.netty.connector
+ --add-opens java.base/java.lang.reflect=org.glassfish.jersey.netty.connector
+ --add-exports org.glassfish.jersey.core.common/org.glassfish.jersey.innate=ALL-UNNAMED
+ --add-modules=ALL-MODULE-PATH
+ </argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
index ec4b81c..9971014 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/JerseyClientHandler.java
@@ -17,7 +17,6 @@
package org.glassfish.jersey.netty.connector;
import java.io.IOException;
-import java.io.InputStream;
import java.net.URI;
import java.util.Iterator;
import java.util.List;
@@ -47,7 +46,6 @@
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpObject;
import io.netty.handler.codec.http.HttpResponse;
-import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.timeout.IdleStateEvent;
import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
@@ -145,7 +143,21 @@
ClientRequest newReq = new ClientRequest(jerseyRequest);
newReq.setUri(newUri);
restrictRedirectRequest(newReq, cr);
- connector.execute(newReq, redirectUriHistory, responseAvailable);
+
+ final NettyConnector newConnector = new NettyConnector(newReq.getClient());
+ newConnector.execute(newReq, redirectUriHistory, new CompletableFuture<ClientResponse>() {
+ @Override
+ public boolean complete(ClientResponse value) {
+ newConnector.close();
+ return responseAvailable.complete(value);
+ }
+
+ @Override
+ public boolean completeExceptionally(Throwable ex) {
+ newConnector.close();
+ return responseAvailable.completeExceptionally(ex);
+ }
+ });
}
} catch (IllegalArgumentException e) {
responseAvailable.completeExceptionally(
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java
index cec1348..ebdfda4 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnector.java
@@ -416,11 +416,7 @@
// headers
if (!jerseyRequest.hasEntity()) {
setHeaders(jerseyRequest, nettyRequest.headers(), false);
-
- // host header - http 1.1
- if (!nettyRequest.headers().contains(HttpHeaderNames.HOST)) {
- nettyRequest.headers().add(HttpHeaderNames.HOST, jerseyRequest.getUri().getHost());
- }
+ setHostHeader(jerseyRequest, nettyRequest);
}
if (jerseyRequest.hasEntity()) {
@@ -436,7 +432,7 @@
};
ch.closeFuture().addListener(closeListener);
- final NettyEntityWriter entityWriter = NettyEntityWriter.getInstance(jerseyRequest, ch);
+ final NettyEntityWriter entityWriter = nettyEntityWriter(jerseyRequest, ch);
switch (entityWriter.getType()) {
case CHUNKED:
HttpUtil.setTransferEncodingChunked(nettyRequest, true);
@@ -468,9 +464,7 @@
@Override
public OutputStream getOutputStream(int contentLength) throws IOException {
replaceHeaders(jerseyRequest, nettyRequest.headers()); // WriterInterceptor changes
- if (!nettyRequest.headers().contains(HttpHeaderNames.HOST)) {
- nettyRequest.headers().add(HttpHeaderNames.HOST, jerseyRequest.getUri().getHost());
- }
+ setHostHeader(jerseyRequest, nettyRequest);
headersSet.countDown();
return entityWriter.getOutputStream();
@@ -524,6 +518,10 @@
}
}
+ /* package */ NettyEntityWriter nettyEntityWriter(ClientRequest clientRequest, Channel channel) {
+ return NettyEntityWriter.getInstance(clientRequest, channel);
+ }
+
private SSLContext getSslContext(Client client, ClientRequest request) {
Supplier<SSLContext> supplier = request.resolveProperty(ClientProperties.SSL_CONTEXT_SUPPLIER, Supplier.class);
return supplier == null ? client.getSslContext() : supplier.get();
@@ -616,4 +614,18 @@
private static boolean additionalProxyHeadersToKeep(String key) {
return key.length() > 2 && (key.charAt(0) == 'x' || key.charAt(0) == 'X') && (key.charAt(1) == '-');
}
+
+ private static void setHostHeader(ClientRequest jerseyRequest, HttpRequest nettyRequest) {
+ // host header - http 1.1
+ if (!nettyRequest.headers().contains(HttpHeaderNames.HOST)) {
+ int requestPort = jerseyRequest.getUri().getPort();
+ final String hostHeader;
+ if (requestPort != 80 && requestPort != 443) {
+ hostHeader = jerseyRequest.getUri().getHost() + ":" + requestPort;
+ } else {
+ hostHeader = jerseyRequest.getUri().getHost();
+ }
+ nettyRequest.headers().add(HttpHeaderNames.HOST, hostHeader);
+ }
+ }
}
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/JerseyChunkedInput.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/JerseyChunkedInput.java
index ad6da7e..4ffe52e 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/JerseyChunkedInput.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/JerseyChunkedInput.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -101,7 +101,15 @@
@Override
public ByteBuf readChunk(ByteBufAllocator allocator) throws Exception {
+ try {
+ return readChunk0(allocator);
+ } catch (Exception e) {
+ closeOnThrowable();
+ throw e;
+ }
+ }
+ private ByteBuf readChunk0(ByteBufAllocator allocator) throws Exception {
if (!open) {
return null;
}
@@ -143,6 +151,14 @@
return offset;
}
+ private void closeOnThrowable() {
+ try {
+ close();
+ } catch (Throwable t) {
+ // do not throw other throwable
+ }
+ }
+
@Override
public void close() throws IOException {
@@ -208,10 +224,12 @@
try {
boolean queued = queue.offer(bufferSupplier.get(), WRITE_TIMEOUT, TimeUnit.MILLISECONDS);
if (!queued) {
+ closeOnThrowable();
throw new IOException("Buffer overflow.");
}
} catch (InterruptedException e) {
+ closeOnThrowable();
throw new IOException(e);
}
}
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputWriteErrorSimulationTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputWriteErrorSimulationTest.java
new file mode 100644
index 0000000..78a3448
--- /dev/null
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputWriteErrorSimulationTest.java
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.netty.connector;
+
+import io.netty.channel.Channel;
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.spi.Connector;
+import org.glassfish.jersey.client.spi.ConnectorProvider;
+import org.glassfish.jersey.netty.connector.internal.JerseyChunkedInput;
+import org.glassfish.jersey.netty.connector.internal.NettyEntityWriter;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Configuration;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedHashMap;
+import jakarta.ws.rs.core.Response;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionStage;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class ChunkedInputWriteErrorSimulationTest extends JerseyTest {
+ private static final String EXCEPTION_MSG = "BOGUS BUFFER OVERFLOW";
+ private static final AtomicReference<Throwable> caught = new AtomicReference<>(null);
+
+ public static class ClientThread extends Thread {
+
+ public static AtomicInteger count = new AtomicInteger();
+ public static String url;
+ public static int nLoops;
+
+ private static Client client;
+
+ public static void main(DequeOffer offer, String[] args) throws InterruptedException {
+ url = args[0];
+ int nThreads = Integer.parseInt(args[1]);
+ nLoops = Integer.parseInt(args[2]);
+ initClient(offer);
+ Thread[] threads = new Thread[nThreads];
+ for (int i = 0; i < nThreads; i++) {
+ threads[i] = new ClientThread();
+ threads[i].start();
+ }
+
+ for (int i = 0; i < nThreads; i++) {
+ threads[i].join();
+ }
+ // System.out.println("Processed calls: " + count);
+ }
+
+ private static void initClient(DequeOffer offer) {
+ ClientConfig defaultConfig = new ClientConfig();
+ defaultConfig.property(ClientProperties.CONNECT_TIMEOUT, 10 * 1000);
+ defaultConfig.property(ClientProperties.READ_TIMEOUT, 10 * 1000);
+ defaultConfig.connectorProvider(getJerseyChunkedInputModifiedNettyConnector(offer));
+ client = ClientBuilder.newBuilder()
+ .withConfig(defaultConfig)
+ .build();
+ }
+
+ public void doCall() {
+ CompletableFuture<Response> cf = invokeResponse().toCompletableFuture()
+ .whenComplete((rsp, t) -> {
+ if (t != null) {
+// System.out.println(Thread.currentThread() + " async complete. Caught exception " + t);
+// t.printStackTrace();
+ while (t.getCause() != null) {
+ t = t.getCause();
+ }
+ caught.set(t);
+ }
+ })
+ .handle((rsp, t) -> {
+ if (rsp != null) {
+ rsp.readEntity(String.class);
+ } else {
+ System.out.println(Thread.currentThread().getName() + " response is null");
+ }
+ return rsp;
+ }).exceptionally(t -> {
+ System.out.println("async complete. completed exceptionally " + t);
+ throw new RuntimeException(t);
+ });
+
+ try {
+ cf.get();
+ System.out.println("Done call " + count.incrementAndGet());
+ } catch (InterruptedException | ExecutionException ex) {
+ Logger.getLogger(ClientThread.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+
+ private static CompletionStage<Response> invokeResponse() {
+ WebTarget target = client.target(url);
+ MultivaluedHashMap hdrs = new MultivaluedHashMap<>();
+ StringBuilder sb = new StringBuilder("{");
+ for (int i = 0; i < 10000; i++) {
+ sb.append("\"fname\":\"foo\", \"lname\":\"bar\"");
+ }
+ sb.append("}");
+ String jsonPayload = sb.toString();
+ Invocation.Builder builder = ((WebTarget) target).request().headers(hdrs);
+ return builder.rx().method("POST", Entity.entity(jsonPayload, MediaType.APPLICATION_JSON_TYPE));
+ }
+
+ @Override
+ public void run() {
+ for (int i = 0; i < nLoops; i++) {
+ try {
+ doCall();
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }
+ }
+ }
+
+ @Path("/console")
+ public static class HangingEndpoint {
+ @Path("/login")
+ @POST
+ public String post(String entity) {
+ return "Welcome";
+ }
+ }
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(HangingEndpoint.class);
+ }
+
+ @Test
+ public void testNoHangOnOfferInterrupt() throws InterruptedException {
+ String path = getBaseUri() + "console/login";
+ ClientThread.main(new InterruptedExceptionOffer(), new String[] {path, "5", "10"});
+ Assertions.assertTrue(caught.get().getMessage().contains(EXCEPTION_MSG));
+ }
+
+ @Test
+ public void testNoHangOnPollInterrupt() throws InterruptedException {
+ String path = getBaseUri() + "console/login";
+ ClientThread.main(new DequePoll(), new String[] {path, "5", "10"});
+ Assertions.assertNotNull(caught.get());
+ }
+
+ @Test
+ public void testNoHangOnOfferNoData() throws InterruptedException {
+ String path = getBaseUri() + "console/login";
+ ClientThread.main(new ReturnFalseOffer(), new String[] {path, "5", "10"});
+ Assertions.assertTrue(caught.get().getMessage().contains("Buffer overflow")); //JerseyChunkedInput
+ Thread.sleep(1_000L); // Sleep for the server to finish
+ }
+
+ private interface DequeOffer {
+ public boolean offer(ByteBuffer e, long timeout, TimeUnit unit) throws InterruptedException;
+ }
+
+ private static class InterruptedExceptionOffer implements DequeOffer {
+ private AtomicInteger ai = new AtomicInteger(0);
+
+ @Override
+ public boolean offer(ByteBuffer e, long timeout, TimeUnit unit) throws InterruptedException {
+ if ((ai.getAndIncrement() % 10) == 0) {
+ throw new InterruptedException(EXCEPTION_MSG);
+ }
+ return true;
+ }
+ }
+
+ private static class ReturnFalseOffer implements DequeOffer {
+ private AtomicInteger ai = new AtomicInteger(0);
+ @Override
+ public boolean offer(ByteBuffer e, long timeout, TimeUnit unit) throws InterruptedException {
+ return !((ai.getAndIncrement() % 10) == 1);
+ }
+ }
+
+ private static class DequePoll extends InterruptedExceptionOffer {
+ }
+
+
+ private static ConnectorProvider getJerseyChunkedInputModifiedNettyConnector(DequeOffer offer) {
+ return new ConnectorProvider() {
+ @Override
+ public Connector getConnector(Client client, Configuration runtimeConfig) {
+ return new NettyConnector(client) {
+ NettyEntityWriter nettyEntityWriter(ClientRequest clientRequest, Channel channel) {
+ NettyEntityWriter wrapped = NettyEntityWriter.getInstance(clientRequest, channel);
+
+ JerseyChunkedInput chunkedInput = (JerseyChunkedInput) wrapped.getChunkedInput();
+ try {
+ Field field = JerseyChunkedInput.class.getDeclaredField("queue");
+ field.setAccessible(true);
+
+ removeFinal(field);
+
+ field.set(chunkedInput, new LinkedBlockingDeque<ByteBuffer>() {
+ @Override
+ public boolean offer(ByteBuffer e, long timeout, TimeUnit unit) throws InterruptedException {
+ if (!DequePoll.class.isInstance(offer) && !offer.offer(e, timeout, unit)) {
+ return false;
+ }
+ return super.offer(e, timeout, unit);
+ }
+
+ @Override
+ public ByteBuffer poll(long timeout, TimeUnit unit) throws InterruptedException {
+ if (DequePoll.class.isInstance(offer)) {
+ offer.offer(null, timeout, unit);
+ }
+ return super.poll(timeout, unit);
+ }
+ });
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ NettyEntityWriter proxy = (NettyEntityWriter) Proxy.newProxyInstance(
+ ConnectorProvider.class.getClassLoader(), new Class[]{NettyEntityWriter.class},
+ (proxy1, method, args) -> {
+ if (method.getName().equals("readChunk")) {
+ try {
+ return method.invoke(wrapped, args);
+ } catch (RuntimeException e) {
+ // consume
+ }
+ }
+ return method.invoke(wrapped, args);
+ });
+ return proxy;
+ }
+ };
+ }
+ };
+ }
+
+ public static void removeFinal(Field field) throws RuntimeException {
+ try {
+ Method[] classMethods = Class.class.getDeclaredMethods();
+ Method declaredFieldMethod = Arrays
+ .stream(classMethods).filter(x -> Objects.equals(x.getName(), "getDeclaredFields0"))
+ .findAny().orElseThrow(() -> new NoSuchElementException("No value present"));
+ declaredFieldMethod.setAccessible(true);
+ Field[] declaredFieldsOfField = (Field[]) declaredFieldMethod.invoke(Field.class, false);
+ Field modifiersField = Arrays
+ .stream(declaredFieldsOfField).filter(x -> Objects.equals(x.getName(), "modifiers"))
+ .findAny().orElseThrow(() -> new NoSuchElementException("No value present"));
+ modifiersField.setAccessible(true);
+ modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
+ } catch (RuntimeException re) {
+ throw re;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/FollowRedirectsTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/FollowRedirectsTest.java
index 3a1cf69..d63b904 100644
--- a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/FollowRedirectsTest.java
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/FollowRedirectsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,16 +24,20 @@
import java.util.logging.Logger;
import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
import jakarta.ws.rs.client.WebTarget;
import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.RequestEntityProcessing;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.netty.connector.internal.RedirectException;
import org.glassfish.jersey.server.ResourceConfig;
@@ -60,6 +64,11 @@
return "GET";
}
+ @POST
+ public String post() {
+ return "POST";
+ }
+
@GET
@Path("redirect")
public Response redirect() {
@@ -77,6 +86,12 @@
public Response redirect2() {
return Response.seeOther(URI.create(TEST_URL_REF.get() + "/redirect")).build();
}
+
+ @POST
+ @Path("status307")
+ public Response status307() {
+ return Response.temporaryRedirect(URI.create(TEST_URL_REF.get())).build();
+ }
}
@Override
@@ -169,4 +184,15 @@
assertEquals(200, r.getStatus());
assertEquals("GET", r.readEntity(String.class));
}
+
+ @Test
+ public void testRedirect307PostBuffered() {
+ try (Response response = target("test/status307")
+ .property(ClientProperties.FOLLOW_REDIRECTS, true)
+ .property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED)
+ .request().post(Entity.entity("Something", MediaType.TEXT_PLAIN_TYPE))) {
+ assertEquals(200, response.getStatus());
+ assertEquals("POST", response.readEntity(String.class));
+ }
+ }
}
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/HostHeaderTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/HostHeaderTest.java
new file mode 100644
index 0000000..a456acd
--- /dev/null
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/HostHeaderTest.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.netty.connector;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.hamcrest.MatcherAssert;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+
+public class HostHeaderTest extends JerseyTest {
+
+ private static final String HTTP_HEADER_NAME = "HTTP_PORT_INT";
+
+ @Path("/")
+ public static class HostHeaderTestEchoResource {
+
+ @POST
+ public String post(@Context HttpHeaders headers) {
+ return get(headers);
+ }
+
+ @GET
+ public String get(@Context HttpHeaders headers) {
+ String sPort = headers.getHeaderString(HTTP_HEADER_NAME);
+ String hostPort = headers.getHeaderString(HttpHeaders.HOST);
+ int indexColon = hostPort.indexOf(':');
+ if (indexColon != -1) {
+ hostPort = hostPort.substring(indexColon + 1);
+ }
+ if (sPort.equals(hostPort.trim())) {
+ return GET.class.getName();
+ } else {
+ return "Expected port " + sPort + " but found " + hostPort;
+ }
+ }
+ }
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(HostHeaderTestEchoResource.class);
+ }
+
+ @Test
+ public void testHostHeaderAndPort() {
+ int port = getPort();
+ ClientConfig config = new ClientConfig();
+ config.connectorProvider(new NettyConnectorProvider());
+ try (Response response = ClientBuilder.newClient(config).target(target().getUri())
+ .request()
+ .header(HTTP_HEADER_NAME, port)
+ .get()) {
+ MatcherAssert.assertThat(response.getStatus(), Matchers.is(200));
+ MatcherAssert.assertThat(response.readEntity(String.class), Matchers.is(GET.class.getName()));
+ }
+ }
+
+ @Test
+ public void testHostHeaderAndPortAfterRemovedFromFilter() {
+ int port = getPort();
+ ClientConfig config = new ClientConfig();
+ config.connectorProvider(new NettyConnectorProvider());
+ try (Response response = ClientBuilder.newClient(config)
+ .target(target().getUri())
+ .request()
+ .header(HTTP_HEADER_NAME, port)
+ .post(Entity.entity("xxx", MediaType.TEXT_PLAIN_TYPE))) {
+ MatcherAssert.assertThat(response.getStatus(), Matchers.is(200));
+ MatcherAssert.assertThat(response.readEntity(String.class), Matchers.is(GET.class.getName()));
+ }
+ }
+
+}
diff --git a/connectors/pom.xml b/connectors/pom.xml
index d25c8e1..89aedd2 100644
--- a/connectors/pom.xml
+++ b/connectors/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml
index e0b9fb4..5873489 100644
--- a/containers/glassfish/jersey-gf-ejb/pom.xml
+++ b/containers/glassfish/jersey-gf-ejb/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/containers/glassfish/pom.xml
index 7987145..52a5591 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-http/pom.xml b/containers/grizzly2-http/pom.xml
index 2ae6dde..999d371 100644
--- a/containers/grizzly2-http/pom.xml
+++ b/containers/grizzly2-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/containers/grizzly2-servlet/pom.xml
index 9433817..cdaf24b 100644
--- a/containers/grizzly2-servlet/pom.xml
+++ b/containers/grizzly2-servlet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jdk-http/pom.xml b/containers/jdk-http/pom.xml
index f3f68df..5a4dd85 100644
--- a/containers/jdk-http/pom.xml
+++ b/containers/jdk-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6ac5fcc..3a34557 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 69010ed..21adf8c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty-http/pom.xml b/containers/jetty-http/pom.xml
index 1be9851..52cfe67 100644
--- a/containers/jetty-http/pom.xml
+++ b/containers/jetty-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty-http2/pom.xml b/containers/jetty-http2/pom.xml
index 5f0dea5..526b275 100644
--- a/containers/jetty-http2/pom.xml
+++ b/containers/jetty-http2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty-servlet/pom.xml b/containers/jetty-servlet/pom.xml
index 0bd1c5b..1042c36 100644
--- a/containers/jetty-servlet/pom.xml
+++ b/containers/jetty-servlet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty11-http/pom.xml b/containers/jetty11-http/pom.xml
index 66e8e74..154d085 100644
--- a/containers/jetty11-http/pom.xml
+++ b/containers/jetty11-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d3929cb..2e9ce74 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cf9fd5d..ef2ca0a 100644
--- a/containers/pom.xml
+++ b/containers/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/containers/simple-http/pom.xml
index 3d91398..2636623 100644
--- a/containers/simple-http/pom.xml
+++ b/containers/simple-http/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/core-client/pom.xml
index 0af1530..9227e81 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/HttpUrlConnectorProvider.java b/core-client/src/main/java/org/glassfish/jersey/client/HttpUrlConnectorProvider.java
index 306e336..dd96928 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/HttpUrlConnectorProvider.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/HttpUrlConnectorProvider.java
@@ -21,9 +21,6 @@
import java.net.Proxy;
import java.net.URL;
import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
import jakarta.ws.rs.client.Client;
@@ -290,16 +287,12 @@
* @throws java.io.IOException in case the connection cannot be provided.
*/
default HttpURLConnection getConnection(URL url, Proxy proxy) throws IOException {
- synchronized (this){
- return (proxy == null) ? getConnection(url) : (HttpURLConnection) url.openConnection(proxy);
- }
+ return (proxy == null) ? getConnection(url) : (HttpURLConnection) url.openConnection(proxy);
}
}
private static class DefaultConnectionFactory implements ConnectionFactory {
- private final ConcurrentHashMap<URL, Lock> locks = new ConcurrentHashMap<>();
-
@Override
public HttpURLConnection getConnection(final URL url) throws IOException {
return connect(url, null);
@@ -311,13 +304,7 @@
}
private HttpURLConnection connect(URL url, Proxy proxy) throws IOException {
- Lock lock = locks.computeIfAbsent(url, u -> new ReentrantLock());
- lock.lock();
- try {
- return (proxy == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(proxy);
- } finally {
- lock.unlock();
- }
+ return (proxy == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(proxy);
}
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/RequestProcessingInitializationStage.java b/core-client/src/main/java/org/glassfish/jersey/client/RequestProcessingInitializationStage.java
index 0b9da83..1ac6b75 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/RequestProcessingInitializationStage.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/RequestProcessingInitializationStage.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,7 +16,9 @@
package org.glassfish.jersey.client;
+import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
@@ -26,6 +28,7 @@
import jakarta.inject.Provider;
+import org.glassfish.jersey.innate.spi.MessageBodyWorkersSettable;
import org.glassfish.jersey.internal.inject.InjectionManager;
import org.glassfish.jersey.internal.inject.Providers;
import org.glassfish.jersey.internal.util.collection.Ref;
@@ -80,6 +83,21 @@
requestContext.setWriterInterceptors(writerInterceptors);
requestContext.setReaderInterceptors(readerInterceptors);
+ if (requestContext.getEntity() != null) {
+ setWorkers(requestContext.getEntity());
+ }
+
return requestContext;
}
+
+ private void setWorkers(Object entity) {
+ if (MessageBodyWorkersSettable.class.isInstance(entity)) {
+ ((MessageBodyWorkersSettable) entity).setMessageBodyWorkers(workersProvider);
+ } else if (Collection.class.isInstance(entity)) {
+ Iterator it = ((Collection) entity).iterator();
+ while (it.hasNext()) {
+ setWorkers(it.next());
+ }
+ }
+ }
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionManager.java b/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionManager.java
index 8fb151a..09d8d88 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionManager.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionManager.java
@@ -17,6 +17,7 @@
package org.glassfish.jersey.client.innate.inject;
import org.glassfish.jersey.client.internal.LocalizationMessages;
+import org.glassfish.jersey.internal.inject.AbstractBinder;
import org.glassfish.jersey.internal.inject.Binder;
import org.glassfish.jersey.internal.inject.Binding;
import org.glassfish.jersey.internal.inject.ClassBinding;
@@ -52,10 +53,12 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Proxy;
import java.lang.reflect.Type;
-import java.util.Collections;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Supplier;
import java.util.logging.Level;
@@ -75,8 +78,6 @@
private final MultivaluedMap<Type, SupplierInstanceBinding<?>> supplierTypeInstanceBindings = new MultivaluedHashMap<>();
private final MultivaluedMap<Type, SupplierClassBinding<?>> supplierTypeClassBindings = new MultivaluedHashMap<>();
- private final MultivaluedMap<DisposableSupplier, Object> disposableSupplierObjects = new MultivaluedHashMap<>();
-
private final Instances instances = new Instances();
private final Types types = new Types();
@@ -89,11 +90,12 @@
* @param <TYPE> the type for which the instance is created, either Class, or ParametrizedType (for instance
* Provider<SomeClass>).
*/
- private class TypedInstances<TYPE> {
+ private class TypedInstances<TYPE extends Type> {
private final MultivaluedMap<TYPE, InstanceContext<?>> singletonInstances = new MultivaluedHashMap<>();
private ThreadLocal<MultivaluedMap<TYPE, InstanceContext<?>>> threadInstances = new ThreadLocal<>();
- private final List<Object> threadPredestroyables = Collections.synchronizedList(new LinkedList<>());
private final ReentrantLock singletonInstancesLock = new ReentrantLock();
+ private ThreadLocal<MultivaluedMap<DisposableSupplier, Object>> disposableSupplierObjects =
+ ThreadLocal.withInitial(() -> new MultivaluedHashMap<>());
private <T> List<InstanceContext<?>> _getSingletons(TYPE clazz) {
List<InstanceContext<?>> si;
@@ -107,7 +109,7 @@
}
@SuppressWarnings("unchecked")
- <T> T _addSingleton(TYPE clazz, T instance, Binding<?, ?> binding, Annotation[] qualifiers) {
+ <T> T _addSingleton(TYPE clazz, T instance, Binding<?, ?> binding, Annotation[] qualifiers, boolean destroy) {
singletonInstancesLock.lock();
try {
// check existing singleton with a qualifier already created by another thread io a meantime
@@ -121,8 +123,8 @@
return (T) qualified.get(0).instance;
}
}
- singletonInstances.add(clazz, new InstanceContext<>(instance, binding, qualifiers));
- threadPredestroyables.add(instance);
+ InstanceContext<?> instanceContext = new InstanceContext<>(instance, binding, qualifiers, !destroy);
+ singletonInstances.add(clazz, instanceContext);
return instance;
} finally {
singletonInstancesLock.unlock();
@@ -131,11 +133,11 @@
@SuppressWarnings("unchecked")
<T> T addSingleton(TYPE clazz, T t, Binding<?, ?> binding, Annotation[] instanceQualifiers) {
- T t2 = _addSingleton(clazz, t, binding, instanceQualifiers);
+ T t2 = _addSingleton(clazz, t, binding, instanceQualifiers, true);
if (t2 == t) {
for (Type contract : binding.getContracts()) {
if (!clazz.equals(contract) && isClass(contract)) {
- _addSingleton((TYPE) contract, t, binding, instanceQualifiers);
+ _addSingleton((TYPE) contract, t, binding, instanceQualifiers, false);
}
}
}
@@ -151,21 +153,22 @@
return list;
}
- private <T> void _addThreadInstance(TYPE clazz, T instance, Binding<T, ?> binding, Annotation[] qualifiers) {
+ private <T> void _addThreadInstance(
+ TYPE clazz, T instance, Binding<T, ?> binding, Annotation[] qualifiers, boolean destroy) {
MultivaluedMap<TYPE, InstanceContext<?>> map = threadInstances.get();
if (map == null) {
map = new MultivaluedHashMap<>();
threadInstances.set(map);
}
- map.add(clazz, new InstanceContext<>(instance, binding, qualifiers));
- threadPredestroyables.add(instance);
+ InstanceContext<?> instanceContext = new InstanceContext<>(instance, binding, qualifiers, !destroy);
+ map.add(clazz, instanceContext);
}
<T> void addThreadInstance(TYPE clazz, T t, Binding<T, ?> binding, Annotation[] instanceQualifiers) {
- _addThreadInstance(clazz, t, binding, instanceQualifiers);
+ _addThreadInstance(clazz, t, binding, instanceQualifiers, true);
for (Type contract : binding.getContracts()) {
if (!clazz.equals(contract) && isClass(contract)) {
- _addThreadInstance((TYPE) contract, t, binding, instanceQualifiers);
+ _addThreadInstance((TYPE) contract, t, binding, instanceQualifiers, false);
}
}
}
@@ -183,28 +186,78 @@
private <T> List<InstanceContext<?>> _getContexts(TYPE clazz) {
List<InstanceContext<?>> si = _getSingletons(clazz);
List<InstanceContext<?>> ti = _getThreadInstances(clazz);
- if (si == null && ti != null) {
- si = ti;
- } else if (ti != null) {
- si.addAll(ti);
- }
- return si;
+ return InstanceContext.merge(si, ti);
}
<T> T getInstance(TYPE clazz, Annotation[] annotations) {
List<T> i = getInstances(clazz, annotations);
if (i != null) {
checkUnique(i);
- return i.get(0);
+ return instanceOrSupply(clazz, i.get(0));
}
return null;
}
+ private <T> T instanceOrSupply(TYPE clazz, T t) {
+ if (!Class.class.isInstance(clazz) || ((Class) clazz).isInstance(t)) {
+ return t;
+ } else if (Supplier.class.isInstance(t)) {
+ return (T) registerDisposableSupplierAndGet((Supplier) t, this);
+ } else if (Provider.class.isInstance(t)) {
+ return (T) ((Provider) t).get();
+ } else {
+ return t;
+ }
+ }
+
void dispose() {
singletonInstances.forEach((clazz, instances) -> instances.forEach(instance -> preDestroy(instance.getInstance())));
- threadPredestroyables.forEach(NonInjectionManager.this::preDestroy);
+ disposeThreadInstances(true);
/* The java.lang.ThreadLocal$ThreadLocalMap$Entry[] keeps references to this NonInjectionManager */
threadInstances = null;
+ disposableSupplierObjects = null;
+ }
+
+ void disposeThreadInstances(boolean allThreadInstances) {
+ MultivaluedMap<TYPE, InstanceContext<?>> ti = threadInstances.get();
+ if (ti == null) {
+ return;
+ }
+ Set<Map.Entry<TYPE, List<InstanceContext<?>>>> tiSet = ti.entrySet();
+ Iterator<Map.Entry<TYPE, List<InstanceContext<?>>>> tiSetIt = tiSet.iterator();
+ while (tiSetIt.hasNext()) {
+ Map.Entry<TYPE, List<InstanceContext<?>>> entry = tiSetIt.next();
+ Iterator<InstanceContext<?>> listIt = entry.getValue().iterator();
+ while (listIt.hasNext()) {
+ InstanceContext<?> instanceContext = listIt.next();
+ if (allThreadInstances || instanceContext.getBinding().getScope() != PerThread.class) {
+ listIt.remove();
+ if (DisposableSupplier.class.isInstance(instanceContext.getInstance())) {
+ MultivaluedMap<DisposableSupplier, Object> disposeMap = disposableSupplierObjects.get();
+ Iterator<Map.Entry<DisposableSupplier, List<Object>>> disposeMapIt = disposeMap.entrySet().iterator();
+ while (disposeMapIt.hasNext()) {
+ Map.Entry<DisposableSupplier, List<Object>> disposeMapEntry = disposeMapIt.next();
+ if (disposeMapEntry.getKey() == /* identity */ instanceContext.getInstance()) {
+ Iterator<Object> disposeMapEntryIt = disposeMapEntry.getValue().iterator();
+ while (disposeMapEntryIt.hasNext()) {
+ Object disposeInstance = disposeMapEntryIt.next();
+ ((DisposableSupplier) instanceContext.getInstance()).dispose(disposeInstance);
+ disposeMapEntryIt.remove();
+ }
+ }
+ if (disposeMapEntry.getValue().isEmpty()) {
+ disposeMapIt.remove();
+ }
+ }
+ }
+ instanceContext.destroy(NonInjectionManager.this);
+ }
+ if (entry.getValue().isEmpty()) {
+ tiSetIt.remove();
+ }
+ }
+ }
+ disposableSupplierObjects.remove();
}
}
@@ -215,9 +268,19 @@
}
public NonInjectionManager() {
+ Binding binding = new AbstractBinder() {
+ @Override
+ protected void configure() {
+ bind(NonInjectionRequestScope.class).to(RequestScope.class).in(Singleton.class);
+ }
+ }.getBindings().iterator().next();
+ RequestScope scope = new NonInjectionRequestScope(this);
+ instances.addSingleton(RequestScope.class, scope, binding, null);
+ types.addSingleton(RequestScope.class, scope, binding, null);
}
public NonInjectionManager(boolean warning) {
+ this();
if (warning) {
logger.warning(LocalizationMessages.NONINJECT_FALLBACK());
} else {
@@ -227,20 +290,21 @@
@Override
public void completeRegistration() {
- instances._addSingleton(InjectionManager.class, this, new InjectionManagerBinding(), null);
+ instances._addSingleton(InjectionManager.class, this, new InjectionManagerBinding(), null, false);
}
@Override
public void shutdown() {
shutdown = true;
-
- disposableSupplierObjects.forEach((supplier, objects) -> objects.forEach(supplier::dispose));
- disposableSupplierObjects.clear();
-
instances.dispose();
types.dispose();
}
+ void disposeRequestScopedInstances() {
+ instances.disposeThreadInstances(false);
+ types.disposeThreadInstances(false);
+ }
+
@Override
public boolean isShutdown() {
return shutdown;
@@ -419,12 +483,7 @@
return (T) this;
}
if (RequestScope.class.equals(createMe)) {
- if (!isRequestScope) {
- isRequestScope = true;
- return (T) new NonInjectionRequestScope();
- } else {
- throw new IllegalStateException(LocalizationMessages.NONINJECT_REQUESTSCOPE_CREATED());
- }
+ throw new IllegalStateException(LocalizationMessages.NONINJECT_REQUESTSCOPE_CREATED());
}
ClassBindings<T> classBindings = classBindings(createMe);
@@ -439,12 +498,7 @@
return (T) this;
}
if (RequestScope.class.equals(createMe)) {
- if (!isRequestScope) {
- isRequestScope = true;
- return (T) new NonInjectionRequestScope();
- } else {
- throw new IllegalStateException(LocalizationMessages.NONINJECT_REQUESTSCOPE_CREATED());
- }
+ throw new IllegalStateException(LocalizationMessages.NONINJECT_REQUESTSCOPE_CREATED());
}
ClassBindings<T> classBindings = classBindings(createMe);
@@ -543,7 +597,9 @@
@Override
public void preDestroy(Object preDestroyMe) {
- Method preDestroy = getAnnotatedMethod(preDestroyMe, PreDestroy.class);
+ Method preDestroy = Method.class.isInstance(preDestroyMe)
+ ? (Method) preDestroyMe
+ : getAnnotatedMethod(preDestroyMe, PreDestroy.class);
if (preDestroy != null) {
ensureAccessible(preDestroy);
try {
@@ -575,20 +631,27 @@
* @return The proxy for the instance supplied by a supplier or the instance if not required to be proxied.
*/
@SuppressWarnings("unchecked")
- private <T> T createSupplierProxyIfNeeded(Boolean createProxy, Class<T> iface, Supplier<T> supplier) {
+ private <T> T createSupplierProxyIfNeeded(
+ Boolean createProxy, Class<T> iface, Supplier<Supplier<T>> supplier, TypedInstances<?> typedInstances) {
if (createProxy != null && createProxy && iface.isInterface()) {
T proxy = (T) Proxy.newProxyInstance(iface.getClassLoader(), new Class[]{iface}, new InvocationHandler() {
- final SingleRegisterSupplier<T> singleSupplierRegister = new SingleRegisterSupplier<>(supplier);
+ final Set<Object> instances = new HashSet<>();
+
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- T t = singleSupplierRegister.get();
+ Supplier<T> supplierT = supplier.get();
+ T t = supplierT.get();
+ if (DisposableSupplier.class.isInstance(supplierT) && !instances.contains(t)) {
+ MultivaluedMap<DisposableSupplier, Object> map = typedInstances.disposableSupplierObjects.get();
+ map.add((DisposableSupplier) supplierT, t);
+ }
Object ret = method.invoke(t, args);
return ret;
}
});
return proxy;
} else {
- return registerDisposableSupplierAndGet(supplier);
+ return registerDisposableSupplierAndGet(supplier.get(), typedInstances);
}
}
@@ -600,8 +663,8 @@
private class SingleRegisterSupplier<T> {
private final LazyValue<T> once;
- private SingleRegisterSupplier(Supplier<T> supplier) {
- once = Values.lazy((Value<T>) () -> registerDisposableSupplierAndGet(supplier));
+ private SingleRegisterSupplier(Supplier<T> supplier, TypedInstances<?> instances) {
+ once = Values.lazy((Value<T>) () -> registerDisposableSupplierAndGet(supplier, instances));
}
T get() {
@@ -609,10 +672,10 @@
}
}
- private <T> T registerDisposableSupplierAndGet(Supplier<T> supplier) {
+ private <T> T registerDisposableSupplierAndGet(Supplier<T> supplier, TypedInstances<?> typedInstances) {
T instance = supplier.get();
if (DisposableSupplier.class.isInstance(supplier)) {
- disposableSupplierObjects.add((DisposableSupplier<T>) supplier, instance);
+ typedInstances.disposableSupplierObjects.get().add((DisposableSupplier<T>) supplier, instance);
}
return instance;
}
@@ -686,7 +749,7 @@
* @param <X> The expected return type for the TYPE.
* @param <TYPE> The Type for which a {@link Binding} has been created.
*/
- private abstract class XBindings<X, TYPE> {
+ private abstract class XBindings<X, TYPE extends Type> {
protected final List<InstanceBinding<X>> instanceBindings = new LinkedList<>();
protected final List<SupplierInstanceBinding<X>> supplierInstanceBindings = new LinkedList<>();
@@ -767,12 +830,8 @@
private X _create(SupplierInstanceBinding<X> binding) {
Supplier<X> supplier = binding.getSupplier();
- X t = registerDisposableSupplierAndGet(supplier);
- if (Singleton.class.equals(binding.getScope())) {
- _addInstance(t, binding);
- } else if (_isPerThread(binding.getScope())) {
- _addThreadInstance(t, binding);
- }
+ X t = registerDisposableSupplierAndGet(supplier, instances);
+ t = addInstance(type, t, binding);
return t;
}
@@ -836,20 +895,17 @@
protected abstract X _createAndStore(ClassBinding<X> binding);
- protected <T> T _addInstance(TYPE type, T instance, Binding<?, ?> binding) {
+ protected <T> T _addSingletonInstance(TYPE type, T instance, Binding<?, ?> binding) {
return instances.addSingleton(type, instance, binding, instancesQualifiers);
}
- protected void _addThreadInstance(TYPE type, Object instance, Binding binding) {
- instances.addThreadInstance(type, instance, binding, instancesQualifiers);
- }
-
- protected <T> T _addInstance(T instance, Binding<?, ?> binding) {
- return instances.addSingleton(type, instance, binding, instancesQualifiers);
- }
-
- protected void _addThreadInstance(Object instance, Binding binding) {
- instances.addThreadInstance(type, instance, binding, instancesQualifiers);
+ protected <T> T addInstance(TYPE type, T instance, Binding binding) {
+ if (Singleton.class.equals(binding.getScope())) {
+ instance = instances.addSingleton(type, instance, binding, instancesQualifiers);
+ } else if (_isPerThread(binding.getScope())) {
+ instances.addThreadInstance(type, instance, binding, instancesQualifiers);
+ }
+ return instance;
}
}
@@ -909,28 +965,27 @@
}
protected T _create(SupplierClassBinding<T> binding) {
- Supplier<T> supplier = instances.getInstance(binding.getSupplierClass(), null);
- if (supplier == null) {
- supplier = justCreate(binding.getSupplierClass());
- if (Singleton.class.equals(binding.getSupplierScope())) {
- supplier = instances.addSingleton(binding.getSupplierClass(), supplier, binding, null);
- } else if (_isPerThread(binding.getSupplierScope())) {
- instances.addThreadInstance(binding.getSupplierClass(), supplier, binding, null);
+ Supplier<Supplier<T>> supplierSupplier = () -> {
+ Supplier<T> supplier = instances.getInstance(binding.getSupplierClass(), null);
+ if (supplier == null) {
+ supplier = justCreate(binding.getSupplierClass());
+ if (Singleton.class.equals(binding.getSupplierScope())) {
+ supplier = instances.addSingleton(binding.getSupplierClass(), supplier, binding, null);
+ } else if (_isPerThread(binding.getSupplierScope()) || binding.getSupplierScope() == null) {
+ instances.addThreadInstance(binding.getSupplierClass(), supplier, binding, null);
+ }
}
- }
+ return supplier;
+ };
- T t = createSupplierProxyIfNeeded(binding.isProxiable(), (Class<T>) type, supplier);
- if (Singleton.class.equals(binding.getScope())) {
- t = _addInstance(type, t, binding);
- } else if (_isPerThread(binding.getScope())) {
- _addThreadInstance(type, t, binding);
- }
+ T t = createSupplierProxyIfNeeded(binding.isProxiable(), (Class<T>) type, supplierSupplier, instances);
+// t = addInstance(type, t, binding); The supplier here creates instances that ought not to be registered as beans
return t;
}
protected T _createAndStore(ClassBinding<T> binding) {
T result = justCreate(binding.getService());
- result = _addInstance(binding.getService(), result, binding);
+ result = addInstance(binding.getService(), result, binding);
return result;
}
}
@@ -943,19 +998,15 @@
protected T _create(SupplierClassBinding<T> binding) {
Supplier<T> supplier = justCreate(binding.getSupplierClass());
- T t = registerDisposableSupplierAndGet(supplier);
- if (Singleton.class.equals(binding.getScope())) {
- t = _addInstance(type, t, binding);
- } else if (_isPerThread(binding.getScope())) {
- _addThreadInstance(type, t, binding);
- }
+ T t = registerDisposableSupplierAndGet(supplier, instances);
+ t = addInstance(type, t, binding);
return t;
}
@Override
protected T _createAndStore(ClassBinding<T> binding) {
T result = justCreate(binding.getService());
- result = _addInstance(type, result, binding);
+ result = addInstance(type, result, binding);
return result;
}
@@ -976,7 +1027,7 @@
return NonInjectionManager.this.getInstance(actualTypeArgument);
}
}
- });
+ }, instances);
@Override
public Object get() {
@@ -999,13 +1050,16 @@
private final T instance;
private final Binding<?, ?> binding;
private final Annotation[] createdWithQualifiers;
+ private boolean destroyed = false;
- private InstanceContext(T instance, Binding<?, ?> binding, Annotation[] qualifiers) {
+ private InstanceContext(T instance, Binding<?, ?> binding, Annotation[] qualifiers, boolean destroyed) {
this.instance = instance;
this.binding = binding;
this.createdWithQualifiers = qualifiers;
+ this.destroyed = destroyed;
}
+
public Binding<?, ?> getBinding() {
return binding;
}
@@ -1014,6 +1068,13 @@
return instance;
}
+ public void destroy(NonInjectionManager nonInjectionManager) {
+ if (!destroyed) {
+ destroyed = true;
+ nonInjectionManager.preDestroy(instance);
+ }
+ }
+
@SuppressWarnings("unchecked")
static <T> List<T> toInstances(List<InstanceContext<?>> instances, Annotation[] qualifiers) {
return instances != null
@@ -1032,6 +1093,15 @@
: null;
}
+ private static List<InstanceContext<?>> merge(List<InstanceContext<?>> i1, List<InstanceContext<?>> i2) {
+ if (i1 == null) {
+ i1 = i2;
+ } else if (i2 != null) {
+ i1.addAll(i2);
+ }
+ return i1;
+ }
+
private boolean hasQualifiers(Annotation[] requested) {
if (requested != null) {
classLoop:
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionRequestScope.java b/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionRequestScope.java
index 258780d..b8b23b2 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionRequestScope.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/innate/inject/NonInjectionRequestScope.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -20,14 +20,20 @@
import org.glassfish.jersey.internal.util.LazyUid;
import org.glassfish.jersey.process.internal.RequestScope;
-import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
public class NonInjectionRequestScope extends RequestScope {
+
+ private final NonInjectionManager nonInjectionManager;
+
+ public NonInjectionRequestScope(NonInjectionManager nonInjectionManager) {
+ this.nonInjectionManager = nonInjectionManager;
+ }
+
@Override
public org.glassfish.jersey.process.internal.RequestContext createContext() {
- return new Instance();
+ return new Instance(nonInjectionManager);
}
/**
@@ -35,6 +41,8 @@
*/
public static final class Instance implements org.glassfish.jersey.process.internal.RequestContext {
+ private final NonInjectionManager injectionManager;
+
private static final ExtendedLogger logger = new ExtendedLogger(Logger.getLogger(Instance.class.getName()), Level.FINEST);
/*
@@ -48,10 +56,11 @@
/**
* Holds the number of snapshots of this scope.
*/
- private final AtomicInteger referenceCounter;
+ private int referenceCounter;
- private Instance() {
- this.referenceCounter = new AtomicInteger(1);
+ private Instance(NonInjectionManager injectionManager) {
+ this.injectionManager = injectionManager;
+ this.referenceCounter = 1;
}
/**
@@ -65,7 +74,7 @@
@Override
public NonInjectionRequestScope.Instance getReference() {
// TODO: replace counter with a phantom reference + reference queue-based solution
- referenceCounter.incrementAndGet();
+ referenceCounter++;
return this;
}
@@ -77,7 +86,9 @@
*/
@Override
public void release() {
- referenceCounter.decrementAndGet();
+ if (0 == --referenceCounter) {
+ injectionManager.disposeRequestScopedInstances();
+ }
}
@Override
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 ca73f4c..630cb96 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
@@ -84,7 +84,7 @@
private static final String ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY = "sun.net.http.allowRestrictedHeaders";
// Avoid multi-thread uses of HttpsURLConnection.getDefaultSSLSocketFactory() because it does not implement a
// proper lazy-initialization. See https://github.com/jersey/jersey/issues/3293
- private static final Value<SSLSocketFactory> DEFAULT_SSL_SOCKET_FACTORY =
+ private static final LazyValue<SSLSocketFactory> DEFAULT_SSL_SOCKET_FACTORY =
Values.lazy((Value<SSLSocketFactory>) () -> HttpsURLConnection.getDefaultSSLSocketFactory());
// The list of restricted headers is extracted from sun.net.www.protocol.http.HttpURLConnection
private static final String[] restrictedHeaders = {
@@ -387,6 +387,10 @@
sniUri = request.getUri();
}
+ if (!DEFAULT_SSL_SOCKET_FACTORY.isInitialized() && "HTTPS".equalsIgnoreCase(sniUri.getScheme())) {
+ DEFAULT_SSL_SOCKET_FACTORY.get();
+ }
+
proxy.ifPresent(clientProxy -> ClientProxy.setBasicAuthorizationHeader(request.getHeaders(), proxy.get()));
uc = this.connectionFactory.getConnection(sniUri.toURL(), proxy.isPresent() ? proxy.get().proxy() : null);
uc.setDoInput(true);
diff --git a/core-common/pom.xml b/core-common/pom.xml
index 47de5b9..016395e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -425,6 +425,9 @@
<profile>
<id>securityOff</id>
+ <activation>
+ <jdk>[24,)</jdk>
+ </activation>
<properties>
<surefire.security.argline />
</properties>
@@ -433,12 +436,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/SecurityManagerConfiguredTest.java</exclude>
- <exclude>**/ReflectionHelperTest.java</exclude>
- </excludes>
- </configuration>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <configuration>
+ <excludes>
+ <exclude>**/SecurityManagerConfiguredTest.java</exclude>
+ <exclude>**/ReflectionHelperTest.java</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
diff --git a/core-common/src/main/java/module-info.java b/core-common/src/main/java/module-info.java
index 91bfb0b..a1017e3 100644
--- a/core-common/src/main/java/module-info.java
+++ b/core-common/src/main/java/module-info.java
@@ -72,7 +72,8 @@
org.glassfish.jersey.container.servlet.core,
org.glassfish.jersey.apache5.connector,
org.glassfish.jersey.apache.connector;
- exports org.glassfish.jersey.innate.spi to org.glassfish.jersey.media.multipart;
+ exports org.glassfish.jersey.innate.spi to org.glassfish.jersey.core.client,
+ org.glassfish.jersey.media.multipart;
exports org.glassfish.jersey.innate.inject.spi to org.glassfish.jersey.inject.hk2;
opens org.glassfish.jersey.innate.spi to org.glassfish.jersey.media.multipart;
diff --git a/core-common/src/main/java/org/glassfish/jersey/innate/io/InputStreamWrapper.java b/core-common/src/main/java/org/glassfish/jersey/innate/io/InputStreamWrapper.java
index c2109fe..abcee6b 100644
--- a/core-common/src/main/java/org/glassfish/jersey/innate/io/InputStreamWrapper.java
+++ b/core-common/src/main/java/org/glassfish/jersey/innate/io/InputStreamWrapper.java
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
/**
* Generic wrapper template for InputStream.
@@ -55,6 +56,22 @@
}
@Override
+ public byte[] readAllBytes() throws IOException {
+ return getWrappedIOE().readAllBytes();
+ }
+
+ @Override
+ public int readNBytes(byte[] b, int off, int len) throws IOException {
+ return getWrappedIOE().readNBytes(b, off, len);
+ }
+
+ @Override
+ public long transferTo(OutputStream out) throws IOException {
+ return getWrappedIOE().transferTo(out);
+ }
+
+
+ @Override
public long skip(long n) throws IOException {
return getWrappedIOE().skip(n);
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/innate/spi/MessageBodyWorkersSettable.java b/core-common/src/main/java/org/glassfish/jersey/innate/spi/MessageBodyWorkersSettable.java
new file mode 100644
index 0000000..09c751e
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/innate/spi/MessageBodyWorkersSettable.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.innate.spi;
+
+import org.glassfish.jersey.message.MessageBodyWorkers;
+
+/**
+ * Entity type that expects the {@link MessageBodyWorkers} to be set for converting the entity to another types.
+ */
+public interface MessageBodyWorkersSettable {
+
+ /**
+ * Set message body workers used to transform an entity stream into particular Java type.
+ *
+ * @param messageBodyWorkers message body workers.
+ */
+ public void setMessageBodyWorkers(final MessageBodyWorkers messageBodyWorkers);
+}
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java
index 5798695..aafb278 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/ParamConverters.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 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
@@ -125,7 +125,7 @@
@Singleton
public static class StringConstructor extends ParamConverterCompliance implements ParamConverterProvider {
- private StringConstructor(boolean canReturnNull) {
+ protected StringConstructor(boolean canReturnNull) {
super(canReturnNull);
}
@@ -154,7 +154,7 @@
@Singleton
public static class TypeValueOf extends ParamConverterCompliance implements ParamConverterProvider {
- private TypeValueOf(boolean canReturnNull) {
+ protected TypeValueOf(boolean canReturnNull) {
super(canReturnNull);
}
@@ -182,7 +182,7 @@
@Singleton
public static class TypeFromString extends ParamConverterCompliance implements ParamConverterProvider {
- private TypeFromString(boolean canReturnNull) {
+ protected TypeFromString(boolean canReturnNull) {
super(canReturnNull);
}
@@ -210,7 +210,7 @@
@Singleton
public static class TypeFromStringEnum extends TypeFromString {
- private TypeFromStringEnum(boolean canReturnNull) {
+ protected TypeFromStringEnum(boolean canReturnNull) {
super(canReturnNull);
}
@@ -225,7 +225,7 @@
@Singleton
public static class CharacterProvider extends ParamConverterCompliance implements ParamConverterProvider {
- private CharacterProvider(boolean canReturnNull) {
+ protected CharacterProvider(boolean canReturnNull) {
super(canReturnNull);
}
@@ -270,7 +270,7 @@
@Singleton
public static class DateProvider extends ParamConverterCompliance implements ParamConverterProvider {
- private DateProvider(boolean canReturnNull) {
+ protected DateProvider(boolean canReturnNull) {
super(canReturnNull);
}
@@ -346,7 +346,7 @@
// Delegates to this provider when the type of Optional is extracted.
private final InjectionManager manager;
- public OptionalCustomProvider(InjectionManager manager, boolean canReturnNull) {
+ protected OptionalCustomProvider(InjectionManager manager, boolean canReturnNull) {
super(canReturnNull);
this.manager = manager;
}
@@ -402,6 +402,8 @@
@Singleton
public static class OptionalProvider implements ParamConverterProvider {
+ protected OptionalProvider() {}
+
@Override
public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
final Optionals optionals = Optionals.getOptional(rawType);
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/EntityInputStream.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/EntityInputStream.java
index f94d5fd..2610e17 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/EntityInputStream.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/EntityInputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -22,6 +22,7 @@
import jakarta.ws.rs.ProcessingException;
+import org.glassfish.jersey.innate.io.InputStreamWrapper;
import org.glassfish.jersey.internal.LocalizationMessages;
/**
@@ -33,7 +34,7 @@
*
* @author Marek Potociar
*/
-public class EntityInputStream extends InputStream {
+public class EntityInputStream extends InputStreamWrapper {
private InputStream input;
private boolean closed = false;
@@ -64,40 +65,6 @@
this.input = input;
}
- @Override
- public int read() throws IOException {
- return input.read();
- }
-
- @Override
- public int read(byte[] b) throws IOException {
- return input.read(b);
- }
-
- @Override
- public int read(byte[] b, int off, int len) throws IOException {
- return input.read(b, off, len);
- }
-
- @Override
- public long skip(long n) throws IOException {
- return input.skip(n);
- }
-
- @Override
- public int available() throws IOException {
- return input.available();
- }
-
- @Override
- public void mark(int readLimit) {
- input.mark(readLimit);
- }
-
- @Override
- public boolean markSupported() {
- return input.markSupported();
- }
/**
* {@inheritDoc}
@@ -232,4 +199,9 @@
public final void setWrappedStream(InputStream wrapped) {
input = wrapped;
}
+
+ @Override
+ protected InputStream getWrapped() {
+ return input;
+ }
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundJaxrsResponse.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundJaxrsResponse.java
index 4db8b21..87fc281 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundJaxrsResponse.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundJaxrsResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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 java.util.Date;
import java.util.HashSet;
import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -200,7 +202,12 @@
@Override
public void close() throws ProcessingException {
closed = true;
- context.close();
+ try {
+ context.close();
+ } catch (Exception e) {
+ // Just log the exception
+ Logger.getLogger(OutboundJaxrsResponse.class.getName()).log(Level.FINE, e.getMessage(), e);
+ }
if (buffered) {
// release buffer
context.setEntity(null);
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundMessageContext.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundMessageContext.java
index b1b7745..ceb1540 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundMessageContext.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/OutboundMessageContext.java
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.io.UncheckedIOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -27,8 +28,6 @@
import java.util.Locale;
import java.util.Set;
import java.util.function.Function;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import java.util.stream.Collectors;
import jakarta.ws.rs.core.Configuration;
@@ -557,6 +556,7 @@
/**
* Closes the context. Flushes and closes the entity stream.
+ * @throws UncheckedIOException if IO errors
*/
public void close() {
if (hasEntity()) {
@@ -567,11 +567,7 @@
}
es.close();
} catch (IOException e) {
- // Happens when the client closed connection before receiving the full response.
- // This is OK and not interesting in the vast majority of the cases
- // hence the log level set to FINE to make sure it does not flood the log unnecessarily
- // (especially for clients disconnecting from SSE listening, which is very common).
- Logger.getLogger(OutboundMessageContext.class.getName()).log(Level.FINE, e.getMessage(), e);
+ throw new UncheckedIOException(e);
} finally {
// In case some of the output stream wrapper does not delegate close() call we
// close the root stream manually to make sure it commits the data.
@@ -579,8 +575,7 @@
try {
committingOutputStream.close();
} catch (IOException e) {
- // Just log the exception
- Logger.getLogger(OutboundMessageContext.class.getName()).log(Level.FINE, e.getMessage(), e);
+ throw new UncheckedIOException(e);
}
}
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/model/Parameter.java b/core-common/src/main/java/org/glassfish/jersey/model/Parameter.java
index 4f7af42..4183568 100644
--- a/core-common/src/main/java/org/glassfish/jersey/model/Parameter.java
+++ b/core-common/src/main/java/org/glassfish/jersey/model/Parameter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -446,14 +446,20 @@
parameterClass);
}
-
private static String getValue(Annotation a) {
try {
- Method m = a.annotationType().getMethod("value");
- if (m.getReturnType() != String.class) {
- return null;
+ Method[] methods = a.annotationType().getMethods();
+ for (Method method : methods) {
+ if ("value".equals(method.getName())) {
+ if (method.getReturnType() != String.class) {
+ return null;
+ } else {
+ return (String) method.invoke(a);
+ }
+ }
}
- return (String) m.invoke(a);
+ LOGGER.log(Level.FINER, () ->
+ String.format("Unable to get the %s annotation value property", a.getClass().getName()));
} catch (Exception ex) {
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.log(Level.FINER,
diff --git a/core-common/src/test/java/org/glassfish/jersey/internal/config/ExternalPropertiesConfigurationFactoryTest.java b/core-common/src/test/java/org/glassfish/jersey/internal/config/ExternalPropertiesConfigurationFactoryTest.java
index 6f1f7b1..ff3e9ef 100644
--- a/core-common/src/test/java/org/glassfish/jersey/internal/config/ExternalPropertiesConfigurationFactoryTest.java
+++ b/core-common/src/test/java/org/glassfish/jersey/internal/config/ExternalPropertiesConfigurationFactoryTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,11 +30,14 @@
public class ExternalPropertiesConfigurationFactoryTest {
+ private static boolean isSecurityManager;
+
/**
* Predefine some properties to be read from config
*/
@BeforeAll
public static void setUp() {
+ isSecurityManager = System.getSecurityManager() != null;
System.setProperty(CommonProperties.ALLOW_SYSTEM_PROPERTIES_PROVIDER, Boolean.TRUE.toString());
System.setProperty("jersey.config.server.provider.scanning.recursive", "PASSED");
@@ -53,7 +56,11 @@
public void readSystemPropertiesTest() {
final Object result =
readExternalPropertiesMap().get("jersey.config.server.provider.scanning.recursive");
- Assertions.assertNull(result);
+ if (isSecurityManager) {
+ Assertions.assertNull(result);
+ } else {
+ Assertions.assertEquals("PASSED", result);
+ }
Assertions.assertEquals(Boolean.TRUE,
getConfig().isProperty(CommonProperties.JSON_PROCESSING_FEATURE_DISABLE));
Assertions.assertEquals(Boolean.TRUE,
@@ -81,8 +88,11 @@
inputProperties.put("org.jersey.microprofile.config.added", "ADDED");
getConfig().mergeProperties(inputProperties);
final Object result = readExternalPropertiesMap().get("jersey.config.server.provider.scanning.recursive");
- Assertions.assertNull(result);
- Assertions.assertNull(readExternalPropertiesMap().get("org.jersey.microprofile.config.added"));
+ final Object resultAdded = readExternalPropertiesMap().get("org.jersey.microprofile.config.added");
+ if (isSecurityManager) {
+ Assertions.assertNull(result);
+ Assertions.assertNull(resultAdded);
+ }
}
}
diff --git a/core-server/pom.xml b/core-server/pom.xml
index f87b600..af9617f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -265,6 +265,9 @@
<profiles>
<profile>
<id>securityOff</id>
+ <activation>
+ <jdk>[24,)</jdk>
+ </activation>
<properties>
<surefire.security.argline />
</properties>
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Attribute.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Attribute.java
index f63fc71..1fe6dbf 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Attribute.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Attribute.java
@@ -44,11 +44,11 @@
public final String type;
/**
- * The raw content of this attribute, only used for unknown attributes (see {@link #isUnknown()}).
- * The 6 header bytes of the attribute (attribute_name_index and attribute_length) are <i>not</i>
- * included.
+ * The raw content of this attribute, as returned by {@link
+ * #write(ClassWriter,byte[],int,int,int)}. The 6 header bytes of the attribute
+ * (attribute_name_index and attribute_length) are <i>not</i> included.
*/
- private byte[] content;
+ private ByteVector cachedContent;
/**
* The next attribute in this attribute list (Attribute instances can be linked via this field to
@@ -93,7 +93,9 @@
*
* @return the labels corresponding to this attribute, or {@literal null} if this attribute is not
* a Code attribute that contains labels.
+ * @deprecated no longer used by ASM.
*/
+ @Deprecated
protected Label[] getLabels() {
return new Label[0];
}
@@ -115,7 +117,9 @@
* attribute header bytes (attribute_name_index and attribute_length) are not taken into
* account here.
* @param labels the labels of the method's code, or {@literal null} if the attribute to be read
- * is not a Code attribute.
+ * is not a Code attribute. Labels defined in the attribute must be created and added to this
+ * array, if not already present, by calling the {@link #readLabel} method (do not create
+ * {@link Label} instances directly).
* @return a <i>new</i> {@link Attribute} object corresponding to the specified bytes.
*/
protected Attribute read(
@@ -126,16 +130,99 @@
final int codeAttributeOffset,
final Label[] labels) {
Attribute attribute = new Attribute(type);
- attribute.content = new byte[length];
- System.arraycopy(classReader.classFileBuffer, offset, attribute.content, 0, length);
+ attribute.cachedContent = new ByteVector(classReader.readBytes(offset, length));
return attribute;
}
/**
+ * Reads an attribute with the same {@link #type} as the given attribute. This method returns a
+ * new {@link Attribute} object, corresponding to the 'length' bytes starting at 'offset', in the
+ * given ClassReader.
+ *
+ * @param attribute The attribute prototype that is used for reading.
+ * @param classReader the class that contains the attribute to be read.
+ * @param offset index of the first byte of the attribute's content in {@link ClassReader}. The 6
+ * attribute header bytes (attribute_name_index and attribute_length) are not taken into
+ * account here.
+ * @param length the length of the attribute's content (excluding the 6 attribute header bytes).
+ * @param charBuffer the buffer to be used to call the ClassReader methods requiring a
+ * 'charBuffer' parameter.
+ * @param codeAttributeOffset index of the first byte of content of the enclosing Code attribute
+ * in {@link ClassReader}, or -1 if the attribute to be read is not a Code attribute. The 6
+ * attribute header bytes (attribute_name_index and attribute_length) are not taken into
+ * account here.
+ * @param labels the labels of the method's code, or {@literal null} if the attribute to be read
+ * is not a Code attribute. Labels defined in the attribute are added to this array, if not
+ * already present.
+ * @return a new {@link Attribute} object corresponding to the specified bytes.
+ */
+ public static Attribute read(
+ final Attribute attribute,
+ final ClassReader classReader,
+ final int offset,
+ final int length,
+ final char[] charBuffer,
+ final int codeAttributeOffset,
+ final Label[] labels) {
+ return attribute.read(classReader, offset, length, charBuffer, codeAttributeOffset, labels);
+ }
+
+ /**
+ * Returns the label corresponding to the given bytecode offset by calling {@link
+ * ClassReader#readLabel}. This creates and adds the label to the given array if it is not already
+ * present. Note that this created label may be a {@link Label} subclass instance, if the given
+ * ClassReader overrides {@link ClassReader#readLabel}. Hence {@link #read(ClassReader, int, int,
+ * char[], int, Label[])} must not manually create {@link Label} instances.
+ *
+ * @param bytecodeOffset a bytecode offset in a method.
+ * @param labels the already created labels, indexed by their offset. If a label already exists
+ * for bytecodeOffset this method does not create a new one. Otherwise it stores the new label
+ * in this array.
+ * @return a label for the given bytecode offset.
+ */
+ public static Label readLabel(
+ final ClassReader classReader, final int bytecodeOffset, final Label[] labels) {
+ return classReader.readLabel(bytecodeOffset, labels);
+ }
+
+ /**
+ * Calls {@link #write(ClassWriter,byte[],int,int,int)} if it has not already been called and
+ * returns its result or its (cached) previous result.
+ *
+ * @param classWriter the class to which this attribute must be added. This parameter can be used
+ * to add the items that corresponds to this attribute to the constant pool of this class.
+ * @param code the bytecode of the method corresponding to this Code attribute, or {@literal null}
+ * if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code
+ * attribute.
+ * @param codeLength the length of the bytecode of the method corresponding to this code
+ * attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length'
+ * field of the Code attribute.
+ * @param maxStack the maximum stack size of the method corresponding to this Code attribute, or
+ * -1 if this attribute is not a Code attribute.
+ * @param maxLocals the maximum number of local variables of the method corresponding to this code
+ * attribute, or -1 if this attribute is not a Code attribute.
+ * @return the byte array form of this attribute.
+ */
+ private ByteVector maybeWrite(
+ final ClassWriter classWriter,
+ final byte[] code,
+ final int codeLength,
+ final int maxStack,
+ final int maxLocals) {
+ if (cachedContent == null) {
+ cachedContent = write(classWriter, code, codeLength, maxStack, maxLocals);
+ }
+ return cachedContent;
+ }
+
+ /**
* Returns the byte array form of the content of this attribute. The 6 header bytes
* (attribute_name_index and attribute_length) must <i>not</i> be added in the returned
* ByteVector.
*
+ * <p>This method is only invoked once to compute the binary form of this attribute. Subsequent
+ * changes to the attribute after it was written for the first time will not be considered.
+ *
* @param classWriter the class to which this attribute must be added. This parameter can be used
* to add the items that corresponds to this attribute to the constant pool of this class.
* @param code the bytecode of the method corresponding to this Code attribute, or {@literal null}
@@ -156,7 +243,39 @@
final int codeLength,
final int maxStack,
final int maxLocals) {
- return new ByteVector(content);
+ return cachedContent;
+ }
+
+ /**
+ * Returns the byte array form of the content of the given attribute. The 6 header bytes
+ * (attribute_name_index and attribute_length) are <i>not</i> added in the returned byte array.
+ *
+ * @param attribute The attribute that should be written.
+ * @param classWriter the class to which this attribute must be added. This parameter can be used
+ * to add the items that corresponds to this attribute to the constant pool of this class.
+ * @param code the bytecode of the method corresponding to this Code attribute, or {@literal null}
+ * if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code
+ * attribute.
+ * @param codeLength the length of the bytecode of the method corresponding to this code
+ * attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length'
+ * field of the Code attribute.
+ * @param maxStack the maximum stack size of the method corresponding to this Code attribute, or
+ * -1 if this attribute is not a Code attribute.
+ * @param maxLocals the maximum number of local variables of the method corresponding to this code
+ * attribute, or -1 if this attribute is not a Code attribute.
+ * @return the byte array form of this attribute.
+ */
+ public static byte[] write(
+ final Attribute attribute,
+ final ClassWriter classWriter,
+ final byte[] code,
+ final int codeLength,
+ final int maxStack,
+ final int maxLocals) {
+ ByteVector content = attribute.maybeWrite(classWriter, code, codeLength, maxStack, maxLocals);
+ byte[] result = new byte[content.length];
+ System.arraycopy(content.data, 0, result, 0, content.length);
+ return result;
}
/**
@@ -221,7 +340,7 @@
Attribute attribute = this;
while (attribute != null) {
symbolTable.addConstantUtf8(attribute.type);
- size += 6 + attribute.write(classWriter, code, codeLength, maxStack, maxLocals).length;
+ size += 6 + attribute.maybeWrite(classWriter, code, codeLength, maxStack, maxLocals).length;
attribute = attribute.nextAttribute;
}
return size;
@@ -308,7 +427,7 @@
Attribute attribute = this;
while (attribute != null) {
ByteVector attributeContent =
- attribute.write(classWriter, code, codeLength, maxStack, maxLocals);
+ attribute.maybeWrite(classWriter, code, codeLength, maxStack, maxLocals);
// Put attribute_name_index and attribute_length.
output.putShort(symbolTable.addConstantUtf8(attribute.type)).putInt(attributeContent.length);
output.putByteArray(attributeContent.data, 0, attributeContent.length);
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
index a2bdae3..f5d846a 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassReader.java
@@ -195,7 +195,7 @@
this.b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
- if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V23) {
+ if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V24) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
@@ -3598,6 +3598,20 @@
}
/**
+ * Reads several bytes in this {@link ClassReader}. <i>This method is intended for {@link
+ * Attribute} sub classes, and is normally not needed by class generators or adapters.</i>
+ *
+ * @param offset the start offset of the bytes to be read in this {@link ClassReader}.
+ * @param length the number of bytes to read.
+ * @return the read bytes.
+ */
+ public byte[] readBytes(final int offset, final int length) {
+ byte[] result = new byte[length];
+ System.arraycopy(classFileBuffer, offset, result, 0, length);
+ return result;
+ }
+
+ /**
* Reads an unsigned short value in this {@link ClassReader}. <i>This method is intended for
* {@link Attribute} sub classes, and is normally not needed by class generators or adapters.</i>
*
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
index 0af80ce..fa16ac9 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/ClassWriter.java
@@ -264,13 +264,7 @@
super(/* latest api = */ Opcodes.ASM9);
this.flags = flags;
symbolTable = classReader == null ? new SymbolTable(this) : new SymbolTable(this, classReader);
- if ((flags & COMPUTE_FRAMES) != 0) {
- compute = MethodWriter.COMPUTE_ALL_FRAMES;
- } else if ((flags & COMPUTE_MAXS) != 0) {
- compute = MethodWriter.COMPUTE_MAX_STACK_AND_LOCAL;
- } else {
- compute = MethodWriter.COMPUTE_NOTHING;
- }
+ setFlags(flags);
}
// -----------------------------------------------------------------------------------------------
@@ -1020,6 +1014,28 @@
return symbolTable.addConstantNameAndType(name, descriptor);
}
+ /**
+ * Changes the computation strategy of method properties like max stack size, max number of local
+ * variables, and frames.
+ *
+ * <p><b>WARNING</b>: {@link #setFlags(int)} method changes the behavior of new method visitors
+ * returned from {@link #visitMethod(int, String, String, String, String[])}. The behavior will be
+ * changed only after the next method visitor is returned. All the previously returned method
+ * visitors keep their previous behavior.
+ *
+ * @param flags option flags that can be used to modify the default behavior of this class. Must
+ * be zero or more of {@link #COMPUTE_MAXS} and {@link #COMPUTE_FRAMES}.
+ */
+ public final void setFlags(final int flags) {
+ if ((flags & ClassWriter.COMPUTE_FRAMES) != 0) {
+ compute = MethodWriter.COMPUTE_ALL_FRAMES;
+ } else if ((flags & ClassWriter.COMPUTE_MAXS) != 0) {
+ compute = MethodWriter.COMPUTE_MAX_STACK_AND_LOCAL;
+ } else {
+ compute = MethodWriter.COMPUTE_NOTHING;
+ }
+ }
+
// -----------------------------------------------------------------------------------------------
// Default method to compute common super classes when computing stack map frames
// -----------------------------------------------------------------------------------------------
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Constants.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Constants.java
index 9e7b98c..1c79ca7 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Constants.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Constants.java
@@ -215,7 +215,7 @@
}
if (minorVersion != 0xFFFF) {
throw new IllegalStateException(
- "ASM9_EXPERIMENTAL can only be used by classes compiled with --enable-preview");
+ "ASM10_EXPERIMENTAL can only be used by classes compiled with --enable-preview");
}
}
}
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
index c8a482b..e2f2c92 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodVisitor.java
@@ -34,15 +34,16 @@
* visitTypeAnnotation} | {@code visitAttribute} )* [ {@code visitCode} ( {@code visitFrame} |
* {@code visit<i>X</i>Insn} | {@code visitLabel} | {@code visitInsnAnnotation} | {@code
* visitTryCatchBlock} | {@code visitTryCatchAnnotation} | {@code visitLocalVariable} | {@code
- * visitLocalVariableAnnotation} | {@code visitLineNumber} )* {@code visitMaxs} ] {@code visitEnd}.
- * In addition, the {@code visit<i>X</i>Insn} and {@code visitLabel} methods must be called in the
- * sequential order of the bytecode instructions of the visited code, {@code visitInsnAnnotation}
- * must be called <i>after</i> the annotated instruction, {@code visitTryCatchBlock} must be called
- * <i>before</i> the labels passed as arguments have been visited, {@code
- * visitTryCatchBlockAnnotation} must be called <i>after</i> the corresponding try catch block has
- * been visited, and the {@code visitLocalVariable}, {@code visitLocalVariableAnnotation} and {@code
- * visitLineNumber} methods must be called <i>after</i> the labels passed as arguments have been
- * visited.
+ * visitLocalVariableAnnotation} | {@code visitLineNumber} | {@code visitAttribute} )* {@code
+ * visitMaxs} ] {@code visitEnd}. In addition, the {@code visit<i>X</i>Insn} and {@code visitLabel}
+ * methods must be called in the sequential order of the bytecode instructions of the visited code,
+ * {@code visitInsnAnnotation} must be called <i>after</i> the annotated instruction, {@code
+ * visitTryCatchBlock} must be called <i>before</i> the labels passed as arguments have been
+ * visited, {@code visitTryCatchBlockAnnotation} must be called <i>after</i> the corresponding try
+ * catch block has been visited, and the {@code visitLocalVariable}, {@code
+ * visitLocalVariableAnnotation} and {@code visitLineNumber} methods must be called <i>after</i> the
+ * labels passed as arguments have been visited. Finally, the {@code visitAttribute} method must be
+ * called before {@code visitCode} for non-code attributes, and after it for code attributes.
*
* @author Eric Bruneton
*/
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
index bccc997..b49f443 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/MethodWriter.java
@@ -1519,14 +1519,14 @@
return lastCodeRuntimeVisibleTypeAnnotation =
new AnnotationWriter(
symbolTable,
- /* useNamedValues = */ true,
+ /* useNamedValues= */ true,
typeAnnotation,
lastCodeRuntimeVisibleTypeAnnotation);
} else {
return lastCodeRuntimeInvisibleTypeAnnotation =
new AnnotationWriter(
symbolTable,
- /* useNamedValues = */ true,
+ /* useNamedValues= */ true,
typeAnnotation,
lastCodeRuntimeInvisibleTypeAnnotation);
}
@@ -1642,7 +1642,7 @@
code.data[endOffset] = (byte) Opcodes.ATHROW;
// Emit a frame for this unreachable block, with no local and a Throwable on the stack
// (so that the ATHROW could consume this Throwable if it were reachable).
- int frameIndex = visitFrameStart(startOffset, /* numLocal = */ 0, /* numStack = */ 1);
+ int frameIndex = visitFrameStart(startOffset, /* numLocal= */ 0, /* numStack= */ 1);
currentFrame[frameIndex] =
Frame.getAbstractTypeFromInternalName(symbolTable, "java/lang/Throwable");
visitFrameEnd();
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
index f796c94..eeb3df7 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Opcodes.java
@@ -289,6 +289,7 @@
int V21 = 0 << 16 | 65;
int V22 = 0 << 16 | 66;
int V23 = 0 << 16 | 67;
+ int V24 = 0 << 16 | 68;
/**
* Version flag indicating that the class is using 'preview' features.
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Symbol.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Symbol.java
index f161884..34f3653 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Symbol.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/Symbol.java
@@ -178,7 +178,9 @@
* <li>the symbol's value for {@link #CONSTANT_INTEGER_TAG},{@link #CONSTANT_FLOAT_TAG}, {@link
* #CONSTANT_LONG_TAG}, {@link #CONSTANT_DOUBLE_TAG},
* <li>the CONSTANT_MethodHandle_info reference_kind field value for {@link
- * #CONSTANT_METHOD_HANDLE_TAG} symbols,
+ * #CONSTANT_METHOD_HANDLE_TAG} symbols (or this value left shifted by 8 bits for
+ * reference_kind values larger than or equal to H_INVOKEVIRTUAL and if the method owner is
+ * an interface),
* <li>the CONSTANT_InvokeDynamic_info bootstrap_method_attr_index field value for {@link
* #CONSTANT_INVOKE_DYNAMIC_TAG} symbols,
* <li>the offset of a bootstrap method in the BootstrapMethods boostrap_methods array, for
diff --git a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/SymbolTable.java b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/SymbolTable.java
index 9ceffb1..e5e16be 100644
--- a/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/SymbolTable.java
+++ b/core-server/src/main/java/jersey/repackaged/org/objectweb/asm/SymbolTable.java
@@ -221,7 +221,9 @@
classReader.readByte(itemOffset),
classReader.readClass(memberRefItemOffset, charBuffer),
classReader.readUTF8(nameAndTypeItemOffset, charBuffer),
- classReader.readUTF8(nameAndTypeItemOffset + 2, charBuffer));
+ classReader.readUTF8(nameAndTypeItemOffset + 2, charBuffer),
+ classReader.readByte(memberRefItemOffset - 1)
+ == Symbol.CONSTANT_INTERFACE_METHODREF_TAG);
break;
case Symbol.CONSTANT_DYNAMIC_TAG:
case Symbol.CONSTANT_INVOKE_DYNAMIC_TAG:
@@ -830,14 +832,15 @@
final String descriptor,
final boolean isInterface) {
final int tag = Symbol.CONSTANT_METHOD_HANDLE_TAG;
+ final int data = getConstantMethodHandleSymbolData(referenceKind, isInterface);
// Note that we don't need to include isInterface in the hash computation, because it is
// redundant with owner (we can't have the same owner with different isInterface values).
- int hashCode = hash(tag, owner, name, descriptor, referenceKind);
+ int hashCode = hash(tag, owner, name, descriptor, data);
Entry entry = get(hashCode);
while (entry != null) {
if (entry.tag == tag
&& entry.hashCode == hashCode
- && entry.data == referenceKind
+ && entry.data == data
&& entry.owner.equals(owner)
&& entry.name.equals(name)
&& entry.value.equals(descriptor)) {
@@ -851,8 +854,7 @@
constantPool.put112(
tag, referenceKind, addConstantMethodref(owner, name, descriptor, isInterface).index);
}
- return put(
- new Entry(constantPoolCount++, tag, owner, name, descriptor, referenceKind, hashCode));
+ return put(new Entry(constantPoolCount++, tag, owner, name, descriptor, data, hashCode));
}
/**
@@ -866,16 +868,36 @@
* @param owner the internal name of a class of interface.
* @param name a field or method name.
* @param descriptor a field or method descriptor.
+ * @param isInterface whether owner is an interface or not.
*/
private void addConstantMethodHandle(
final int index,
final int referenceKind,
final String owner,
final String name,
- final String descriptor) {
+ final String descriptor,
+ final boolean isInterface) {
final int tag = Symbol.CONSTANT_METHOD_HANDLE_TAG;
- int hashCode = hash(tag, owner, name, descriptor, referenceKind);
- add(new Entry(index, tag, owner, name, descriptor, referenceKind, hashCode));
+ final int data = getConstantMethodHandleSymbolData(referenceKind, isInterface);
+ int hashCode = hash(tag, owner, name, descriptor, data);
+ add(new Entry(index, tag, owner, name, descriptor, data, hashCode));
+ }
+
+ /**
+ * Returns the {@link Symbol#data} field for a CONSTANT_MethodHandle_info Symbol.
+ *
+ * @param referenceKind one of {@link Opcodes#H_GETFIELD}, {@link Opcodes#H_GETSTATIC}, {@link
+ * Opcodes#H_PUTFIELD}, {@link Opcodes#H_PUTSTATIC}, {@link Opcodes#H_INVOKEVIRTUAL}, {@link
+ * Opcodes#H_INVOKESTATIC}, {@link Opcodes#H_INVOKESPECIAL}, {@link
+ * Opcodes#H_NEWINVOKESPECIAL} or {@link Opcodes#H_INVOKEINTERFACE}.
+ * @param isInterface whether owner is an interface or not.
+ */
+ private static int getConstantMethodHandleSymbolData(
+ final int referenceKind, final boolean isInterface) {
+ if (referenceKind > Opcodes.H_PUTSTATIC && isInterface) {
+ return referenceKind << 8;
+ }
+ return referenceKind;
}
/**
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ContainerResponse.java b/core-server/src/main/java/org/glassfish/jersey/server/ContainerResponse.java
index bd7f7a3..a44e60e 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ContainerResponse.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ContainerResponse.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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 java.net.URI;
import java.util.Date;
import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import java.util.Map;
import java.util.Set;
@@ -400,9 +402,14 @@
public void close() {
if (!closed) {
closed = true;
- messageContext.close();
- requestContext.getResponseWriter().commit();
- requestContext.setWorkers(null);
+ try {
+ messageContext.close();
+ requestContext.setWorkers(null);
+ requestContext.getResponseWriter().commit();
+ } catch (Exception e) {
+ Logger.getLogger(ContainerResponse.class.getName()).log(Level.FINE, e.getMessage(), e);
+ requestContext.getResponseWriter().failure(e);
+ }
}
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/AnnotationAcceptingListener.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/AnnotationAcceptingListener.java
index f5384f8..917d094 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/AnnotationAcceptingListener.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/scanning/AnnotationAcceptingListener.java
@@ -309,7 +309,7 @@
private static class ClassReaderWrapper {
private static final Logger LOGGER = Logger.getLogger(ClassReader.class.getName());
- private static final int WARN_VERSION = Opcodes.V23;
+ private static final int WARN_VERSION = Opcodes.V24;
private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096;
private final byte[] b;
diff --git a/core-server/src/main/resources/META-INF/NOTICE.markdown b/core-server/src/main/resources/META-INF/NOTICE.markdown
index 27c798d..2016cb4 100644
--- a/core-server/src/main/resources/META-INF/NOTICE.markdown
+++ b/core-server/src/main/resources/META-INF/NOTICE.markdown
@@ -36,7 +36,7 @@
* Copyright (c) 2015-2018 Oracle and/or its affiliates. All rights reserved.
* Copyright 2010-2013 Coda Hale and Yammer, Inc.
-org.objectweb.asm Version 9.7
+org.objectweb.asm Version 9.7.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved.
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterDateTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterDateTest.java
index 1f14c63..91acc2a 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterDateTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterDateTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -40,6 +40,8 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ParamConverterDateTest extends AbstractTest {
+ private final String format = "EEE MMM dd HH:mm:ss Z yyyy";
+ private final SimpleDateFormat formatter = new SimpleDateFormat(format, new Locale("US"));
@Path("/")
public static class DateResource {
@@ -55,7 +57,7 @@
public void testDateResource() throws ExecutionException, InterruptedException {
initiateWebApplication(getBinder(), ParamConverterDateTest.DateResource.class);
final ContainerResponse responseContext = getResponseContext(UriBuilder.fromPath("/")
- .queryParam("d", new Date()).build().toString());
+ .queryParam("d", formatter.format(new Date())).build().toString());
assertEquals(200, responseContext.getStatus());
}
@@ -80,8 +82,6 @@
);
}
try {
- final String format = "EEE MMM dd HH:mm:ss Z yyyy";
- final SimpleDateFormat formatter = new SimpleDateFormat(format, new Locale("US"));
return rawType.cast(formatter.parse(value));
} catch (final ParseException ex) {
throw new ExtractorException(ex);
diff --git a/docs/pom.xml b/docs/pom.xml
index 329183d..e4a4f8d 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/docs/src/main/docbook/media.xml b/docs/src/main/docbook/media.xml
index 34d2a7d..f27d2f0 100644
--- a/docs/src/main/docbook/media.xml
+++ b/docs/src/main/docbook/media.xml
@@ -1129,7 +1129,7 @@
public class JsonbContextResolver implements ContextResolver<Jsonb> {
@Override
- public Jsonb getContext(Class>?< type) {
+ public Jsonb getContext(Class<?> type) {
JsonbConfig config = new JsonbConfig();
// configure JsonbConfig
...
diff --git a/etc/config/copyright-exclude b/etc/config/copyright-exclude
index de5bfc6..9c4e32d 100644
--- a/etc/config/copyright-exclude
+++ b/etc/config/copyright-exclude
@@ -93,3 +93,4 @@
/media/json-binding/src/test/java/org/glassfish/jersey/jsonb/internal/JsonBindingProviderTest.java
/connectors/jdk-connector/src/test/resources
/tools
+/media/multipart/src/test/resources/multipart
diff --git a/etc/jenkins/Jenkinsfile_EE4J_build b/etc/jenkins/Jenkinsfile_EE4J_build
index 65a8b56..609d150 100644
--- a/etc/jenkins/Jenkinsfile_EE4J_build
+++ b/etc/jenkins/Jenkinsfile_EE4J_build
@@ -5,6 +5,10 @@
triggers {
pollSCM('H H * * *')
}
+ options {
+ disableConcurrentBuilds()
+ buildDiscarder(logRotator(numToKeepStr:'15', artifactNumToKeepStr: '2' ))
+ }
tools {
jdk 'oracle-jdk8-latest'
maven 'apache-maven-latest'
diff --git a/etc/jenkins/Jenkinsfile_ci_build b/etc/jenkins/Jenkinsfile_ci_build
index cc3401f..276cc17 100644
--- a/etc/jenkins/Jenkinsfile_ci_build
+++ b/etc/jenkins/Jenkinsfile_ci_build
@@ -3,6 +3,8 @@
options {
timeout(time: 30, activity: true, unit: 'HOURS')
+ buildDiscarder(logRotator(numToKeepStr:'15', artifactNumToKeepStr: '2' ))
+ disableConcurrentBuilds()
}
stages {
diff --git a/etc/jenkins/Jenkinsfile_master_build b/etc/jenkins/Jenkinsfile_master_build
index a4c5483..9b62947 100644
--- a/etc/jenkins/Jenkinsfile_master_build
+++ b/etc/jenkins/Jenkinsfile_master_build
@@ -5,6 +5,10 @@
triggers {
pollSCM('H H * * *')
}
+ options {
+ disableConcurrentBuilds()
+ buildDiscarder(logRotator(numToKeepStr:'15', artifactNumToKeepStr: '2' ))
+ }
tools {
jdk 'oracle-jdk8-latest'
maven 'apache-maven-latest'
diff --git a/examples/NOTICE.md b/examples/NOTICE.md
index 6f522b3..ed616c2 100644
--- a/examples/NOTICE.md
+++ b/examples/NOTICE.md
@@ -71,7 +71,7 @@
* Project: http://www.javassist.org/
* Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
-Jackson JAX-RS Providers Version 2.17.2
+Jackson JAX-RS Providers Version 2.18.0
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2023 FasterXML, LLC. All rights reserved unless otherwise indicated.
@@ -96,7 +96,7 @@
* Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS
* Copyright: Eric Rowell
-org.objectweb.asm Version 9.7
+org.objectweb.asm Version 9.7.1
* License: Modified BSD (https://asm.ow2.io/license.html)
* Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved.
diff --git a/examples/assemblies/pom.xml b/examples/assemblies/pom.xml
index 840d169..defda8f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 d2aeec0..853e732 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 7db8bdb..173c3d3 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 9a9df87..220a6f9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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:
diff --git a/examples/cdi-webapp/pom.xml b/examples/cdi-webapp/pom.xml
index aa597e1..f84bd16 100644
--- a/examples/cdi-webapp/pom.xml
+++ b/examples/cdi-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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-programmatic/pom.xml b/examples/clipboard-programmatic/pom.xml
index b105240..5dcaddb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 1b02500..67ced27 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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/configured-client/pom.xml b/examples/configured-client/pom.xml
index 5e341e5..443a713 100644
--- a/examples/configured-client/pom.xml
+++ b/examples/configured-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 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 f74187e..ded117e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 1a93a33..e6740b2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 8d00104..7291abb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 38bf12f..359bd51 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 4966661..8fa1804 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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/extended-wadl-webapp/pom.xml b/examples/extended-wadl-webapp/pom.xml
index 424808a..fce24b1 100644
--- a/examples/extended-wadl-webapp/pom.xml
+++ b/examples/extended-wadl-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 9a48724..a5c09ac 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 1d353ef..c16feed 100644
--- a/examples/groovy/pom.xml
+++ b/examples/groovy/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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
@@ -54,6 +54,18 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-engine</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -125,10 +137,12 @@
<goal>removeTestStubs</goal>
<goal>groovydoc</goal>
</goals>
+ <configuration>
+ <targetBytecode>11</targetBytecode>
+ </configuration>
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
diff --git a/examples/helloworld-benchmark/pom.xml b/examples/helloworld-benchmark/pom.xml
index 1c4ff36..484425d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 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-cdi2-se/pom.xml b/examples/helloworld-cdi2-se/pom.xml
index ffdc694..2ce6028 100644
--- a/examples/helloworld-cdi2-se/pom.xml
+++ b/examples/helloworld-cdi2-se/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 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 2d93501..356b250 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 2025 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 4b9800a..e599d69 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 4cf9d86..a57ae55 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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-annotations/pom.xml b/examples/helloworld-spring-annotations/pom.xml
index 6f6a02a..31a7e88 100644
--- a/examples/helloworld-spring-annotations/pom.xml
+++ b/examples/helloworld-spring-annotations/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 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
@@ -73,7 +73,6 @@
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- <version>${commons.logging.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
diff --git a/examples/helloworld-spring-webapp/pom.xml b/examples/helloworld-spring-webapp/pom.xml
index 3c944a9..4b4937e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 1a6e33e..979ad14 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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/pom.xml b/examples/helloworld-weld/pom.xml
index 173f831..525986c 100644
--- a/examples/helloworld-weld/pom.xml
+++ b/examples/helloworld-weld/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 dbce15d..56708f7 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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-patch/pom.xml b/examples/http-patch/pom.xml
index adc28d7..80db3f3 100644
--- a/examples/http-patch/pom.xml
+++ b/examples/http-patch/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 094ee32..2132d42 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 c746082..ece4643 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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-server-glassfish/pom.xml b/examples/https-server-glassfish/pom.xml
index 45986d9..8075f5d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 6b68484..99584a4 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 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 e231629..3cca828 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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/jaxrs-types-injection/pom.xml b/examples/jaxrs-types-injection/pom.xml
index 0dfa0bd..1c2c80a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 57da3d0..d99f597 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 8764047..43fa250 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 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 65a975d..0c8a048 100644
--- a/examples/json-jackson/pom.xml
+++ b/examples/json-jackson/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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-jettison/pom.xml b/examples/json-jettison/pom.xml
index 803e10b..0ce37b9 100644
--- a/examples/json-jettison/pom.xml
+++ b/examples/json-jettison/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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-moxy/pom.xml b/examples/json-moxy/pom.xml
index b2013e6..4df878e 100644
--- a/examples/json-moxy/pom.xml
+++ b/examples/json-moxy/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 50e42ab..7f71dfc 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 4cc0bd4..bbb310d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 a5c1ebd..f30f8aa 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 5e59f48..c151b6a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 2b8d9c3..3b35c8a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 8a766b4..8b3bb3e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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/micrometer/pom.xml b/examples/micrometer/pom.xml
index 6d4c0d5..18ca982 100644
--- a/examples/micrometer/pom.xml
+++ b/examples/micrometer/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 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 6350442..d22e8d6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 4541ea1..0e7a847 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 6ee5120..90fb9ca 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 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 9553b68..2393524 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 40daeaa..458a1cf 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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/functional-test/pom.xml b/examples/osgi-helloworld-webapp/functional-test/pom.xml
index 5014c5e..81ac944 100644
--- a/examples/osgi-helloworld-webapp/functional-test/pom.xml
+++ b/examples/osgi-helloworld-webapp/functional-test/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 243a982..743a5c1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 33cf268..3775e19 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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
@@ -25,16 +25,21 @@
<name>jersey-examples-osgi-helloworld-webapp</name>
<packaging>pom</packaging>
- <modules>
- <module>war-bundle</module>
- <module>functional-test</module>
- <module>lib-bundle</module>
- <module>additional-bundle</module>
- <module>alternate-version-bundle</module>
- </modules>
-
<profiles>
<profile>
+ <id>securityOn</id>
+ <activation>
+ <jdk>[11,24)</jdk>
+ </activation>
+ <modules>
+ <module>war-bundle</module>
+ <module>functional-test</module>
+ <module>lib-bundle</module>
+ <module>additional-bundle</module>
+ <module>alternate-version-bundle</module>
+ </modules>
+ </profile>
+ <profile>
<id>pre-release</id>
<build>
<plugins>
diff --git a/examples/osgi-helloworld-webapp/war-bundle/pom.xml b/examples/osgi-helloworld-webapp/war-bundle/pom.xml
index c867b58..790c4ab 100644
--- a/examples/osgi-helloworld-webapp/war-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/war-bundle/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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/pom.xml b/examples/pom.xml
index eeaa80a..8e2fa59 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 789ccd0..041f1b2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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/rest31-sebootstrap-multipart/pom.xml b/examples/rest31-sebootstrap-multipart/pom.xml
index 5d6dae4..16304cf 100644
--- a/examples/rest31-sebootstrap-multipart/pom.xml
+++ b/examples/rest31-sebootstrap-multipart/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 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 94fa73a..d96ab76 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 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 9350e11..32c11a8 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 9085cc1..2383ee5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 399782e..c9aeb07 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 551c9ac..63defcf 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 d1150ee..24c3087 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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/pom.xml b/examples/server-sent-events-jaxrs/pom.xml
index 19827bd..cd6b511 100644
--- a/examples/server-sent-events-jaxrs/pom.xml
+++ b/examples/server-sent-events-jaxrs/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 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-jersey/pom.xml b/examples/server-sent-events-jersey/pom.xml
index d7076bb..7b33a28 100644
--- a/examples/server-sent-events-jersey/pom.xml
+++ b/examples/server-sent-events-jersey/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 23fa2a9..0b0d588 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 2b4a56f..8482b16 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 793d173..99f18aa 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 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 ca3fa79..7c99e82 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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 815fc66..60c4f26 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 867f7b1..e34f979 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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 9da2791..7d67f0c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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 8f0b775..87161dc 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 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 5270668..3247430 100644
--- a/ext/bean-validation/pom.xml
+++ b/ext/bean-validation/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 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
diff --git a/ext/cdi/jersey-cdi-rs-inject/pom.xml b/ext/cdi/jersey-cdi-rs-inject/pom.xml
index 551ea1d..bc1f50d 100644
--- a/ext/cdi/jersey-cdi-rs-inject/pom.xml
+++ b/ext/cdi/jersey-cdi-rs-inject/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-ban-custom-hk2-binding/pom.xml b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
index 7a1b56a..d1b474f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-servlet/pom.xml b/ext/cdi/jersey-cdi1x-servlet/pom.xml
index 9ad8b20..24a1d19 100644
--- a/ext/cdi/jersey-cdi1x-servlet/pom.xml
+++ b/ext/cdi/jersey-cdi1x-servlet/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 af7f6f4..b6949f2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a54124c..02912a9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml
index 72ecba9..2e68812 100644
--- a/ext/cdi/jersey-weld2-se/pom.xml
+++ b/ext/cdi/jersey-weld2-se/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/ext/cdi/pom.xml
index 7fc99fc..129a0d4 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8394fd4..98d85cf 100644
--- a/ext/entity-filtering/pom.xml
+++ b/ext/entity-filtering/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 37f08bf..3a6e9c6 100644
--- a/ext/metainf-services/pom.xml
+++ b/ext/metainf-services/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/micrometer/pom.xml b/ext/micrometer/pom.xml
index e6b5e76..5583c1e 100644
--- a/ext/micrometer/pom.xml
+++ b/ext/micrometer/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/micrometer/src/main/java/org/glassfish/jersey/micrometer/server/ObservationRequestEventListener.java b/ext/micrometer/src/main/java/org/glassfish/jersey/micrometer/server/ObservationRequestEventListener.java
index 953944b..2db4cd1 100644
--- a/ext/micrometer/src/main/java/org/glassfish/jersey/micrometer/server/ObservationRequestEventListener.java
+++ b/ext/micrometer/src/main/java/org/glassfish/jersey/micrometer/server/ObservationRequestEventListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,7 @@
switch (event.getType()) {
case ON_EXCEPTION:
- if (!isNotFoundException(event)) {
+ if (!isClientError(event) || observations.get(containerRequest) != null) {
break;
}
startObservation(event);
@@ -102,13 +102,14 @@
observations.put(event.getContainerRequest(), new ObservationScopeAndContext(scope, jerseyContext));
}
- private boolean isNotFoundException(RequestEvent event) {
+ private boolean isClientError(RequestEvent event) {
Throwable t = event.getException();
if (t == null) {
return false;
}
- String className = t.getClass().getCanonicalName();
- return className.equals("jakarta.ws.rs.NotFoundException") || className.equals("jakarta.ws.rs.NotFoundException");
+ String className = t.getClass().getSuperclass().getCanonicalName();
+ return className.equals("jakarta.ws.rs.ClientErrorException")
+ || className.equals("javax.ws.rs.ClientErrorException");
}
private static class ObservationScopeAndContext {
diff --git a/ext/micrometer/src/test/java/org/glassfish/jersey/micrometer/server/observation/AbstractObservationRequestEventListenerTest.java b/ext/micrometer/src/test/java/org/glassfish/jersey/micrometer/server/observation/AbstractObservationRequestEventListenerTest.java
index 0ae7ab6..d46e855 100644
--- a/ext/micrometer/src/test/java/org/glassfish/jersey/micrometer/server/observation/AbstractObservationRequestEventListenerTest.java
+++ b/ext/micrometer/src/test/java/org/glassfish/jersey/micrometer/server/observation/AbstractObservationRequestEventListenerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -20,6 +20,7 @@
import java.util.logging.Logger;
import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.MediaType;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Tag;
@@ -38,6 +39,7 @@
import io.micrometer.tracing.test.simple.SpansAssert;
import org.glassfish.jersey.micrometer.server.ObservationApplicationEventListener;
import org.glassfish.jersey.micrometer.server.ObservationRequestEventListener;
+import org.glassfish.jersey.micrometer.server.mapper.ResourceGoneExceptionMapper;
import org.glassfish.jersey.micrometer.server.resources.TestResource;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
@@ -85,6 +87,7 @@
final ResourceConfig config = new ResourceConfig();
config.register(listener);
config.register(TestResource.class);
+ config.register(ResourceGoneExceptionMapper.class);
return config;
}
@@ -131,6 +134,53 @@
.hasTag("outcome", "SUCCESS")
.hasTag("status", "200")
.hasTag("uri", "/sub-resource/sub-hello/{name}");
+ assertThat(observationRegistry.getCurrentObservation()).isNull();
+ }
+
+ @Test
+ void errorResourcesAreTimed() {
+ try {
+ target("throws-exception").request().get();
+ }
+ catch (Exception ignored) {
+ }
+ try {
+ target("throws-webapplication-exception").request().get();
+ }
+ catch (Exception ignored) {
+ }
+ try {
+ target("throws-mappable-exception").request().get();
+ }
+ catch (Exception ignored) {
+ }
+ try {
+ target("produces-text-plain").request(MediaType.APPLICATION_JSON).get();
+ }
+ catch (Exception ignored) {
+ }
+
+ assertThat(registry.get(METRIC_NAME)
+ .tags(tagsFrom("/throws-exception", "500", "SERVER_ERROR", "IllegalArgumentException"))
+ .timer()
+ .count()).isEqualTo(1);
+
+ assertThat(registry.get(METRIC_NAME)
+ .tags(tagsFrom("/throws-webapplication-exception", "401", "CLIENT_ERROR", "NotAuthorizedException"))
+ .timer()
+ .count()).isEqualTo(1);
+
+ assertThat(registry.get(METRIC_NAME)
+ .tags(tagsFrom("/throws-mappable-exception", "410", "CLIENT_ERROR", "ResourceGoneException"))
+ .timer()
+ .count()).isEqualTo(1);
+
+ assertThat(registry.get(METRIC_NAME)
+ .tags(tagsFrom("UNKNOWN", "406", "CLIENT_ERROR", "NotAcceptableException"))
+ .timer()
+ .count()).isEqualTo(1);
+
+ assertThat(observationRegistry.getCurrentObservation()).isNull();
}
private static Iterable<Tag> tagsFrom(String uri, String status, String outcome, String exception) {
diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml
index f954c8e..7c9463c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml
index 18ed04f..948501a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-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 9f8ebd1..08eaf0a 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, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2025 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
@@ -379,6 +379,11 @@
if (!headersContext.isPresent()) {
for (InboundHeadersProvider provider : interfaceModel.context().inboundHeadersProviders()) {
inbound.putAll(provider.inboundHeaders());
+ if (RestClientBuilderImpl.DefaultInboundHeaderProvider.class.isInstance(provider)) {
+ MultivaluedMap<String, String> fromFactory =
+ ((ClientHeadersFactory) provider).update(inbound, customHeaders);
+ customHeaders.putAll(fromFactory);
+ }
}
}
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 2b7425f..687d228 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,5 +1,5 @@
/*
- * Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2025 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
@@ -47,8 +47,11 @@
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Feature;
import jakarta.ws.rs.core.FeatureContext;
+import jakarta.ws.rs.core.MultivaluedHashMap;
+import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.ext.ParamConverterProvider;
+import jakarta.ws.rs.ext.RuntimeDelegate;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.rest.client.RestClientBuilder;
@@ -56,6 +59,7 @@
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.ClientHeadersFactory;
import org.eclipse.microprofile.rest.client.ext.QueryParamStyle;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
import org.eclipse.microprofile.rest.client.spi.RestClientListener;
@@ -66,10 +70,12 @@
import org.glassfish.jersey.client.spi.ConnectorProvider;
import org.glassfish.jersey.ext.cdi1x.internal.CdiUtil;
import org.glassfish.jersey.innate.VirtualThreadUtil;
+import org.glassfish.jersey.internal.RuntimeDelegateDecorator;
import org.glassfish.jersey.internal.ServiceFinder;
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.message.internal.HeaderUtils;
import org.glassfish.jersey.uri.JerseyQueryParamStyle;
/**
@@ -92,6 +98,7 @@
private final List<AsyncInvocationInterceptorFactoryPriorityWrapper> asyncInterceptorFactories;
private final Config config;
private final ConfigWrapper configWrapper;
+ private final DefaultInboundHeaderProvider defaultInboundHeaderProvider;
private URI uri;
private ClientBuilder clientBuilder;
private Supplier<ExecutorService> executorService;
@@ -112,6 +119,9 @@
config = ConfigProvider.getConfig();
configWrapper = new ConfigWrapper(clientBuilder.getConfiguration());
executorService = () -> VirtualThreadUtil.withConfig(configWrapper).newCachedThreadPool();
+
+ defaultInboundHeaderProvider = new DefaultInboundHeaderProvider(clientBuilder.getConfiguration());
+ inboundHeaderProviders.add(defaultInboundHeaderProvider);
}
@Override
@@ -491,6 +501,11 @@
return this;
}
+ public RestClientBuilder header(String s, Object o) {
+ defaultInboundHeaderProvider.header(s, o);
+ return this;
+ }
+
private static class InjectionManagerExposer implements Feature {
InjectionManager injectionManager;
@@ -529,4 +544,34 @@
}
}
+ /* package*/ static class DefaultInboundHeaderProvider implements InboundHeadersProvider, ClientHeadersFactory {
+ private final RuntimeDelegate delegate;
+ private final MultivaluedMap<String, String> headers = new MultivaluedHashMap<>();
+
+ private DefaultInboundHeaderProvider(Configuration configuration) {
+ this.delegate = RuntimeDelegateDecorator.configured(configuration);
+ }
+
+ private void header(String key, Object value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ headers.add(key, HeaderUtils.asString(value, delegate));
+ }
+
+ @Override
+ public Map<String, List<String>> inboundHeaders() {
+ return headers;
+ }
+
+ @Override
+ public MultivaluedMap<String, String> update(MultivaluedMap<String, String> incomingHeaders,
+ MultivaluedMap<String, String> clientOutgoingHeaders) {
+ MultivaluedMap<String, String> map = new MultivaluedHashMap<>();
+ map.putAll(incomingHeaders);
+ clientOutgoingHeaders.forEach((k, v) -> map.addAll(k, v));
+ return map;
+ }
+ }
+
}
\ No newline at end of file
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 1fbf420..0dff2b1 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, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -161,6 +161,13 @@
@Override
public void destroy(Object instance, CreationalContext<Object> creationalContext) {
+ if (AutoCloseable.class.isInstance(instance)) {
+ try {
+ ((AutoCloseable) instance).close();
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
}
@Override
diff --git a/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties b/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties
index 3afc639..5a3b074 100644
--- a/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties
+++ b/ext/microprofile/mp-rest-client/src/main/resources/org/glassfish/jersey/microprofile/restclient/internal/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
#
# 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,3 +16,4 @@
err.invalid.proxy.uri=Invalid proxy URI: {0}.
err.invalid.proxy.port=Invalid proxy port: {0}.
+err.null.header=Header cannot be null.
diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml
index 826ad7f..8037dec 100644
--- a/ext/microprofile/pom.xml
+++ b/ext/microprofile/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f6dec8f..9ee18d9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cdb3dc8..3fa9f9f 100644
--- a/ext/mvc-freemarker/pom.xml
+++ b/ext/mvc-freemarker/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 bc6942f..a412253 100644
--- a/ext/mvc-jsp/pom.xml
+++ b/ext/mvc-jsp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 dd4bd53..2b32c8b 100644
--- a/ext/mvc-mustache/pom.xml
+++ b/ext/mvc-mustache/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-thymeleaf/pom.xml b/ext/mvc-thymeleaf/pom.xml
index 124bfa5..bae0fd2 100644
--- a/ext/mvc-thymeleaf/pom.xml
+++ b/ext/mvc-thymeleaf/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8fc1613..628530f 100644
--- a/ext/mvc/pom.xml
+++ b/ext/mvc/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fd4f43c..59e1c68 100644
--- a/ext/pom.xml
+++ b/ext/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 df5ae88..a623b2f 100644
--- a/ext/proxy-client/pom.xml
+++ b/ext/proxy-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0b1c5ed..3d5a1c9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 61b9d62..97f6c5e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1746317..22aa2fc 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 63347a6..1dafe7a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/spring6/pom.xml b/ext/spring6/pom.xml
index c80cf53..2d93477 100644
--- a/ext/spring6/pom.xml
+++ b/ext/spring6/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 96c5cc6..8deb34f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/cdi-inject-weld/pom.xml b/incubator/cdi-inject-weld/pom.xml
index 91f28cb..07e11fb 100644
--- a/incubator/cdi-inject-weld/pom.xml
+++ b/incubator/cdi-inject-weld/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/injector/CachedConstructorAnalyzerTest.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/injector/CachedConstructorAnalyzerTest.java
index 85bfe56..9a6d8da 100644
--- a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/injector/CachedConstructorAnalyzerTest.java
+++ b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/internal/injector/CachedConstructorAnalyzerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2022, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -30,6 +30,7 @@
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Tests {@link CachedConstructorAnalyzer}.
@@ -110,7 +111,8 @@
Constructor<BothAnnotatedConstructor> constructor = analyzer.getConstructor();
assertEquals(1, constructor.getParameterCount());
- assertEquals(Integer.class, constructor.getParameterTypes()[0]);
+ Class<?> parameterType = constructor.getParameterTypes()[0];
+ assertTrue(parameterType.equals(String.class) || parameterType.equals(Integer.class));
}
@Test
diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml
index 2a5b425..77d0ec3 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 153b5be..ea2d421 100644
--- a/incubator/gae-integration/pom.xml
+++ b/incubator/gae-integration/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f2359be..0bc7fa3 100644
--- a/incubator/html-json/pom.xml
+++ b/incubator/html-json/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/injectless-client/pom.xml b/incubator/injectless-client/pom.xml
index 7683faa..485397c 100644
--- a/incubator/injectless-client/pom.xml
+++ b/incubator/injectless-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 3bd3d43..e6b4179 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1e7a319..33a9164 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 9d0d3eb..3f3fc5d 100644
--- a/incubator/pom.xml
+++ b/incubator/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
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,7 +39,6 @@
<module>cdi-inject-weld</module>
<module>declarative-linking</module>
<module>gae-integration</module>
- <module>html-json</module>
<module>injectless-client</module>
<module>kryo</module>
<module>open-tracing</module>
@@ -53,4 +52,16 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>HTML-JSON-FOR-PRE-JDK24</id>
+ <activation>
+ <jdk>[11, 24)</jdk>
+ </activation>
+ <modules>
+ <module>html-json</module>
+ </modules>
+ </profile>
+ </profiles>
</project>
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml
index fa8cb3f..d69cfc9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/src/test/java/org/glassfish/jersey/inject/cdi/se/DisposableSupplierTest.java b/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/DisposableSupplierTest.java
index 6bade9b..10eec31 100644
--- a/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/DisposableSupplierTest.java
+++ b/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/DisposableSupplierTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,8 @@
package org.glassfish.jersey.inject.cdi.se;
import java.lang.reflect.Type;
+import java.util.HashSet;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
@@ -368,9 +370,17 @@
// All instances should be the same because they are request scoped.
ComposedObject instance = injectionManager.getInstance(ComposedObject.class);
- assertEquals("1", instance.getFirst());
- assertEquals("2", instance.getSecond());
- assertEquals("3", instance.getThird());
+ Set<String> set1 = new HashSet<String>() {{
+ add("1");
+ add("2");
+ add("3");
+ }};
+ Set<String> set2 = new HashSet<String>() {{
+ add(instance.getFirst().toString());
+ add(instance.getSecond().toString());
+ add(instance.getThird().toString());
+ }};
+ assertEquals(set1, set2);
});
Supplier<String> cleanedSupplier = atomicSupplier.get();
diff --git a/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/injector/CachedConstructorAnalyzerTest.java b/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/injector/CachedConstructorAnalyzerTest.java
index cc9e78a..7e105aa 100644
--- a/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/injector/CachedConstructorAnalyzerTest.java
+++ b/inject/cdi2-se/src/test/java/org/glassfish/jersey/inject/cdi/se/injector/CachedConstructorAnalyzerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2022, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -30,6 +30,7 @@
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Tests {@link CachedConstructorAnalyzer}.
@@ -110,7 +111,8 @@
Constructor<BothAnnotatedConstructor> constructor = analyzer.getConstructor();
assertEquals(1, constructor.getParameterCount());
- assertEquals(Integer.class, constructor.getParameterTypes()[0]);
+ Class<?> parameterType = constructor.getParameterTypes()[0];
+ assertTrue(parameterType.equals(String.class) || parameterType.equals(Integer.class));
}
@Test
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index ba2de56..1f21a2d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/src/test/java/org/glassfish/jersey/inject/hk2/DisposableSupplierTest.java b/inject/hk2/src/test/java/org/glassfish/jersey/inject/hk2/DisposableSupplierTest.java
index 89d2db3..bb290a2 100644
--- a/inject/hk2/src/test/java/org/glassfish/jersey/inject/hk2/DisposableSupplierTest.java
+++ b/inject/hk2/src/test/java/org/glassfish/jersey/inject/hk2/DisposableSupplierTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,8 @@
package org.glassfish.jersey.inject.hk2;
import java.lang.reflect.Type;
+import java.util.HashSet;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier;
@@ -374,9 +376,17 @@
// All instances should be the same because they are request scoped.
ComposedObject instance = injectionManager.getInstance(ComposedObject.class);
- assertEquals("1", instance.first);
- assertEquals("2", instance.second);
- assertEquals("3", instance.third);
+ Set<String> set1 = new HashSet<String>() {{
+ add("1");
+ add("2");
+ add("3");
+ }};
+ Set<String> set2 = new HashSet<String>() {{
+ add(instance.first.toString());
+ add(instance.second.toString());
+ add(instance.third.toString());
+ }};
+ assertEquals(set1, set2);
});
Supplier<String> cleanedSupplier = atomicSupplier.get();
diff --git a/inject/pom.xml b/inject/pom.xml
index 8af41ab..2e4f1a0 100644
--- a/inject/pom.xml
+++ b/inject/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/media/jaxb/pom.xml
index fbe456c..8e9cbb8 100644
--- a/media/jaxb/pom.xml
+++ b/media/jaxb/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-binding/pom.xml b/media/json-binding/pom.xml
index bfd1eaf..b07b09c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-gson/pom.xml b/media/json-gson/pom.xml
index 923d5b6..cc7a577 100644
--- a/media/json-gson/pom.xml
+++ b/media/json-gson/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 777e9d6..fc8bafa 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/src/main/java/org/glassfish/jersey/jackson/JacksonFeature.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JacksonFeature.java
index 5411720..9391bc6 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JacksonFeature.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JacksonFeature.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -29,8 +29,10 @@
import org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider;
import org.glassfish.jersey.jackson.internal.FilteringJacksonJaxbJsonProvider;
import org.glassfish.jersey.jackson.internal.JacksonFilteringFeature;
+import org.glassfish.jersey.jackson.internal.JaxrsFeatureBag;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.JsonMappingExceptionMapper;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.JsonParseExceptionMapper;
+import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JacksonJaxbJsonProvider;
import org.glassfish.jersey.message.MessageProperties;
import org.glassfish.jersey.message.filtering.EntityFilteringFeature;
@@ -41,7 +43,7 @@
* @author Stepan Kopriva
* @author Michal Gajdos
*/
-public class JacksonFeature implements Feature {
+public class JacksonFeature extends JaxrsFeatureBag<JacksonFeature> implements Feature {
/**
* Define whether to use Jackson's exception mappers ore not
@@ -100,6 +102,16 @@
return this;
}
+ /**
+ * Register {@link JaxRSFeature} with the Jackson providers.
+ * @param feature the {@link JaxRSFeature} to be enabled or disabled.
+ * @param state {@code true} for enabling the feature, {@code false} for disabling.
+ * @return JacksonFeature with {@link JaxRSFeature} registered to be set on a created Jackson provider.
+ */
+ public JacksonFeature jaxrsFeature(JaxRSFeature feature, boolean state) {
+ return super.jaxrsFeature(feature, state);
+ }
+
private static final String JSON_FEATURE = JacksonFeature.class.getSimpleName();
@Override
@@ -138,6 +150,10 @@
context.property(MessageProperties.JSON_MAX_STRING_LENGTH, maxStringLength);
}
+ if (hasJaxrsFeature()) {
+ context.property(JaxrsFeatureBag.JAXRS_FEATURE, this);
+ }
+
return true;
}
}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JaxRSFeatureObjectMapper.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JaxRSFeatureObjectMapper.java
new file mode 100644
index 0000000..d759e56
--- /dev/null
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/JaxRSFeatureObjectMapper.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.jackson;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.glassfish.jersey.jackson.internal.AbstractObjectMapper;
+import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;
+
+
+/**
+ * The Jackson {@link ObjectMapper} supporting {@link JaxRSFeature}s.
+ */
+public class JaxRSFeatureObjectMapper extends AbstractObjectMapper {
+
+ public JaxRSFeatureObjectMapper() {
+ super();
+ }
+
+ /**
+ * Method for changing state of an on/off {@link org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature}
+ * features.
+ */
+ public ObjectMapper configure(JaxRSFeature f, boolean state) {
+ jaxrsFeatureBag.jaxrsFeature(f, state);
+ return this;
+ }
+
+ /**
+ * Method for enabling specified {@link org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature}s
+ * for parser instances this object mapper creates.
+ */
+ public ObjectMapper enable(JaxRSFeature... features) {
+ if (features != null) {
+ for (JaxRSFeature f : features) {
+ jaxrsFeatureBag.jaxrsFeature(f, true);
+ }
+ }
+ return this;
+ }
+
+ /**
+ * Method for disabling specified {@link org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature}s
+ * for parser instances this object mapper creates.
+ */
+ public ObjectMapper disable(JaxRSFeature... features) {
+ if (features != null) {
+ for (JaxRSFeature f : features) {
+ jaxrsFeatureBag.jaxrsFeature(f, false);
+ }
+ }
+ return this;
+ }
+}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/AbstractObjectMapper.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/AbstractObjectMapper.java
new file mode 100644
index 0000000..2f331cf
--- /dev/null
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/AbstractObjectMapper.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.jackson.internal;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * Internal ObjectMapper with {@link JaxrsFeatureBag}.
+ */
+public abstract class AbstractObjectMapper extends ObjectMapper {
+ protected AbstractObjectMapper() {
+
+ }
+ protected JaxrsFeatureBag jaxrsFeatureBag = new JaxrsFeatureBag();
+}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java
index a209c27..4defc70 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/DefaultJacksonJaxbJsonProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
*
* 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,7 @@
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.StreamReadConstraints;
+import com.fasterxml.jackson.core.json.PackageVersion;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectReader;
@@ -39,6 +40,7 @@
import jakarta.inject.Singleton;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.ext.Providers;
/**
@@ -48,12 +50,11 @@
public class DefaultJacksonJaxbJsonProvider extends JacksonJaxbJsonProvider {
private Configuration commonConfig;
private static final Logger LOGGER = Logger.getLogger(DefaultJacksonJaxbJsonProvider.class.getName());
+ private final boolean hasConfig;
@Inject
public DefaultJacksonJaxbJsonProvider(@Context Providers providers, @Context Configuration config) {
- super(new JacksonMapperConfigurator(null, DEFAULT_ANNOTATIONS));
- this.commonConfig = config;
- _providers = providers;
+ this(providers, config, DEFAULT_ANNOTATIONS);
}
//do not register JaxbAnnotationModule because it brakes default annotations processing
@@ -63,12 +64,36 @@
super(new JacksonMapperConfigurator(null, annotationsToUse));
this.commonConfig = config;
_providers = providers;
+
+ boolean ex = true;
+ try {
+ Object jaxrsFeatureBag = config.getProperty(JaxrsFeatureBag.JAXRS_FEATURE);
+ if (jaxrsFeatureBag != null && (JaxrsFeatureBag.class.isInstance(jaxrsFeatureBag))) {
+ ((JaxrsFeatureBag) jaxrsFeatureBag).configureJaxrsFeatures(this);
+ }
+ } catch (RuntimeException e) {
+ // ignore - not configured
+ LOGGER.fine(LocalizationMessages.ERROR_CONFIGURING(e.getMessage()));
+ ex = false;
+ }
+ hasConfig = ex;
+ }
+
+ @Override
+ protected ObjectMapper _locateMapperViaProvider(Class<?> type, MediaType mediaType) {
+ ObjectMapper mapper = super._locateMapperViaProvider(type, mediaType);
+ if (AbstractObjectMapper.class.isInstance(mapper)) {
+ ((AbstractObjectMapper) mapper).jaxrsFeatureBag.configureJaxrsFeatures(this);
+ }
+ return mapper;
}
@Override
protected JsonEndpointConfig _configForReading(ObjectReader reader, Annotation[] annotations) {
try {
- updateFactoryConstraints(reader.getFactory());
+ if (hasConfig) {
+ updateFactoryConstraints(reader.getFactory());
+ }
} catch (Throwable t) {
// A Jackson 14 would throw NoSuchMethodError, ClassNotFoundException, NoClassDefFoundError or similar
// that should have been ignored
@@ -130,17 +155,22 @@
if (maxStringLength != StreamReadConstraints.DEFAULT_MAX_STRING_LEN) {
final StreamReadConstraints constraints = jsonFactory.streamReadConstraints();
- jsonFactory.setStreamReadConstraints(
- StreamReadConstraints.builder()
- // our
- .maxStringLength(maxStringLength)
- // customers
- .maxDocumentLength(constraints.getMaxDocumentLength())
- .maxNameLength(constraints.getMaxNameLength())
- .maxNestingDepth(constraints.getMaxNestingDepth())
- .maxNumberLength(constraints.getMaxNumberLength())
- .build()
- );
+ StreamReadConstraints.Builder builder = StreamReadConstraints.builder()
+ // our
+ .maxStringLength(maxStringLength)
+ // customers
+ .maxDocumentLength(constraints.getMaxDocumentLength())
+ .maxNameLength(constraints.getMaxNameLength())
+ .maxNestingDepth(constraints.getMaxNestingDepth())
+ .maxNumberLength(constraints.getMaxNumberLength());
+
+ if (PackageVersion.VERSION.getMinorVersion() >= 18) {
+ builder.maxTokenCount(constraints.getMaxTokenCount());
+ } else {
+ LOGGER.warning(LocalizationMessages.ERROR_JACKSON_STREAMREADCONSTRAINTS_218("maxTokenCount"));
+ }
+
+ jsonFactory.setStreamReadConstraints(builder.build());
}
}
}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JaxrsFeatureBag.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JaxrsFeatureBag.java
new file mode 100644
index 0000000..4711b56
--- /dev/null
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/JaxrsFeatureBag.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.jackson.internal;
+
+import org.glassfish.jersey.jackson.internal.jackson.jaxrs.base.ProviderBase;
+import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * Internal holder class for {@link JaxRSFeature} settings and their values.
+ */
+public class JaxrsFeatureBag<T extends JaxrsFeatureBag> {
+ protected static final String JAXRS_FEATURE = "jersey.config.jackson.jaxrs.feature";
+
+ private static class JaxRSFeatureState {
+ /* package */ final JaxRSFeature feature;
+ /* package */ final boolean state;
+ public JaxRSFeatureState(JaxRSFeature feature, boolean state) {
+ this.feature = feature;
+ this.state = state;
+ }
+ }
+
+ private Optional<List<JaxRSFeatureState>> jaxRSFeature = Optional.empty();
+
+ public T jaxrsFeature(JaxRSFeature feature, boolean state) {
+ if (!jaxRSFeature.isPresent()) {
+ jaxRSFeature = Optional.of(new ArrayList<>());
+ }
+ jaxRSFeature.ifPresent(list -> list.add(new JaxrsFeatureBag.JaxRSFeatureState(feature, state)));
+ return (T) this;
+ }
+
+ protected boolean hasJaxrsFeature() {
+ return jaxRSFeature.isPresent();
+ }
+
+ /* package */ void configureJaxrsFeatures(ProviderBase providerBase) {
+ jaxRSFeature.ifPresent(list -> list.stream().forEach(state -> providerBase.configure(state.feature, state.state)));
+ }
+}
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
index bf365bb..350be25 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/base/ProviderBase.java
@@ -43,6 +43,7 @@
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.util.LookupCache;
import com.fasterxml.jackson.databind.util.LRUMap;
import com.fasterxml.jackson.databind.type.TypeFactory;
@@ -186,14 +187,12 @@
/**
* Cache for resolved endpoint configurations when reading JSON data
*/
- protected final LRUMap<AnnotationBundleKey, EP_CONFIG> _readers
- = new LRUMap<AnnotationBundleKey, EP_CONFIG>(16, 120);
+ protected final LookupCache<AnnotationBundleKey, EP_CONFIG> _readers;
/**
* Cache for resolved endpoint configurations when writing JSON data
*/
- protected final LRUMap<AnnotationBundleKey, EP_CONFIG> _writers
- = new LRUMap<AnnotationBundleKey, EP_CONFIG>(16, 120);
+ protected final LookupCache<AnnotationBundleKey, EP_CONFIG> _writers;
/*
/**********************************************************
@@ -202,8 +201,9 @@
*/
protected ProviderBase(MAPPER_CONFIG mconfig) {
- _mapperConfig = mconfig;
- _jaxRSFeatures = JAXRS_FEATURE_DEFAULTS;
+ this(mconfig,
+ new LRUMap<>(16, 120),
+ new LRUMap<>(16, 120));
}
/**
@@ -214,8 +214,19 @@
*/
@Deprecated // just to denote it should NOT be directly called; will NOT be removed
protected ProviderBase() {
- _mapperConfig = null;
+ this(null);
+ }
+ /**
+ * @since 2.17
+ */
+ protected ProviderBase(MAPPER_CONFIG mconfig,
+ LookupCache<AnnotationBundleKey, EP_CONFIG> readerCache,
+ LookupCache<AnnotationBundleKey, EP_CONFIG> writerCache)
+ {
+ _mapperConfig = mconfig;
_jaxRSFeatures = JAXRS_FEATURE_DEFAULTS;
+ _readers = readerCache;
+ _writers = writerCache;
}
/*
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java
index eb7c072..ac207b8 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJaxbJsonProvider.java
@@ -25,7 +25,7 @@
*/
@Provider
@Consumes(MediaType.WILDCARD) // NOTE: required to support "non-standard" JSON variants
-@Produces(MediaType.WILDCARD)
+@Produces({MediaType.APPLICATION_JSON, "text/json", MediaType.WILDCARD})
public class JacksonJaxbJsonProvider extends JacksonJsonProvider {
/**
* Default annotation sets to use, if not explicitly defined during
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
index 0871ece..13f9275 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JacksonJsonProvider.java
@@ -52,7 +52,7 @@
*/
@Provider
@Consumes(MediaType.WILDCARD) // NOTE: required to support "non-standard" JSON variants
-@Produces(MediaType.WILDCARD)
+@Produces({MediaType.APPLICATION_JSON, "text/json", MediaType.WILDCARD})
public class JacksonJsonProvider
extends ProviderBase<JacksonJsonProvider,
ObjectMapper,
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonMapperConfigurator.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonMapperConfigurator.java
index 8e8091a..fd5d9aa 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonMapperConfigurator.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/JsonMapperConfigurator.java
@@ -9,7 +9,7 @@
import com.fasterxml.jackson.databind.AnnotationIntrospector;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
-import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+import com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector;
/**
* Helper class used to encapsulate details of configuring an
@@ -125,11 +125,11 @@
*/
try {
if (_jaxbIntrospectorClass == null) {
- _jaxbIntrospectorClass = JaxbAnnotationIntrospector.class;
+ _jaxbIntrospectorClass = JakartaXmlBindAnnotationIntrospector.class;
}
return _jaxbIntrospectorClass.newInstance();
} catch (Exception e) {
- throw new IllegalStateException("Failed to instantiate JaxbAnnotationIntrospector: "+e.getMessage(), e);
+ throw new IllegalStateException("Failed to instantiate JakartaXmlBindAnnotationIntrospector: "+e.getMessage(), e);
}
default:
throw new IllegalStateException();
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
index 56b1bf6..44c9073 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/json/PackageVersion.java
@@ -11,7 +11,7 @@
*/
public final class PackageVersion implements Versioned {
public final static Version VERSION = VersionUtil.parseVersion(
- "2.17.2", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
+ "2.18.0", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
@Override
public Version version() {
diff --git a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/package-info.java b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/package-info.java
index 4ec091c..c18b433 100644
--- a/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/package-info.java
+++ b/media/json-jackson/src/main/java/org/glassfish/jersey/jackson/internal/jackson/jaxrs/util/package-info.java
@@ -1,4 +1,4 @@
/**
* Miscellaneous helper classes used by providers.
*/
-package com.fasterxml.jackson.jaxrs.util;
+package org.glassfish.jersey.jackson.internal.jackson.jaxrs.util;
diff --git a/media/json-jackson/src/main/resources/META-INF/NOTICE.markdown b/media/json-jackson/src/main/resources/META-INF/NOTICE.markdown
index 9440229..d893c65 100644
--- a/media/json-jackson/src/main/resources/META-INF/NOTICE.markdown
+++ b/media/json-jackson/src/main/resources/META-INF/NOTICE.markdown
@@ -31,7 +31,7 @@
## Third-party Content
-Jackson JAX-RS Providers version 2.17.2
+Jackson JAX-RS Providers version 2.18.0
* License: Apache License, 2.0
* Project: https://github.com/FasterXML/jackson-jaxrs-providers
* Copyright: (c) 2009-2023 FasterXML, LLC. All rights reserved unless otherwise indicated.
diff --git a/media/json-jackson/src/main/resources/org/glassfish/jersey/jackson/localization.properties b/media/json-jackson/src/main/resources/org/glassfish/jersey/jackson/localization.properties
index a9144fd..1c66b9c 100644
--- a/media/json-jackson/src/main/resources/org/glassfish/jersey/jackson/localization.properties
+++ b/media/json-jackson/src/main/resources/org/glassfish/jersey/jackson/localization.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
#
# 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
#
-
+error.configuring=Error configuring the DefaultJacksonJaxbJsonProvider: {0}.
error.jackson.streamreadconstraints=Error setting StreamReadConstraints: {0}. Possibly not Jackson 2.15?
+error.jackson.streamreadconstraints218=Error setting StreamReadConstraints: {0}. Possibly not Jackson 2.18?
error.modules.not.loaded=Jackson modules could not be loaded: {0}
\ No newline at end of file
diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/DefaultJsonJacksonProviderForBothModulesTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/DefaultJsonJacksonProviderForBothModulesTest.java
index 59d19c1..e9b621a 100644
--- a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/DefaultJsonJacksonProviderForBothModulesTest.java
+++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/DefaultJsonJacksonProviderForBothModulesTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -23,6 +23,9 @@
import jakarta.ws.rs.core.Application;
+import java.util.List;
+import java.util.Arrays;
+import java.util.Collections;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class DefaultJsonJacksonProviderForBothModulesTest extends JerseyTest {
@@ -36,8 +39,12 @@
public final void testDisabledModule() {
final String response = target("entity/simple")
.request().get(String.class);
+ String expected = "{\"name\":\"Hello\",\"value\":\"World\"}";
+ List<String> response_list = Arrays.asList(response.replaceAll("[{}]", "").split(","));
+ List<String> expected_list = Arrays.asList(expected.replaceAll("[{}]", "").split(","));
+ Collections.sort(response_list);
- assertEquals("{\"name\":\"Hello\",\"value\":\"World\"}", response);
+ assertEquals(expected_list, response_list);
}
}
diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JaxRSFeatureTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JaxRSFeatureTest.java
new file mode 100644
index 0000000..86b6200
--- /dev/null
+++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/JaxRSFeatureTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.jackson.internal;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.glassfish.jersey.jackson.JacksonFeature;
+import org.glassfish.jersey.jackson.JaxRSFeatureObjectMapper;
+import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.JaxRSFeature;
+import org.hamcrest.MatcherAssert;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.ext.ContextResolver;
+import jakarta.ws.rs.ext.Providers;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+public class JaxRSFeatureTest {
+ @Test
+ public void testJaxrsFeatureOnJacksonFeature() {
+ Client client = ClientBuilder.newClient()
+ .register(new JacksonFeature().jaxrsFeature(JaxRSFeature.READ_FULL_STREAM, false))
+ .register(JaxrsFeatureFilter.class);
+
+ try (Response r = client.target("http://xxx.yyy").request().get()) {
+ MatcherAssert.assertThat(r.getStatus(), Matchers.is(200));
+ }
+ }
+
+ @Test
+ public void testJaxrsFeatureOnContextResolver() {
+ Client client = ClientBuilder.newClient()
+ .register(JacksonFeature.class)
+ .register(JaxrsFetureContextResolver.class)
+ .register(JaxrsFeatureFilter.class);
+
+ try (Response r = client.target("http://xxx.yyy").request().get()) {
+ MatcherAssert.assertThat(r.getStatus(), Matchers.is(200));
+ }
+ }
+
+
+ public static class JaxrsFeatureFilter implements ClientRequestFilter {
+ private final DefaultJacksonJaxbJsonProvider jacksonProvider;
+ @Inject
+ public JaxrsFeatureFilter(Providers allProviders) {
+ jacksonProvider = (DefaultJacksonJaxbJsonProvider)
+ allProviders.getMessageBodyReader(Object.class, Object.class, null, MediaType.APPLICATION_JSON_TYPE);
+ try {
+ jacksonProvider.readFrom(Object.class, Object.class, null, MediaType.APPLICATION_JSON_TYPE, null,
+ new ByteArrayInputStream("{}".getBytes()));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ };
+
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ Response.Status status = jacksonProvider.isEnabled(JaxRSFeature.READ_FULL_STREAM)
+ ? Response.Status.FORBIDDEN
+ : Response.Status.OK;
+ requestContext.abortWith(Response.status(status).build());
+ }
+ }
+
+ public static class JaxrsFetureContextResolver implements ContextResolver<ObjectMapper> {
+
+ @Override
+ public ObjectMapper getContext(Class<?> type) {
+ JaxRSFeatureObjectMapper objectMapper = new JaxRSFeatureObjectMapper();
+ objectMapper.disable(JaxRSFeature.READ_FULL_STREAM);
+ return objectMapper;
+ }
+ }
+}
diff --git a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/StreamReadConstrainsTest.java b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/StreamReadConstrainsTest.java
index 8fa7cb9..873377c 100644
--- a/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/StreamReadConstrainsTest.java
+++ b/media/json-jackson/src/test/java/org/glassfish/jersey/jackson/internal/StreamReadConstrainsTest.java
@@ -19,7 +19,9 @@
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.StreamReadConstraints;
+import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.core.exc.StreamConstraintsException;
+import com.fasterxml.jackson.core.json.PackageVersion;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -130,7 +132,27 @@
}
}
+ @Test
+ void testMatchingVersion() {
+ final Version coreVersion = PackageVersion.VERSION;
+ final Version jerseyVersion = org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.PackageVersion.VERSION;
+ StringBuilder message = new StringBuilder();
+ message.append("Dependency Jackson Version is ")
+ .append(coreVersion.getMajorVersion())
+ .append(".")
+ .append(coreVersion.getMinorVersion());
+ message.append("\n Repackaged Jackson Version is ")
+ .append(jerseyVersion.getMajorVersion())
+ .append(".")
+ .append(jerseyVersion.getMinorVersion());
+
+ Assertions.assertEquals(coreVersion.getMajorVersion(), jerseyVersion.getMajorVersion(), message.toString());
+ Assertions.assertEquals(coreVersion.getMinorVersion(), jerseyVersion.getMinorVersion(), message.toString());
+ Assertions.assertEquals(coreVersion.getMajorVersion(), 2,
+ "update " + DefaultJacksonJaxbJsonProvider.class.getName()
+ + " updateFactoryConstraints method to support version " + coreVersion.getMajorVersion());
+ }
@Test
void testStreamReadConstraintsMethods() {
@@ -138,7 +160,9 @@
+ " Please update the code in " + DefaultJacksonJaxbJsonProvider.class.getName()
+ " updateFactoryConstraints method";
Method[] method = StreamReadConstraints.Builder.class.getDeclaredMethods();
- Assertions.assertEquals(6, method.length, message); // five setMax... + build() methods
+ // 2.17 : five setMax... + build() methods
+ // 2.18 : six setMax... + build() methods
+ Assertions.assertEquals(7, method.length, message);
}
@Path("len")
diff --git a/media/json-jettison/pom.xml b/media/json-jettison/pom.xml
index 614fe5e..c14c642 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fa7af46..98f4ae2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/moxy/pom.xml b/media/moxy/pom.xml
index 534c4c3..90161de 100644
--- a/media/moxy/pom.xml
+++ b/media/moxy/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e61999e..49d8114 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -103,8 +103,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.glassfish.jersey.connectors</groupId>
- <artifactId>jersey-jetty-connector</artifactId>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-processing</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
diff --git a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
index 7287759..d672e1c 100644
--- a/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
+++ b/media/multipart/src/main/java/org/glassfish/jersey/media/multipart/BodyPart.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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,13 @@
package org.glassfish.jersey.media.multipart;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.text.ParseException;
+import java.util.Arrays;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.GenericType;
@@ -28,6 +31,7 @@
import jakarta.ws.rs.ext.MessageBodyReader;
import jakarta.ws.rs.ext.Providers;
+import org.glassfish.jersey.innate.spi.MessageBodyWorkersSettable;
import org.glassfish.jersey.internal.util.collection.ImmutableMultivaluedMap;
import org.glassfish.jersey.media.multipart.internal.LocalizationMessages;
import org.glassfish.jersey.message.MessageBodyWorkers;
@@ -41,7 +45,7 @@
* @author Paul Sandoz
* @author Michal Gajdos
*/
-public class BodyPart {
+public class BodyPart implements MessageBodyWorkersSettable {
protected ContentDisposition contentDisposition = null;
@@ -285,7 +289,15 @@
}
<T> T getEntityAs(final Class<T> type, Type genericType) {
- if (entity == null || !(entity instanceof BodyPartEntity)) {
+ InputStream inputStream = null;
+ if (BodyPartEntity.class.isInstance(entity)) {
+ inputStream = ((BodyPartEntity) entity).getInputStream();
+ } else if (InputStream.class.isInstance(entity)) {
+ inputStream = (InputStream) entity;
+ } else if (byte[].class.isInstance(entity)) {
+ inputStream = new ByteArrayInputStream((byte[]) entity);
+ }
+ if (inputStream == null) {
throw new IllegalStateException(LocalizationMessages.ENTITY_HAS_WRONG_TYPE());
}
if (type == BodyPartEntity.class) {
@@ -299,8 +311,7 @@
}
try {
- return reader.readFrom(type, genericType, annotations, mediaType, headers,
- ((BodyPartEntity) entity).getInputStream());
+ return reader.readFrom(type, genericType, annotations, mediaType, headers, inputStream);
} catch (final IOException ioe) {
throw new ProcessingException(LocalizationMessages.ERROR_READING_ENTITY(String.class), ioe);
}
diff --git a/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/ClientFilterTests.java b/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/ClientFilterTests.java
new file mode 100644
index 0000000..f7bfa53
--- /dev/null
+++ b/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/ClientFilterTests.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.media.multipart;
+
+import jakarta.json.Json;
+import jakarta.json.JsonArray;
+import jakarta.json.JsonArrayBuilder;
+import jakarta.json.JsonObject;
+import jakarta.json.JsonObjectBuilder;
+import jakarta.json.JsonValue;
+import jakarta.ws.rs.BadRequestException;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.EntityPart;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * Tests in clientFilter before the multipart provider is invoked.
+ * Check the workers are set.
+ *
+ * Modified MP Rest Client TCK tests
+ */
+public class ClientFilterTests {
+ /**
+ * Tests that a single file is upload. The response is a simple JSON response with the file information.
+ *
+ * @throws Exception
+ * if a test error occurs
+ */
+ @Test
+ public void uploadFile() throws Exception {
+ try (Client client = createClient()) {
+ final byte[] content;
+ try (InputStream in = ClientFilterTests.class.getResourceAsStream("/multipart/test-file1.txt")) {
+ Assertions.assertNotNull(in, "Could not find /multipart/test-file1.txt");
+ content = in.readAllBytes();
+ }
+ // Send in an InputStream to ensure it works with an InputStream
+ final List<EntityPart> files = List.of(EntityPart.withFileName("test-file1.txt")
+ .content(new ByteArrayInputStream(content))
+ .mediaType(MediaType.APPLICATION_OCTET_STREAM_TYPE)
+ .build());
+ try (Response response = client.target("http://localhost").request()
+ .post(Entity.entity(files, MediaType.MULTIPART_FORM_DATA))) {
+ Assertions.assertEquals(201, response.getStatus());
+ final JsonArray jsonArray = response.readEntity(JsonArray.class);
+ Assertions.assertNotNull(jsonArray);
+ Assertions.assertEquals(jsonArray.size(), 1);
+ final JsonObject json = jsonArray.getJsonObject(0);
+ Assertions.assertEquals(json.getString("name"), "test-file1.txt");
+ Assertions.assertEquals(json.getString("fileName"), "test-file1.txt");
+ Assertions.assertEquals(json.getString("content"), "This is a test file for file 1.");
+ }
+ }
+ }
+
+ /**
+ * Tests that two files are upload. The response is a simple JSON response with the file information.
+ *
+ * @throws Exception
+ * if a test error occurs
+ */
+ @Test
+ public void uploadMultipleFiles() throws Exception {
+ try (Client client = createClient()) {
+ final Map<String, byte[]> entityPartContent = new LinkedHashMap<>(2);
+ try (InputStream in = ClientFilterTests.class.getResourceAsStream("/multipart/test-file1.txt")) {
+ Assertions.assertNotNull(in, "Could not find /multipart/test-file1.txt");
+ entityPartContent.put("test-file1.txt", in.readAllBytes());
+ }
+ try (InputStream in = ClientFilterTests.class.getResourceAsStream("/multipart/test-file2.txt")) {
+ Assertions.assertNotNull(in, "Could not find /multipart/test-file2.txt");
+ entityPartContent.put("test-file2.txt", in.readAllBytes());
+ }
+ final List<EntityPart> files = entityPartContent.entrySet()
+ .stream()
+ .map((entry) -> {
+ try {
+ return EntityPart.withName(entry.getKey())
+ .fileName(entry.getKey())
+ .content(entry.getValue())
+ .mediaType(MediaType.APPLICATION_OCTET_STREAM_TYPE)
+ .build();
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ })
+ .collect(Collectors.toList());
+
+ try (Response response = client.target("http://localhost").request()
+ .post(Entity.entity(files, MediaType.MULTIPART_FORM_DATA))) {
+ Assertions.assertEquals(201, response.getStatus());
+ final JsonArray jsonArray = response.readEntity(JsonArray.class);
+ Assertions.assertNotNull(jsonArray);
+ Assertions.assertEquals(jsonArray.size(), 2);
+ // Don't assume the results are in a specific order
+ for (JsonValue value : jsonArray) {
+ final JsonObject json = value.asJsonObject();
+ if (json.getString("name").equals("test-file1.txt")) {
+ Assertions.assertEquals(json.getString("fileName"), "test-file1.txt");
+ Assertions.assertEquals(json.getString("content"), "This is a test file for file 1.");
+ } else if (json.getString("name").equals("test-file2.txt")) {
+ Assertions.assertEquals(json.getString("fileName"), "test-file2.txt");
+ Assertions.assertEquals(json.getString("content"), "This is a test file for file 2.");
+ } else {
+ Assertions.fail(String.format("Unexpected entry %s in JSON response: %n%s", json, jsonArray));
+ }
+ }
+ }
+ }
+ }
+
+ private static Client createClient() {
+ return ClientBuilder.newClient().register(new FileManagerFilter());
+ }
+
+ public static class FileManagerFilter implements ClientRequestFilter {
+
+ @Override
+ public void filter(final ClientRequestContext requestContext) throws IOException {
+ if (requestContext.getMethod().equals("POST")) {
+ // Download the file
+ @SuppressWarnings("unchecked")
+ final List<EntityPart> entityParts = (List<EntityPart>) requestContext.getEntity();
+ final JsonArrayBuilder jsonBuilder = Json.createArrayBuilder();
+ for (EntityPart part : entityParts) {
+ final JsonObjectBuilder jsonPartBuilder = Json.createObjectBuilder();
+ jsonPartBuilder.add("name", part.getName());
+ if (part.getFileName().isPresent()) {
+ jsonPartBuilder.add("fileName", part.getFileName().get());
+ } else {
+ throw new BadRequestException("No file name for entity part " + part);
+ }
+ jsonPartBuilder.add("content", part.getContent(String.class));
+ jsonBuilder.add(jsonPartBuilder);
+ }
+ requestContext.abortWith(Response.status(201).entity(jsonBuilder.build()).build());
+ } else {
+ requestContext
+ .abortWith(Response.status(Response.Status.BAD_REQUEST).entity("Invalid request").build());
+ }
+ }
+ }
+}
diff --git a/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/internal/MultiPartHeaderModificationTest.java b/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/internal/MultiPartHeaderModificationTest.java
index e6ff2ed..73790c0 100644
--- a/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/internal/MultiPartHeaderModificationTest.java
+++ b/media/multipart/src/test/java/org/glassfish/jersey/media/multipart/internal/MultiPartHeaderModificationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -36,7 +36,6 @@
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.client.spi.ConnectorProvider;
import org.glassfish.jersey.grizzly.connector.GrizzlyConnectorProvider;
-import org.glassfish.jersey.jetty.connector.JettyConnectorProvider;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.test.TestProperties;
import org.glassfish.jersey.test.spi.TestHelper;
diff --git a/media/multipart/src/test/resources/multipart/test-file1.txt b/media/multipart/src/test/resources/multipart/test-file1.txt
new file mode 100644
index 0000000..2ac045a
--- /dev/null
+++ b/media/multipart/src/test/resources/multipart/test-file1.txt
@@ -0,0 +1 @@
+This is a test file for file 1.
\ No newline at end of file
diff --git a/media/multipart/src/test/resources/multipart/test-file2.txt b/media/multipart/src/test/resources/multipart/test-file2.txt
new file mode 100644
index 0000000..ed72b76
--- /dev/null
+++ b/media/multipart/src/test/resources/multipart/test-file2.txt
@@ -0,0 +1 @@
+This is a test file for file 2.
\ No newline at end of file
diff --git a/media/pom.xml b/media/pom.xml
index c196383..03b4ea3 100644
--- a/media/pom.xml
+++ b/media/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f83762f..c0f8548 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d040e56..d4ff722 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2185,7 +2185,7 @@
<resources.mvn.plugin.version>3.3.1</resources.mvn.plugin.version>
<shade.mvn.plugin.version>3.6.0</shade.mvn.plugin.version>
<source.mvn.plugin.version>3.3.1</source.mvn.plugin.version>
- <surefire.mvn.plugin.version>3.3.1</surefire.mvn.plugin.version>
+ <surefire.mvn.plugin.version>3.5.2</surefire.mvn.plugin.version>
<war.mvn.plugin.version>3.4.0</war.mvn.plugin.version>
<wiremock.mvn.plugin.version>2.11.0</wiremock.mvn.plugin.version>
<xml.mvn.plugin.version>1.1.0</xml.mvn.plugin.version>
@@ -2198,15 +2198,15 @@
<arquillian.weld.version>3.0.1.Final</arquillian.weld.version> <!-- 3.0.2.Final fails microprofile TCK tests -->
<!-- asm is now source integrated - keeping this property to see the version -->
<!-- see core-server/src/main/java/jersey/repackaged/asm/.. -->
- <asm.version>9.7</asm.version>
+ <asm.version>9.7.1</asm.version>
<!--required for spring (ext) modules integration -->
<aspectj.weaver.version>1.9.22.1</aspectj.weaver.version>
<!-- <bnd.plugin.version>2.3.6</bnd.plugin.version>-->
<bouncycastle.version>1.70</bouncycastle.version>
<commons.io.version>2.16.1</commons.io.version>
<commons.codec.version>1.16.1</commons.codec.version>
- <!-- <commons-lang3.version>3.3.2</commons-lang3.version>-->
- <commons.logging.version>1.3.3</commons.logging.version>
+<!-- <commons-lang3.version>3.3.2</commons-lang3.version>-->
+ <commons.logging.version>1.3.4</commons.logging.version>
<fasterxml.classmate.version>1.7.0</fasterxml.classmate.version>
<felix.eventadmin.version>1.6.4</felix.eventadmin.version>
<felix.framework.security.version>2.8.4</felix.framework.security.version>
@@ -2214,7 +2214,7 @@
<findbugs.glassfish.version>1.7</findbugs.glassfish.version>
<freemarker.version>2.3.33</freemarker.version>
<gae.version>2.0.29</gae.version>
- <groovy.version>4.0.23</groovy.version>
+ <groovy.version>5.0.0-alpha-11</groovy.version>
<gson.version>2.11.0</gson.version>
<!--versions, extracted here due to maven-enforcer-plugin -->
@@ -2229,7 +2229,8 @@
<!-- microprofile -->
<microprofile.config.version>3.0.3</microprofile.config.version>
- <microprofile.rest.client.version>3.0.1</microprofile.rest.client.version>
+ <microprofile.rest.client3.version>3.0.1</microprofile.rest.client3.version>
+ <microprofile.rest.client.version>4.0</microprofile.rest.client.version>
<helidon.config.version>3.2.6</helidon.config.version>
<helidon.connector.version>3.2.8</helidon.connector.version>
<helidon.config.11.version>1.4.14</helidon.config.11.version> <!-- JDK 11- support -->
@@ -2240,7 +2241,7 @@
<xmlunit.version>2.10.0</xmlunit.version>
<httpclient.version>4.5.14</httpclient.version>
<httpclient5.version>5.3.1</httpclient5.version>
- <jackson.version>2.17.2</jackson.version>
+ <jackson.version>2.18.0</jackson.version>
<javassist.version>3.30.2-GA</javassist.version>
<jettison.version>1.3.7</jettison.version> <!-- TODO: 1.3.8 doesn't work; AbstractJsonTest complexBeanWithAttributes -->
<jboss.vfs.version>3.3.2.Final</jboss.vfs.version>
@@ -2248,7 +2249,7 @@
<jmh.version>1.37</jmh.version>
<jmockit.version>1.49</jmockit.version>
<junit4.version>4.13.2</junit4.version>
- <junit5.version>5.11.0</junit5.version>
+ <junit5.version>5.11.4</junit5.version>
<junit-platform-suite.version>1.11.0</junit-platform-suite.version>
<junit-platform-suite.legacy.version>1.10.0</junit-platform-suite.legacy.version>
<kryo.version>4.0.3</kryo.version>
@@ -2270,7 +2271,7 @@
<servlet6.version>6.0.0</servlet6.version>
<simple.version>6.0.1</simple.version>
- <slf4j.version>2.0.13</slf4j.version>
+ <slf4j.version>2.0.16</slf4j.version>
<spring6.version>6.0.18</spring6.version>
<testng.version>7.10.2</testng.version>
<testng6.version>6.14.3</testng6.version>
@@ -2281,7 +2282,8 @@
<weld3.version>3.1.9.Final</weld3.version>
<validation.impl.version>8.0.1.Final</validation.impl.version>
<!-- END of Jakartified, eligible for CQ -->
- <wiremock.version>2.27.2</wiremock.version>
+ <wiremock.jetty9.version>2.27.2</wiremock.jetty9.version>
+ <wiremock.jetty11.version>3.10.0</wiremock.jetty11.version>
<xerces.version>2.12.2</xerces.version>
<!-- Graal VM -->
diff --git a/security/oauth1-client/pom.xml b/security/oauth1-client/pom.xml
index dc52d0b..1d59d2e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f67b540..d038c46 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 9bd521a..c8c2287 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e5f32ab..e4e8e10 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 3ed5e52..1e9cd93 100644
--- a/security/pom.xml
+++ b/security/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d292c14..9922dad 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml
index 4e6de63..672ba6e 100644
--- a/test-framework/maven/container-runner-maven-plugin/pom.xml
+++ b/test-framework/maven/container-runner-maven-plugin/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -36,7 +36,6 @@
</description>
<properties>
-<!-- <groovy.version>3.0.21</groovy.version>-->
<groovy-eclipse-compiler.version>3.7.0</groovy-eclipse-compiler.version>
<groovy-eclipse-batch.version>3.0.8-01</groovy-eclipse-batch.version>
<maven.version>3.9.2</maven.version>
diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml
index 81dcd87..a05ccd9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 db30ce7..3bc930e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 96b2d91..003d5bb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 344dd47..d5f8c78 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2a9b77b..19a2ffb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6849ec8..8575a36 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 687bed7..750fa45 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 3719c42..03516a3 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d17b88f..d7edd0d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty-http2/pom.xml b/test-framework/providers/jetty-http2/pom.xml
index f65e487..ad00f4e 100644
--- a/test-framework/providers/jetty-http2/pom.xml
+++ b/test-framework/providers/jetty-http2/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jetty/pom.xml b/test-framework/providers/jetty/pom.xml
index 7684651..7758309 100644
--- a/test-framework/providers/jetty/pom.xml
+++ b/test-framework/providers/jetty/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 5342501..ff41bf8 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 65e175f..de2ff26 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fee2df4..19368a5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fca4bb6..67077f8 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/e2e-client/pom.xml
index b1ae1e1..8e7f5b7 100644
--- a/tests/e2e-client/pom.xml
+++ b/tests/e2e-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fd65669..18dedc8 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/e2e-entity/pom.xml
index ae026c1..3ad546e 100644
--- a/tests/e2e-entity/pom.xml
+++ b/tests/e2e-entity/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/cdi-inject-weld/pom.xml b/tests/e2e-inject/cdi-inject-weld/pom.xml
index d5fc284..aa5fea5 100644
--- a/tests/e2e-inject/cdi-inject-weld/pom.xml
+++ b/tests/e2e-inject/cdi-inject-weld/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 514369d..51d9582 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f4669f2..f0a9c2a 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) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/non-inject/pom.xml b/tests/e2e-inject/non-inject/pom.xml
new file mode 100644
index 0000000..e4d4a1b
--- /dev/null
+++ b/tests/e2e-inject/non-inject/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
+
+ 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>e2e-inject</artifactId>
+ <groupId>org.glassfish.jersey.tests</groupId>
+ <version>3.5.99-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>e2e-inject-noninject</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jersey.incubator</groupId>
+ <artifactId>jersey-injectless-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-client</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+
+</project>
diff --git a/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/DisposableSuplierTest.java b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/DisposableSuplierTest.java
new file mode 100644
index 0000000..0d36f34
--- /dev/null
+++ b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/DisposableSuplierTest.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.inject.noninject;
+
+import org.glassfish.jersey.internal.inject.AbstractBinder;
+import org.glassfish.jersey.internal.inject.DisposableSupplier;
+import org.glassfish.jersey.process.internal.RequestScoped;
+import org.hamcrest.MatcherAssert;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class DisposableSuplierTest {
+ private static final AtomicInteger disposeCounter = new AtomicInteger(0);
+ private static final String HOST = "http://somewhere.anywhere";
+
+ public interface ResponseObject {
+ Response getResponse();
+ }
+
+ private static class TestDisposableSupplier implements DisposableSupplier<ResponseObject> {
+ AtomicInteger counter = new AtomicInteger(300);
+
+ @Override
+ public void dispose(ResponseObject instance) {
+ disposeCounter.incrementAndGet();
+ }
+
+ @Override
+ public ResponseObject get() {
+ return new ResponseObject() {
+
+ @Override
+ public Response getResponse() {
+ return Response.ok().build();
+ }
+ };
+ }
+ }
+
+ private static class DisposableSupplierInjectingFilter implements ClientRequestFilter {
+ private final ResponseObject responseSupplier;
+
+ @Inject
+ private DisposableSupplierInjectingFilter(ResponseObject responseSupplier) {
+ this.responseSupplier = responseSupplier;
+ }
+
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ requestContext.abortWith(responseSupplier.getResponse());
+ }
+ }
+
+ @Test
+ public void testDisposeCount() {
+ disposeCounter.set(0);
+ int CNT = 4;
+ Client client = ClientBuilder.newClient()
+ .register(new AbstractBinder() {
+ @Override
+ protected void configure() {
+ bindFactory(TestDisposableSupplier.class).to(ResponseObject.class)
+ .proxy(true).proxyForSameScope(false).in(RequestScoped.class);
+ }
+ }).register(DisposableSupplierInjectingFilter.class);
+
+ for (int i = 0; i != CNT; i++) {
+ try (Response response = client.target(HOST).request().get()) {
+ MatcherAssert.assertThat(response.getStatus(), Matchers.is(200));
+ }
+ }
+
+ MatcherAssert.assertThat(disposeCounter.get(), Matchers.is(CNT));
+ }
+}
diff --git a/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/InstanceListSizeTest.java b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/InstanceListSizeTest.java
new file mode 100644
index 0000000..2acb538
--- /dev/null
+++ b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/InstanceListSizeTest.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.inject.noninject;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.innate.inject.NonInjectionManager;
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.hamcrest.MatcherAssert;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+public class InstanceListSizeTest {
+
+ private static final String TEST_HEADER = "TEST";
+ private static final String HOST = "https://anywhere.any";
+
+ @Test
+ public void leakTest() throws ExecutionException, InterruptedException {
+ int CNT = 100;
+ Client client = ClientBuilder.newClient();
+ client.register(InjectionManagerGrowChecker.class);
+ Response response = client.target(HOST).request().header(TEST_HEADER, "0").get();
+ int status = response.getStatus();
+ response.close();
+ //Create instance in NonInjectionManager$TypedInstances.threadPredestroyables
+
+ for (int i = 0; i <= CNT; i++) {
+ final String header = String.valueOf(i + 1);
+ try (Response r = client.target(HOST).request()
+ .header(TEST_HEADER, header)
+ .async()
+ .post(Entity.text("text")).get()) {
+ int stat = r.getStatus();
+ MatcherAssert.assertThat(
+ "NonInjectionManager#Types#disposableSupplierObjects is increasing", stat, Matchers.is(202));
+ }
+ }
+ //Create 10 instance in NonInjectionManager$TypedInstances.threadPredestroyables
+
+ for (int i = 0; i <= CNT; i++) {
+ final String header = String.valueOf(i + CNT + 2);
+ final Object text = CompletableFuture.supplyAsync(() -> {
+ Response test = client.target(HOST).request()
+ .header("TEST", header)
+ .post(Entity.text("text"));
+ int stat = test.getStatus();
+ test.close();
+ MatcherAssert.assertThat(
+ "NonInjectionManager#Types#disposableSupplierObjects is increasing", stat, Matchers.is(202));
+
+ return null;
+ }).join();
+ }
+ //Create 10 instance in NonInjectionManager$TypedInstances.threadPredestroyables
+
+ response = client.target(HOST).request().header(TEST_HEADER, 2 * CNT + 3).get();
+ status = response.getStatus();
+ MatcherAssert.assertThat(status, Matchers.is(202));
+ response.close();
+ }
+
+ private static class InjectionManagerGrowChecker implements ClientRequestFilter {
+ private boolean first = true;
+ private int disposableSize = 0;
+ private int threadInstancesSize = 0;
+ private HttpHeaders headers;
+ private int headerCnt = 0;
+
+ @Inject
+ public InjectionManagerGrowChecker(HttpHeaders headers) {
+ this.headers = headers;
+ }
+
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ Response.Status status = Response.Status.ACCEPTED;
+ if (headerCnt++ != Integer.parseInt(headers.getHeaderString("TEST"))) {
+ status = Response.Status.BAD_REQUEST;
+ }
+
+ NonInjectionManager nonInjectionManager = getInjectionManager(requestContext);
+ Object types = getDeclaredField(nonInjectionManager, "types");
+ Object instances = getDeclaredField(nonInjectionManager, "instances");
+ if (first) {
+ first = false;
+ disposableSize = getThreadInstances(types, "disposableSupplierObjects")
+ + getThreadInstances(instances, "disposableSupplierObjects");
+ threadInstancesSize = getThreadInstances(types, "threadInstances")
+ + getThreadInstances(instances, "threadInstances");
+ } else {
+ int newPredestroyableSize = getThreadInstances(types, "disposableSupplierObjects")
+ + getThreadInstances(instances, "disposableSupplierObjects");
+ if (newPredestroyableSize > disposableSize + 1 /* a new service to get disposed */) {
+ status = Response.Status.EXPECTATION_FAILED;
+ }
+ int newThreadInstances = getThreadInstances(types, "threadInstances")
+ + getThreadInstances(instances, "threadInstances");
+ if (newThreadInstances > threadInstancesSize) {
+ status = Response.Status.PRECONDITION_FAILED;
+ }
+ }
+
+ requestContext.abortWith(Response.status(status).build());
+ }
+ }
+
+ private static NonInjectionManager getInjectionManager(ClientRequestContext context) {
+ ClientRequest request = ((ClientRequest) context);
+ try {
+ Method clientConfigMethod = ClientRequest.class.getDeclaredMethod("getClientConfig");
+ clientConfigMethod.setAccessible(true);
+ ClientConfig clientConfig = (ClientConfig) clientConfigMethod.invoke(request);
+
+ Method runtimeMethod = ClientConfig.class.getDeclaredMethod("getRuntime");
+ runtimeMethod.setAccessible(true);
+ Object clientRuntime = runtimeMethod.invoke(clientConfig);
+ Class<?> clientRuntimeClass = clientRuntime.getClass();
+
+ Method injectionManagerMethod = clientRuntimeClass.getDeclaredMethod("getInjectionManager");
+ injectionManagerMethod.setAccessible(true);
+ InjectionManager injectionManager = (InjectionManager) injectionManagerMethod.invoke(clientRuntime);
+ return (NonInjectionManager) injectionManager;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static Object getDeclaredField(NonInjectionManager nonInjectionManager, String name) {
+ try {
+ Field typesField = NonInjectionManager.class.getDeclaredField(name);
+ typesField.setAccessible(true);
+ return typesField.get(nonInjectionManager);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static int getThreadInstances(Object typedInstances, String threadLocalName) {
+ try {
+ Field threadLocalField =
+ typedInstances.getClass().getSuperclass().getDeclaredField(threadLocalName);
+ threadLocalField.setAccessible(true);
+ ThreadLocal<MultivaluedMap<?,?>> threadLocal =
+ (ThreadLocal<MultivaluedMap<?, ?>>) threadLocalField.get(typedInstances);
+ MultivaluedMap<?, ?> map = threadLocal.get();
+ if (map == null) {
+ return 0;
+ } else {
+ int cnt = 0;
+ Set<? extends Map.Entry<?, ? extends List<?>>> set = map.entrySet();
+ for (Map.Entry<?, ? extends List<?>> entry : map.entrySet()) {
+ cnt += entry.getValue().size();
+ }
+ return cnt;
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+}
diff --git a/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/PreDestroyTest.java b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/PreDestroyTest.java
new file mode 100644
index 0000000..0f43b44
--- /dev/null
+++ b/tests/e2e-inject/non-inject/src/test/org/glassfish/jersey/tests/e2e/inject/noninject/PreDestroyTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.inject.noninject;
+
+import org.glassfish.jersey.internal.inject.AbstractBinder;
+import org.glassfish.jersey.internal.inject.DisposableSupplier;
+import org.glassfish.jersey.process.internal.RequestScoped;
+import org.hamcrest.MatcherAssert;
+import org.hamcrest.Matchers;
+import org.junit.jupiter.api.Test;
+
+import jakarta.annotation.PreDestroy;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.Response;
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class PreDestroyTest {
+ private static final AtomicInteger disposeCounter = new AtomicInteger(0);
+ private static final String HOST = "http://somewhere.anywhere";
+
+ public interface ResponseObject {
+ Response getResponse();
+ }
+
+ public static class ResponseObjectImpl implements ResponseObject {
+
+ public ResponseObjectImpl() {
+
+ }
+
+ @PreDestroy
+ public void preDestroy() {
+ disposeCounter.incrementAndGet();
+ }
+
+ @Override
+ public Response getResponse() {
+ return Response.ok().build();
+ }
+ }
+
+ private static class PreDestroyInjectingFilter implements ClientRequestFilter {
+ private final ResponseObject responseSupplier;
+
+ @Inject
+ private PreDestroyInjectingFilter(ResponseObject responseSupplier) {
+ this.responseSupplier = responseSupplier;
+ }
+
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ requestContext.abortWith(responseSupplier.getResponse());
+ }
+ }
+
+ @Test
+ public void testPreDestroyCount() {
+ disposeCounter.set(0);
+ int CNT = 4;
+ Client client = ClientBuilder.newClient()
+ .register(new AbstractBinder() {
+ @Override
+ protected void configure() {
+ bind(ResponseObjectImpl.class).to(ResponseObject.class)
+ .proxy(true).proxyForSameScope(false).in(RequestScoped.class);
+ }
+ }).register(PreDestroyInjectingFilter.class);
+
+ for (int i = 0; i != CNT; i++) {
+ try (Response response = client.target(HOST).request().get()) {
+ MatcherAssert.assertThat(response.getStatus(), Matchers.is(200));
+ }
+ }
+
+ MatcherAssert.assertThat(disposeCounter.get(), Matchers.is(1));
+ }
+}
diff --git a/tests/e2e-inject/pom.xml b/tests/e2e-inject/pom.xml
index 8499ec0..024ef81 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -36,5 +36,6 @@
<module>cdi2-se</module>
<module>cdi-inject-weld</module>
<module>hk2</module>
+ <module>non-inject</module>
</modules>
</project>
diff --git a/tests/e2e-jdk-specifics/pom.xml b/tests/e2e-jdk-specifics/pom.xml
index b06de6a..0588537 100644
--- a/tests/e2e-jdk-specifics/pom.xml
+++ b/tests/e2e-jdk-specifics/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8d5af4a..bfa987e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/Issue5783Test.java b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/Issue5783Test.java
new file mode 100644
index 0000000..ab7b301
--- /dev/null
+++ b/tests/e2e-server/src/test/java/org/glassfish/jersey/tests/e2e/server/Issue5783Test.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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 static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.ext.Provider;
+
+import org.glassfish.jersey.server.ContainerRequest;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.spi.ContainerResponseWriter;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.jupiter.api.Test;
+
+public class Issue5783Test extends JerseyTest {
+
+ private static final String ERROR = "Intentional issue5783 exception";
+ private static volatile String exceptionMessage;
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(Resource.class, ResponseFilter.class);
+ }
+
+ @Test
+ public void closeException() throws InterruptedException {
+ target("/test").request().get();
+ assertEquals(ERROR, exceptionMessage);
+ }
+
+ @Path("/test")
+ public static class Resource {
+
+ @GET
+ public Response closeException(@Context ContainerRequest request) {
+ // Save the exception when response.getRequestContext().getResponseWriter().failure(e)
+ ContainerResponseWriter writer = request.getResponseWriter();
+ ContainerResponseWriter proxy = (ContainerResponseWriter) Proxy.newProxyInstance(
+ ContainerResponseWriter.class.getClassLoader(),
+ new Class<?>[]{ContainerResponseWriter.class}, new InvocationHandler() {
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if ("failure".equals(method.getName())) {
+ exceptionMessage = ((Throwable) args[0]).getCause().getMessage();
+ }
+ return method.invoke(writer, args);
+ }
+ });
+ request.setWriter(proxy);
+ return Response.ok().build();
+ }
+ }
+
+ @Provider
+ public static class ResponseFilter implements ContainerResponseFilter {
+ @Override
+ public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
+ throws IOException {
+ // Hack it to make ContainerResponse#close throws one exception
+ responseContext.setEntity("something");
+ responseContext.setEntityStream(new ByteArrayOutputStream() {
+ @Override
+ public void close() throws IOException {
+ throw new IOException(ERROR);
+ }
+ });
+ }
+ }
+}
diff --git a/tests/e2e-testng/pom.xml b/tests/e2e-testng/pom.xml
index 9946c71..f0ba038 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-tls/pom.xml b/tests/e2e-tls/pom.xml
index 5c73498..5fd9794 100644
--- a/tests/e2e-tls/pom.xml
+++ b/tests/e2e-tls/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -170,6 +170,24 @@
</http.patch.addopens>
</properties>
</profile>
+ <profile>
+ <id>JDK_17-</id>
+ <activation>
+ <jdk>[11,17)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- The certificate is not working with JDK 11 -->
+ <excludes><exclude>**/ConcurrentHttpsUrlConnectionTest*</exclude></excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
index 7da4a6b..03ee91f 100644
--- a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
+++ b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/SniTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -23,6 +23,7 @@
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.client.spi.ConnectorProvider;
+import org.glassfish.jersey.internal.util.JdkVersion;
import org.glassfish.jersey.jdk.connector.JdkConnectorProvider;
import org.glassfish.jersey.jnh.connector.JavaNetHttpConnectorProvider;
import org.glassfish.jersey.netty.connector.NettyConnectorProvider;
@@ -48,6 +49,7 @@
public class SniTest {
private static final int PORT = 8443;
private static final String LOCALHOST = "127.0.0.1";
+ private static JdkVersion jdkVersion = JdkVersion.getJdkVersion();
static {
// Debug
@@ -58,14 +60,17 @@
}
public static ConnectorProvider[] getConnectors() {
- return new ConnectorProvider[] {
- new NettyConnectorProvider(),
- new ApacheConnectorProvider(),
- new Apache5ConnectorProvider(),
- new JdkConnectorProvider(),
- new HttpUrlConnectorProvider(),
- new JavaNetHttpConnectorProvider()
- };
+ ConnectorProvider[] providers = new ConnectorProvider[jdkVersion.getMajor() < 24 ? 6 : 5];
+ providers[0] = new NettyConnectorProvider();
+ providers[1] = new ApacheConnectorProvider();
+ providers[2] = new Apache5ConnectorProvider();
+ providers[3] = new JdkConnectorProvider();
+ providers[4] = new HttpUrlConnectorProvider();
+ if (jdkVersion.getMajor() < 24) {
+ /* The trick with 127.0.0.1 instead of the host in uri to get the SNI does not work for JDK 24 any longer */
+ providers[5] = new JavaNetHttpConnectorProvider();
+ }
+ return providers;
}
@ParameterizedTest
@@ -122,7 +127,7 @@
.path("host")
.request();
if (!JavaNetHttpConnectorProvider.class.isInstance(provider)) {
- builder = builder.header(HttpHeaders.HOST, hostName + ":8080");
+ builder = builder.header(HttpHeaders.HOST, hostName + ":" + PORT);
}
try (Response r = builder.get()) {
// empty
diff --git a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/ConcurrentHttpsUrlConnectionTest.java b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/ConcurrentHttpsUrlConnectionTest.java
new file mode 100644
index 0000000..444cee6
--- /dev/null
+++ b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/ConcurrentHttpsUrlConnectionTest.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.tls.connector;
+
+import org.junit.jupiter.api.Test;
+
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.core.GenericType;
+import jakarta.ws.rs.core.MediaType;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.security.KeyStore;
+import java.util.Random;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.TrustManagerFactory;
+
+/**
+ * Jersey client seems to be not thread-safe:
+ * When the first GET request is in progress,
+ * all parallel requests from other Jersey client instances fail
+ * with SSLHandshakeException: PKIX path building failed.
+ * <p>
+ * Once the first GET request is completed,
+ * all subsequent requests work without error.
+ * <p>
+ * BUG 5749
+ */
+public class ConcurrentHttpsUrlConnectionTest {
+ private static int THREAD_NUMBER = 5;
+
+ private static volatile int responseCounter = 0;
+
+ private static SSLContext createContext() throws Exception {
+ URL url = ConcurrentHttpsUrlConnectionTest.class.getResource("keystore.jks");
+ KeyStore keyStore = KeyStore.getInstance("JKS");
+ try (InputStream is = url.openStream()) {
+ keyStore.load(is, "password".toCharArray());
+ }
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+ kmf.init(keyStore, "password".toCharArray());
+ TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
+ tmf.init(keyStore);
+ SSLContext context = SSLContext.getInstance("TLS");
+ context.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+ return context;
+ }
+
+ @Test
+ public void testSSLConnections() throws Exception {
+ if (THREAD_NUMBER == 1) {
+ System.out.println("\nThis is the working case (THREAD_NUMBER==1). Set THREAD_NUMBER > 1 to reproduce the error! \n");
+ }
+
+ final HttpsServer server = new HttpsServer(createContext());
+ Executors.newFixedThreadPool(1).submit(server);
+
+ // set THREAD_NUMBER > 1 to reproduce an issue
+ ExecutorService executorService2clients = Executors.newFixedThreadPool(THREAD_NUMBER);
+
+ final ClientBuilder builder = ClientBuilder.newBuilder().sslContext(createContext())
+ .hostnameVerifier(new HostnameVerifier() {
+ public boolean verify(String arg0, SSLSession arg1) {
+ return true;
+ }
+ });
+
+ AtomicInteger counter = new AtomicInteger(0);
+
+ for (int i = 0; i < THREAD_NUMBER; i++) {
+ executorService2clients.submit(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Client client = builder.build();
+ String ret = client.target("https://127.0.0.1:" + server.getPort() + "/" + new Random().nextInt())
+ .request(MediaType.TEXT_HTML)
+ .get(new GenericType<String>() {
+ });
+ System.out.print(++responseCounter + ". Server returned: " + ret);
+ } catch (Exception e) {
+ //get an exception here, if jersey lib is buggy and THREAD_NUMBER > 1:
+ //jakarta.ws.rs.ProcessingException: jakarta.net.ssl.SSLHandshakeException: PKIX path building failed:
+ e.printStackTrace();
+ } finally {
+ System.out.println(counter.incrementAndGet());
+ }
+ }
+ });
+ }
+
+ while (counter.get() != THREAD_NUMBER) {
+ Thread.sleep(100L);
+ }
+ server.stop();
+ }
+}
diff --git a/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/HttpsServer.java b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/HttpsServer.java
new file mode 100644
index 0000000..31214f1
--- /dev/null
+++ b/tests/e2e-tls/src/test/java/org/glassfish/jersey/tests/e2e/tls/connector/HttpsServer.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.tls.connector;
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLSocket;
+
+class HttpsServer implements Runnable {
+ private final SSLServerSocket sslServerSocket;
+ private boolean closed = false;
+
+ public HttpsServer(SSLContext context) throws Exception {
+ sslServerSocket = (SSLServerSocket) context.getServerSocketFactory().createServerSocket(0);
+ }
+
+ public int getPort() {
+ return sslServerSocket.getLocalPort();
+ }
+
+ @Override
+ public void run() {
+ System.out.printf("Server started on port %d%n", getPort());
+ while (!closed) {
+ SSLSocket s;
+ try {
+ s = (SSLSocket) sslServerSocket.accept();
+ } catch (IOException e2) {
+ s = null;
+ }
+ final SSLSocket socket = s;
+ new Thread(new Runnable() {
+ public void run() {
+ try {
+ if (socket != null) {
+ InputStream is = new BufferedInputStream(socket.getInputStream());
+ byte[] data = new byte[2048];
+ int len = is.read(data);
+ if (len <= 0) {
+ throw new IOException("no data received");
+ }
+ //System.out.printf("Server received: %s\n", new String(data, 0, len));
+ PrintWriter writer = new PrintWriter(socket.getOutputStream());
+ writer.println("HTTP/1.1 200 OK");
+ writer.println("Content-Type: text/html");
+ writer.println();
+ writer.println("Hello from server!");
+ writer.flush();
+ writer.close();
+ socket.close();
+ }
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ }
+ }).start();
+ }
+ }
+
+ void stop() {
+ try {
+ closed = true;
+ sslServerSocket.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/tests/e2e-tls/src/test/resources/org/glassfish/jersey/tests/e2e/tls/connector/keystore.jks b/tests/e2e-tls/src/test/resources/org/glassfish/jersey/tests/e2e/tls/connector/keystore.jks
new file mode 100644
index 0000000..130aa71
--- /dev/null
+++ b/tests/e2e-tls/src/test/resources/org/glassfish/jersey/tests/e2e/tls/connector/keystore.jks
Binary files differ
diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml
index 8378fe2..2fbbd20 100644
--- a/tests/e2e/pom.xml
+++ b/tests/e2e/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/NoJAXBNoWadlTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/NoJAXBNoWadlTest.java
index 70ee14d..e068287 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/NoJAXBNoWadlTest.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/server/wadl/NoJAXBNoWadlTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -35,6 +35,9 @@
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
+import java.util.List;
+import java.util.Arrays;
+import java.util.Collections;
public class NoJAXBNoWadlTest extends JerseyTest {
@@ -72,7 +75,9 @@
try (Response r = target("dummy").request(MediaTypes.WADL_TYPE).options()) {
String headers = r.getHeaderString(HttpHeaders.ALLOW);
- Assertions.assertEquals("OPTIONS,PUT", headers);
+ List<String> methods = Arrays.asList(headers.split(","));
+ Collections.sort(methods);
+ Assertions.assertEquals(Arrays.asList("OPTIONS", "PUT"), methods);
}
System.out.println(readableStream.toString());
Assertions.assertTrue(
diff --git a/tests/integration/asm/pom.xml b/tests/integration/asm/pom.xml
index 30eef7b..b58b4bf 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml
index b8fb128..4a027e6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
index 9f53580..aa595c5 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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
index f270d0b..07f2c31 100644
--- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
+++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml
index f123376..1c0fe73 100644
--- a/tests/integration/cdi-integration/cdi-client/pom.xml
+++ b/tests/integration/cdi-integration/cdi-client/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
index 6a23e1b..43f7d13 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 db5320a..d20cc9d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml
index be6ebb1..f0ba288 100644
--- a/tests/integration/cdi-integration/cdi-log-check/pom.xml
+++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a1d67ad..0ae6627 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/ear/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
index 8a01ce9..e64b9e2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 15b8d1c..b0068ed 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7eca36f..595318d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1b803b7..03cea2b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 84ab7c8..040fb6e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 92e6bb5..1736945 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-resource-with-at-context/pom.xml b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml
index e282fff..c1bfc72 100644
--- a/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml
+++ b/tests/integration/cdi-integration/cdi-resource-with-at-context/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml
index 0508502..acb9551 100644
--- a/tests/integration/cdi-integration/cdi-singleton/pom.xml
+++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-skipping-analyzer/pom.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
index 0d86799..2da1124 100644
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2024, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
index 7414097..3d9a471 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7c8c352..47b43ba 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 81b8b32..d9c44ee 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 c5d0c0a..8664757 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/context-inject-on-server/pom.xml b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
index 3c688aa..d2f9544 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml
+++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/gf-cdi-inject/pom.xml b/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
index e571024..870b9fa 100644
--- a/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
+++ b/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 21a6edf..5109b3c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -78,7 +78,7 @@
<profile>
<id>gf-inject</id>
<activation>
- <jdk>[11,)</jdk>
+ <jdk>[11,24)</jdk>
</activation>
<modules>
<module>gf-cdi-inject</module>
diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml
index 45ad9ca..ce4bc94 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 01ee899..d39eeb5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 268162a..554a006 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 4a74f1e..272cab9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 ad07088..9e0a367 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0f81a34..21f63e3 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 4309927..b73482a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 819dd25..a2d877b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 80bb8b4..e88fa93 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cb17fa1..3990311 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 9463141..f27d750 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/externalproperties/pom.xml b/tests/integration/externalproperties/pom.xml
index b993500..8feec0d 100644
--- a/tests/integration/externalproperties/pom.xml
+++ b/tests/integration/externalproperties/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/j-376/pom.xml
index 822521d..4a56aa2 100644
--- a/tests/integration/j-376/pom.xml
+++ b/tests/integration/j-376/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 57cb1f2..e5bd5a1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 3c1b410..6107c63 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 acd35ef..eaba647 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6a339dd..4aa9230 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 77a50ea..5fa0d35 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 b544349..168d2b6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 fa40b4a..92a7525 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8a0d9a6..df6801a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jackson-14/pom.xml b/tests/integration/jackson-14/pom.xml
index da51eda..0d56f72 100644
--- a/tests/integration/jackson-14/pom.xml
+++ b/tests/integration/jackson-14/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2023, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2023, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a1dbe30..c6c5b0d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2017, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e5d7b6e..69c5698 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 9552df2..5f3c3b1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2a7c964..e940edb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cc1b88a..f91e94e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 421d3a5..21de9f6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0a3c594..1f7faba 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 b1f3eaf..6b3b0ad 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 5bad123..2246809 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-2031/pom.xml b/tests/integration/jersey-2031/pom.xml
index 3ca74ac..0a0a67c 100644
--- a/tests/integration/jersey-2031/pom.xml
+++ b/tests/integration/jersey-2031/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0fdd1bf..f4e4923 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0e496b2..b89875b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 ecd45ed..99af403 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 3e9d6a0..6b88259 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 faa0eed..8a2650d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 ed7fec7..79623ef 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 c262750..a89c35f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cddf8f9..1917710 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8e30834..848f85b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 beda6ba..6f022fd 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1d1d4e4..2b753ed 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6215400..1d7a655 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f8ea154..d3318cb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a02df34..5c49c19 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1e359f6..485cad5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 70e6076..7ff21a6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f276b15..8c04b5b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 ba494d6..5176497 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 51b1225..3bbbe91 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d976ab6..fb99ae9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e26de85..5b5e41d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 bb930e1..fdb90d6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 360675b..09f94cf 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7d0354f..ed77ae1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-3662/pom.xml b/tests/integration/jersey-3662/pom.xml
index 48dde66..ba4e744 100644
--- a/tests/integration/jersey-3662/pom.xml
+++ b/tests/integration/jersey-3662/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a94375e..43d69bb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 8ad6e30..ea71991 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2018, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/jersey-3992/pom.xml
index 6ffef92..68c5217 100644
--- a/tests/integration/jersey-3992/pom.xml
+++ b/tests/integration/jersey-3992/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 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-4003/pom.xml b/tests/integration/jersey-4003/pom.xml
index 4fcec64..5f97a69 100644
--- a/tests/integration/jersey-4003/pom.xml
+++ b/tests/integration/jersey-4003/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-4099/pom.xml b/tests/integration/jersey-4099/pom.xml
index 9b1127e..d30a157 100644
--- a/tests/integration/jersey-4099/pom.xml
+++ b/tests/integration/jersey-4099/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 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 d273d79..72c275c 100644
--- a/tests/integration/jersey-4321/pom.xml
+++ b/tests/integration/jersey-4321/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 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-4507/pom.xml b/tests/integration/jersey-4507/pom.xml
index 883ce16..0a5e6bc 100644
--- a/tests/integration/jersey-4507/pom.xml
+++ b/tests/integration/jersey-4507/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-4542/pom.xml b/tests/integration/jersey-4542/pom.xml
index 9941ed9..ba0db35 100644
--- a/tests/integration/jersey-4542/pom.xml
+++ b/tests/integration/jersey-4542/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-4697/pom.xml b/tests/integration/jersey-4697/pom.xml
index 6674d5f..bfd7b05 100644
--- a/tests/integration/jersey-4697/pom.xml
+++ b/tests/integration/jersey-4697/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-4722/pom.xml b/tests/integration/jersey-4722/pom.xml
index 962bd15..5dd0445 100644
--- a/tests/integration/jersey-4722/pom.xml
+++ b/tests/integration/jersey-4722/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2021, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-4949/pom.xml b/tests/integration/jersey-4949/pom.xml
index c3f0dce..88e26df 100644
--- a/tests/integration/jersey-4949/pom.xml
+++ b/tests/integration/jersey-4949/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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-780/pom.xml b/tests/integration/jersey-780/pom.xml
index 5dc94ef..f375d10 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/helidon/pom.xml b/tests/integration/microprofile/config/helidon/pom.xml
index 85ad69d..674c9a5 100644
--- a/tests/integration/microprofile/config/helidon/pom.xml
+++ b/tests/integration/microprofile/config/helidon/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/microprofile/config/pom.xml
index 93c8534..b44cddd 100644
--- a/tests/integration/microprofile/config/pom.xml
+++ b/tests/integration/microprofile/config/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/microprofile/config/webapp/pom.xml
index 81d1df7..519e2da 100644
--- a/tests/integration/microprofile/config/webapp/pom.xml
+++ b/tests/integration/microprofile/config/webapp/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/microprofile/pom.xml
index a7abb48..d9dff8b 100644
--- a/tests/integration/microprofile/pom.xml
+++ b/tests/integration/microprofile/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
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 @@
<module>config</module>
<module>rest-client</module>
<module>rest-client-tck</module>
+ <module>rest-client-tck3</module>
</modules>
<build>
diff --git a/tests/integration/microprofile/rest-client-tck/pom.xml b/tests/integration/microprofile/rest-client-tck/pom.xml
index 7f8a829..60bb5a0 100644
--- a/tests/integration/microprofile/rest-client-tck/pom.xml
+++ b/tests/integration/microprofile/rest-client-tck/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -35,6 +35,24 @@
<artifactId>jersey-mp-rest-client</artifactId>
<version>${project.version}</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.microprofile.rest.client</groupId>
+ <artifactId>microprofile-rest-client-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.microprofile.rest.client</groupId>
+ <artifactId>microprofile-rest-client-api</artifactId>
+ <version>${microprofile.rest.client.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.microprofile.rest.client</groupId>
+ <artifactId>microprofile-rest-client-tck</artifactId>
+ <version>${microprofile.rest.client.version}</version>
+ <scope>test</scope>
</dependency>
<!-- Overrides CDI from parent pom -->
<dependency>
@@ -51,9 +69,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>4.0.1</version>
+ <groupId>jakarta.servlet</groupId>
+ <artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
@@ -62,21 +79,15 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.eclipse.microprofile.rest.client</groupId>
- <artifactId>microprofile-rest-client-tck</artifactId>
- <version>${microprofile.rest.client.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>${testng6.version}</version>
+ <version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.github.tomakehurst</groupId>
+ <groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
- <version>${wiremock.version}</version>
+ <version>${wiremock.jetty11.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
@@ -171,6 +182,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-multipart</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-weld2-se</artifactId>
<scope>test</scope>
@@ -239,11 +255,20 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>securityOff</id>
+ <activation>
+ <jdk>[24,)</jdk>
+ </activation>
+ <properties>
+ <surefire.security.argline />
+ </properties>
+ </profile>
</profiles>
<properties>
<surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy</surefire.security.argline>
- <jetty.version>${jetty9.version}</jetty.version>
+ <jetty.version>${jetty11.version}</jetty.version>
</properties>
diff --git a/tests/integration/microprofile/rest-client-tck3/pom.xml b/tests/integration/microprofile/rest-client-tck3/pom.xml
new file mode 100644
index 0000000..c98a715
--- /dev/null
+++ b/tests/integration/microprofile/rest-client-tck3/pom.xml
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
+
+ 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>microprofile-integration-project</artifactId>
+ <groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
+ <version>3.5.99-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jersey-rest-client-tck3</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.microprofile</groupId>
+ <artifactId>jersey-mp-rest-client</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- Overrides CDI from parent pom -->
+ <dependency>
+ <groupId>jakarta.enterprise</groupId>
+ <artifactId>jakarta.enterprise.cdi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jakarta.ejb</groupId>
+ <artifactId>jakarta.ejb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld.se</groupId>
+ <artifactId>weld-se-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>io.smallrye.config</groupId>
+ <artifactId>smallrye-config</artifactId>
+ <version>${smallrye.config.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.microprofile.rest.client</groupId>
+ <artifactId>microprofile-rest-client-tck</artifactId>
+ <version>${microprofile.rest.client.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>${testng6.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.github.tomakehurst</groupId>
+ <artifactId>wiremock</artifactId>
+ <version>${wiremock.jetty9.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlet</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-proxy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>${guava.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-server</artifactId>
+ <version>${jetty.version}</version>
+ <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.eclipse.jetty</groupId>
+ <artifactId>jetty-servlets</artifactId>
+ <version>${jetty.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ <version>${jetty.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-proxy</artifactId>
+ <version>${jetty.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.testng</groupId>
+ <artifactId>arquillian-testng-container</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-container-test-spi</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <version>${arquillian.weld.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
+ <scope>test</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.connectors</groupId>
+ <artifactId>jersey-apache-connector</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext.cdi</groupId>
+ <artifactId>jersey-weld2-se</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit4.version}</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>testRunner</id>
+<!-- DO NOT ACTIVATE BY DEFAULT, tests are run by rest-client-tck (4) -->
+<!-- Kept for case of an error found in version 3 -->
+<!-- <activation>-->
+<!-- <property>-->
+<!-- <name>skipTests</name>-->
+<!-- <value>!true</value>-->
+<!-- </property>-->
+<!-- <jdk>[17,)</jdk>-->
+<!-- </activation>-->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit47</artifactId>
+ <version>${surefire.mvn.plugin.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-testng</artifactId>
+ <version>${surefire.mvn.plugin.version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <threadCount>1</threadCount>
+ <suiteXmlFiles>
+ <suiteXmlFile>tck-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+<!-- <argLine>-verbose:class</argLine>-->
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>uk.co.deliverymind</groupId>
+ <artifactId>wiremock-maven-plugin</artifactId>
+ <version>${wiremock.mvn.plugin.version}</version>
+ <executions>
+ <execution>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <dir>target/classes</dir>
+ <params>--port=8765</params>
+ <!-- Enable verbose for more detailed output-->
+ <!-- <params>--verbose</params>-->
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>securityOff</id>
+ <activation>
+ <jdk>[24,)</jdk>
+ </activation>
+ <properties>
+ <surefire.security.argline />
+ </properties>
+ </profile>
+ </profiles>
+
+ <properties>
+ <surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/server.policy</surefire.security.argline>
+ <jetty.version>${jetty9.version}</jetty.version>
+ <microprofile.rest.client.version>${microprofile.rest.client3.version}</microprofile.rest.client.version>
+ </properties>
+
+
+</project>
diff --git a/tests/integration/microprofile/rest-client-tck3/src/test/resources/arquillian.xml b/tests/integration/microprofile/rest-client-tck3/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..fffd8c9
--- /dev/null
+++ b/tests/integration/microprofile/rest-client-tck3/src/test/resources/arquillian.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
+
+ 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
+
+-->
+
+<arquillian xmlns="http://jboss.org/schema/arquillian"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://jboss.org/schema/arquillian
+ http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <engine>
+ <property name="deploymentExportPath">target/deployments</property>
+ </engine>
+</arquillian>
diff --git a/tests/integration/microprofile/rest-client-tck3/src/test/resources/server.policy b/tests/integration/microprofile/rest-client-tck3/src/test/resources/server.policy
new file mode 100644
index 0000000..d448842
--- /dev/null
+++ b/tests/integration/microprofile/rest-client-tck3/src/test/resources/server.policy
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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
+ */
+
+grant {
+ permission java.security.AllPermission;
+};
diff --git a/tests/integration/microprofile/rest-client-tck3/tck-suite.xml b/tests/integration/microprofile/rest-client-tck3/tck-suite.xml
new file mode 100644
index 0000000..c83fae3
--- /dev/null
+++ b/tests/integration/microprofile/rest-client-tck3/tck-suite.xml
@@ -0,0 +1,29 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
+
+ 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
+
+-->
+
+<suite name="microprofile-rest-client-TCK" verbose="2" configfailurepolicy="continue">
+
+ <test name="microprofile-rest-client TCK">
+ <packages>
+ <package name="org.eclipse.microprofile.rest.client.tck.*">
+ </package>
+ </packages>
+ </test>
+
+</suite>
diff --git a/tests/integration/microprofile/rest-client/pom.xml b/tests/integration/microprofile/rest-client/pom.xml
index 55516a7..001014e 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2019, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -107,6 +107,15 @@
</dependency>
</dependencies>
</profile>
+ <profile>
+ <id>securityOff</id>
+ <activation>
+ <jdk>[24,)</jdk>
+ </activation>
+ <properties>
+ <surefire.security.argline />
+ </properties>
+ </profile>
</profiles>
<properties>
diff --git a/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/HttpHeaderTest.java b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/HttpHeaderTest.java
new file mode 100644
index 0000000..fd31fe8
--- /dev/null
+++ b/tests/integration/microprofile/rest-client/src/test/java/org/glassfish/jersey/test/microprofile/restclient/HttpHeaderTest.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.test.microprofile.restclient;
+
+import jakarta.json.Json;
+import jakarta.json.JsonArray;
+import jakarta.json.JsonArrayBuilder;
+import jakarta.json.JsonObject;
+import jakarta.json.JsonObjectBuilder;
+import jakarta.json.JsonString;
+import jakarta.json.JsonValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.HeaderParam;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
+import org.eclipse.microprofile.rest.client.RestClientBuilder;
+import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class HttpHeaderTest {
+ @Path("/")
+ public interface HeaderResource {
+ @GET
+ public String get();
+ }
+
+ @Test
+ public void restclientBuilderWithHeadersTest() {
+ String headerName = "BUILDER_HEADER";
+ String headerValue = "BUILDER_VALUE";
+ HeaderResource resource = RestClientBuilder.newBuilder()
+ .baseUri("http://localhost:8080")
+ .register(new ClientRequestFilter() {
+ @Override
+ public void filter(ClientRequestContext requestContext) throws IOException {
+ if (requestContext.getHeaders().containsKey(headerName)) {
+ requestContext.abortWith(Response.ok(requestContext.getHeaders().getFirst(headerName)).build());
+ } else {
+ requestContext.abortWith(Response.ok("no_header").build());
+ }
+ }
+ })
+ .header(headerName, headerValue)
+ .build(HeaderResource.class);
+ Assertions.assertEquals(headerValue, resource.get());
+ }
+
+ @ClientHeaderParam(name = "InterfaceAndBuilderHeader", value = "interface")
+ @Path("/")
+ public interface ClientBuilderHeaderClient {
+
+ @GET
+ JsonObject getAllHeaders(@HeaderParam("HeaderParam") String param);
+ }
+
+ public static class ReturnWithAllDuplicateClientHeadersFilter implements ClientRequestFilter {
+
+ @Override
+ public void filter(ClientRequestContext clientRequestContext) throws IOException {
+ JsonObjectBuilder allClientHeaders = Json.createObjectBuilder();
+ MultivaluedMap<String, Object> clientHeaders = clientRequestContext.getHeaders();
+ for (String headerName : clientHeaders.keySet()) {
+ List<Object> header = clientHeaders.get(headerName);
+ final JsonArrayBuilder headerValues = Json.createArrayBuilder();
+ header.forEach(h -> headerValues.add(h.toString()));
+ allClientHeaders.add(headerName, headerValues);
+ }
+ clientRequestContext.abortWith(Response.ok(allClientHeaders.build()).build());
+ }
+
+ }
+
+ @Test
+ public void testHeaderBuilderInterface() {
+
+ RestClientBuilder builder = RestClientBuilder.newBuilder().baseUri("http://localhost:8080/");
+ builder.register(ReturnWithAllDuplicateClientHeadersFilter.class);
+ builder.header("InterfaceAndBuilderHeader", "builder");
+ ClientBuilderHeaderClient client = builder.build(ClientBuilderHeaderClient.class);
+
+ checkHeaders(client.getAllHeaders("headerparam"), "interface");
+ }
+
+ private static void checkHeaders(final JsonObject headers, final String clientHeaderParamName) {
+ final List<String> clientRequestHeaders = headerValues(headers, "InterfaceAndBuilderHeader");
+
+ assertTrue(clientRequestHeaders.contains("builder"),
+ "Header InterfaceAndBuilderHeader did not container \"builder\": " + clientRequestHeaders);
+ assertTrue(clientRequestHeaders.contains(clientHeaderParamName),
+ "Header InterfaceAndBuilderHeader did not container \"" + clientHeaderParamName + "\": "
+ + clientRequestHeaders);
+
+ final List<String> headerParamHeaders = headerValues(headers, "HeaderParam");
+ assertTrue(headerParamHeaders.contains("headerparam"),
+ "Header HeaderParam did not container \"headerparam\": " + headerParamHeaders);
+ }
+
+ private static List<String> headerValues(final JsonObject headers, final String headerName) {
+ final JsonArray headerValues = headers.getJsonArray(headerName);
+ Assertions.assertNotNull(headerValues,
+ String.format("Expected header '%s' to be present in %s", headerName, headers));
+ return headerValues.stream().map(
+ v -> (v.getValueType() == JsonValue.ValueType.STRING ? ((JsonString) v).getString() : v.toString()))
+ .collect(Collectors.toList());
+ }
+
+}
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index 3d75a50..f2870ca 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 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
@@ -159,6 +159,7 @@
<module>jersey-2892</module>
<module>jersey-3796</module>
<module>jersey-4949</module>
+ <module>resteasy-client</module>
<module>security-digest</module>
<module>servlet-2.5-autodiscovery-1</module>
<module>servlet-2.5-autodiscovery-2</module>
diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml
index e2a75d4..47d4eb4 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/reactive-streams/pom.xml b/tests/integration/reactive-streams/pom.xml
index 63992b4..6692a4f 100644
--- a/tests/integration/reactive-streams/pom.xml
+++ b/tests/integration/reactive-streams/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/reactive-streams/sse/pom.xml b/tests/integration/reactive-streams/sse/pom.xml
index 5636c6a..35f8814 100644
--- a/tests/integration/reactive-streams/sse/pom.xml
+++ b/tests/integration/reactive-streams/sse/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/resteasy-client/pom.xml b/tests/integration/resteasy-client/pom.xml
new file mode 100644
index 0000000..a4be16e
--- /dev/null
+++ b/tests/integration/resteasy-client/pom.xml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
+
+ 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</groupId>
+ <artifactId>project</artifactId>
+ <version>3.5.99-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>spring-boot</artifactId>
+
+ <packaging>war</packaging>
+ <name>jersey-tests-integration-spring6</name>
+
+ <description>
+ Jersey tests for Spring.Boot / Resteasy integration
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-client</artifactId>
+ <version>6.2.11.Final</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>commons-logging</artifactId>
+ <groupId>commons-logging</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-external</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-jackson</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/tests/integration/resteasy-client/src/test/java/org/glassfish/jersey/tests/springboot/RestEasyClientTest.java b/tests/integration/resteasy-client/src/test/java/org/glassfish/jersey/tests/springboot/RestEasyClientTest.java
new file mode 100644
index 0000000..de1461f
--- /dev/null
+++ b/tests/integration/resteasy-client/src/test/java/org/glassfish/jersey/tests/springboot/RestEasyClientTest.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
+ *
+ * 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.springboot;
+
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Configuration;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.MultivaluedMap;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.ext.Providers;
+import org.glassfish.jersey.jackson.internal.DefaultJacksonJaxbJsonProvider;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.jboss.resteasy.client.jaxrs.ResteasyClient;
+import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.concurrent.CountDownLatch;
+
+public class RestEasyClientTest extends JerseyTest {
+
+ private static final CountDownLatch readFromLatch = new CountDownLatch(1);
+
+ @Path("/")
+ public static class RestEasyClientTestResource {
+ @POST
+ @Path("/test")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String testPost(String echo) {
+ return echo;
+ }
+ }
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(RestEasyClientTestResource.class);
+ }
+
+ @Test
+ public void test() throws InterruptedException {
+ try (final ResteasyClient client = new ResteasyClientBuilderImpl().build()) {
+ client.register(TestDefaultJacksonJaxbJsonProvider.class);
+
+ try (final Response r = client.target(target().getUri()).path("/test")
+ .request().post(Entity.entity("{\"test\": \"test\"}", MediaType.APPLICATION_JSON))) {
+ Object o = r.readEntity(Object.class);
+ Assertions.assertTrue(o.toString().contains("test"));
+ readFromLatch.await();
+ Assertions.assertEquals(0, readFromLatch.getCount(), "DefaultJacksonJaxbJsonProvider has not been used");
+ }
+ }
+ }
+
+ public static class TestDefaultJacksonJaxbJsonProvider extends DefaultJacksonJaxbJsonProvider {
+ public TestDefaultJacksonJaxbJsonProvider(@Context Providers providers, @Context Configuration config) {
+ super(providers, config);
+ }
+
+ @Override
+ public Object readFrom(Class<Object> type, Type genericType, Annotation[] annotations, MediaType mediaType,
+ MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException {
+ readFromLatch.countDown();
+ return super.readFrom(type, genericType, annotations, mediaType, httpHeaders, entityStream);
+ }
+ }
+
+}
diff --git a/tests/integration/security-digest/pom.xml b/tests/integration/security-digest/pom.xml
index 9ce4369..e2183c5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6d6f354..6b3fd7a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 741f4d1..63eeca1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 82469b3..4c1b516 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 05cf37d..3e9b3a9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 9cd5579..85c8a56 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 4c24000..3d49904 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 b2fd51b..cb77660 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 cbdbce6..cf43ab4 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 373cd69..746a9ea 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 86876ae..834d402 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 779892e..f389c49 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6dbfe77..2136c32 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 eb37fb0..4616d42 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 49a7fef..0de5f1f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a3f322c..cf94ea6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2ed4d84..279350f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 62c7f45..cdea9f1 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1672ebd..49d4cb6 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 b45643a..a7dbd3f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 421dd08..5d60547 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0e53e0f..41c3b16 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f1eeabb..194f133 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2253185..1bd444c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 db1a130..f5c4b6d 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 66bc383..80c33cb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 de604ef..6f3a387 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 205dde7..ce34d7c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d826dce..6a36003 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7e42880..db5e92f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/servlet-3-init-9/pom.xml
index 2162a9c..9754ed8 100644
--- a/tests/integration/servlet-3-init-9/pom.xml
+++ b/tests/integration/servlet-3-init-9/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 93dd20f..9e37c0f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f5dc93c..e21cbc0 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6d90cc9..25ee9f5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/pom.xml b/tests/integration/servlet-4.0-mvc-1/pom.xml
index 99d8251..7b9f095 100644
--- a/tests/integration/servlet-4.0-mvc-1/pom.xml
+++ b/tests/integration/servlet-4.0-mvc-1/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 4c78d5a..3a5ed71 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 237fe5e..644f560 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2332122..417d910 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 31445d8..87a9430 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/spring6/pom.xml b/tests/integration/spring6/pom.xml
index b472582..5b26bc5 100644
--- a/tests/integration/spring6/pom.xml
+++ b/tests/integration/spring6/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/thin-server/pom.xml b/tests/integration/thin-server/pom.xml
index aa82717..9b3604b 100644
--- a/tests/integration/thin-server/pom.xml
+++ b/tests/integration/thin-server/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 c519174..a11659b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 501669a..afaa01b 100644
--- a/tests/jmockit/pom.xml
+++ b/tests/jmockit/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2020, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 75823db..d0bafa5 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 35efd8b..d0cc7fb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6b1cc45..ba9e93f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f2de6c3..3c2a4e4 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 77f6831..1e103cb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e46342a..d578f03 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e5ebac5..d8fcc6c 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2add399..010d1e7 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 530b992..91d537b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 e48b626..76c2dbe 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f158135..9495248 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/functional/pom.xml b/tests/osgi/functional/pom.xml
index 77e9b1b..a497c35 100644
--- a/tests/osgi/functional/pom.xml
+++ b/tests/osgi/functional/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java
index 7aebd55..785e883 100644
--- a/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java
+++ b/tests/osgi/functional/src/test/java/org/glassfish/jersey/osgi/test/basic/JsonJacksonTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
*
* 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 @@
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-core").versionAsInProject(),
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-databind").versionAsInProject(),
mavenBundle().groupId("com.fasterxml.jackson.core").artifactId("jackson-annotations").versionAsInProject(),
+
mavenBundle().groupId("com.fasterxml.jackson.module").artifactId("jackson-module-jakarta-xmlbind-annotations")
.versionAsInProject()
));
diff --git a/tests/osgi/pom.xml b/tests/osgi/pom.xml
index d397626..7744326 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 2d92174..388b742 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 48af219..a311af9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/jersey-grizzly-runner/pom.xml b/tests/performance/runners/jersey-grizzly-runner/pom.xml
index 4942065..25c54e1 100644
--- a/tests/performance/runners/jersey-grizzly-runner/pom.xml
+++ b/tests/performance/runners/jersey-grizzly-runner/pom.xml
@@ -1,6 +1,6 @@
<!--
- Copyright (c) 2015, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 04cce19..56b1568 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 a3d0212..f4c7f2b 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 f60005d..563d7fc 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 5374209..31d816f 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 0c89bf9..560caea 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 694ddf7..7b1a3f2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 1180920..289be67 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 c558662..9f41ad2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 b8b5106..055d1a0 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 29200a0..d8b838a 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 165884a..5ee1a77 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 d2a9146..5e05ad9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7a21d4f..c83cd73 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 89936f7..128f398 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 255ebe6..d19a4d2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 ca6afbf..2eec4c2 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 5430a1c..cc32b89 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 6684683..d1032b9 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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/tools/pom.xml b/tests/performance/tools/pom.xml
index fe8ea97..6dc03a4 100644
--- a/tests/performance/tools/pom.xml
+++ b/tests/performance/tools/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 acb5d61..f38d9bd 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2011, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -47,7 +47,6 @@
<module>e2e-testng</module>
<module>e2e-tls</module>
<module>integration</module>
- <module>jmockit</module>
<module>mem-leaks</module>
<module>osgi</module>
<module>stress</module>
@@ -133,5 +132,14 @@
<module>version-agnostic</module>
</modules>
</profile>
+ <profile>
+ <id>JMOCKIT-MODULE-FOR-PRE-JDK24</id>
+ <activation>
+ <jdk>[11,24)</jdk>
+ </activation>
+ <modules>
+ <module>jmockit</module>
+ </modules>
+ </profile>
</profiles>
</project>
diff --git a/tests/release-test/pom.xml b/tests/release-test/pom.xml
index 35d5133..deb69f8 100644
--- a/tests/release-test/pom.xml
+++ b/tests/release-test/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2022, 2025 Oracle and/or its affiliates. All rights reserved.
This program and 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 7d12649..31b1ddb 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
diff --git a/tools/jersey-release-notes-maven-plugin/pom.xml b/tools/jersey-release-notes-maven-plugin/pom.xml
index fa51932..1522089 100644
--- a/tools/jersey-release-notes-maven-plugin/pom.xml
+++ b/tools/jersey-release-notes-maven-plugin/pom.xml
@@ -74,12 +74,12 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
- <version>2.11.0</version>
+ <version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
- <version>3.8.1</version>
+ <version>${maven.version}</version>
<scope>test</scope>
</dependency>
<dependency>