merge of the current 4.0 into the 4.0.JPMS
diff --git a/.gitignore b/.gitignore
index 9d011f0..5d549cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,4 @@
# Maven plugins noise
dependency-reduced-pom.xml
pom.xml.versionsBackup
+.flattened-pom.xml
diff --git a/NOTICE.md b/NOTICE.md
index d3487a1..471ce8d 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.18.0
+Jackson JAX-RS Providers Version 2.19.1
* 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.8
+org.objectweb.asm Version 9.9
* 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 74d26f2..2e78535 100644
--- a/archetypes/jersey-example-java8-webapp/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.archetypes</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-example-java8-webapp</artifactId>
diff --git a/archetypes/jersey-heroku-webapp/pom.xml b/archetypes/jersey-heroku-webapp/pom.xml
index 1308c2b..046f990 100644
--- a/archetypes/jersey-heroku-webapp/pom.xml
+++ b/archetypes/jersey-heroku-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.archetypes</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<packaging>maven-archetype</packaging>
diff --git a/archetypes/jersey-quickstart-grizzly2/pom.xml b/archetypes/jersey-quickstart-grizzly2/pom.xml
index f9a81f5..7ee16b7 100644
--- a/archetypes/jersey-quickstart-grizzly2/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.glassfish.jersey.archetypes</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-quickstart-grizzly2</artifactId>
<packaging>maven-archetype</packaging>
diff --git a/archetypes/jersey-quickstart-webapp/pom.xml b/archetypes/jersey-quickstart-webapp/pom.xml
index 95281c1..71279ab 100644
--- a/archetypes/jersey-quickstart-webapp/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.glassfish.jersey.archetypes</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>maven-archetype</packaging>
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index cdc570d..f83ec08 100644
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.archetypes</groupId>
diff --git a/bom/pom.xml b/bom/pom.xml
index e0b67d8..7cb7db3 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -30,9 +30,12 @@
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<packaging>pom</packaging>
<name>jersey-bom</name>
+ <properties>
+ <revision>4.0.99-SNAPSHOT</revision>
+ </properties>
<description>Jersey Bill of Materials (BOM)</description>
@@ -105,6 +108,11 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-helidon-http</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
<version>${project.version}</version>
</dependency>
@@ -145,6 +153,11 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-constants</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-entity-filtering</artifactId>
<version>${project.version}</version>
</dependency>
@@ -356,6 +369,11 @@
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-helidon</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${project.version}</version>
</dependency>
@@ -400,6 +418,31 @@
<version>2.4</version>
<inherited>true</inherited>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.7.2</version>
+ <configuration>
+ <updatePomFile>true</updatePomFile>
+ <flattenMode>resolveCiFriendliesOnly</flattenMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>flatten</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>flatten.clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/bundles/apidocs/pom.xml b/bundles/apidocs/pom.xml
index 83c4a3d..2b41cd8 100644
--- a/bundles/apidocs/pom.xml
+++ b/bundles/apidocs/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.bundles</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>apidocs</artifactId>
diff --git a/bundles/examples/pom.xml b/bundles/examples/pom.xml
index a676388..ee3869d 100644
--- a/bundles/examples/pom.xml
+++ b/bundles/examples/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.bundles</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-examples</artifactId>
diff --git a/bundles/jaxrs-ri/pom.xml b/bundles/jaxrs-ri/pom.xml
index b25c08d..15f8f39 100644
--- a/bundles/jaxrs-ri/pom.xml
+++ b/bundles/jaxrs-ri/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.bundles</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jaxrs-ri</artifactId>
diff --git a/bundles/pom.xml b/bundles/pom.xml
index 1073c5c..dc877f3 100644
--- a/bundles/pom.xml
+++ b/bundles/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.bundles</groupId>
diff --git a/connectors/apache5-connector/pom.xml b/connectors/apache5-connector/pom.xml
index b6431ee..d5fb0ed 100644
--- a/connectors/apache5-connector/pom.xml
+++ b/connectors/apache5-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-apache5-connector</artifactId>
diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml
index 66ccf73..6e739c0 100644
--- a/connectors/grizzly-connector/pom.xml
+++ b/connectors/grizzly-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-grizzly-connector</artifactId>
diff --git a/connectors/helidon-connector/pom.xml b/connectors/helidon-connector/pom.xml
index 23ee4da..8c3c71c 100644
--- a/connectors/helidon-connector/pom.xml
+++ b/connectors/helidon-connector/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.connectors</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/connectors/jdk-connector/pom.xml b/connectors/jdk-connector/pom.xml
index e700c90..c92967d 100644
--- a/connectors/jdk-connector/pom.xml
+++ b/connectors/jdk-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-jdk-connector</artifactId>
diff --git a/connectors/jetty-connector/pom.xml b/connectors/jetty-connector/pom.xml
index 5924fda..52cbddc 100644
--- a/connectors/jetty-connector/pom.xml
+++ b/connectors/jetty-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-jetty-connector</artifactId>
diff --git a/connectors/jetty-http2-connector/pom.xml b/connectors/jetty-http2-connector/pom.xml
index bcced89..5e6ec4c 100644
--- a/connectors/jetty-http2-connector/pom.xml
+++ b/connectors/jetty-http2-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-jetty-http2-connector</artifactId>
diff --git a/connectors/jnh-connector/pom.xml b/connectors/jnh-connector/pom.xml
index 717c741..9368936 100644
--- a/connectors/jnh-connector/pom.xml
+++ b/connectors/jnh-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.connectors</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/connectors/jnh-connector/src/main/java/org/glassfish/jersey/jnh/connector/JavaNetHttpConnector.java b/connectors/jnh-connector/src/main/java/org/glassfish/jersey/jnh/connector/JavaNetHttpConnector.java
index 1b19617..562dced 100644
--- a/connectors/jnh-connector/src/main/java/org/glassfish/jersey/jnh/connector/JavaNetHttpConnector.java
+++ b/connectors/jnh-connector/src/main/java/org/glassfish/jersey/jnh/connector/JavaNetHttpConnector.java
@@ -91,6 +91,11 @@
if (sslContext != null) {
httpClientBuilder.sslContext(sslContext);
}
+ final Integer connectTimeout =
+ getPropertyOrNull(configuration, ClientProperties.CONNECT_TIMEOUT, Integer.class);
+ if (connectTimeout != null) {
+ httpClientBuilder.connectTimeout(Duration.ofMillis(connectTimeout));
+ }
final CookieHandler cookieHandler =
getPropertyOrNull(configuration, JavaNetHttpClientProperties.COOKIE_HANDLER, CookieHandler.class);
if (cookieHandler != null) {
@@ -205,9 +210,9 @@
builder.header(headerName, headerValue);
}
}
- final Integer connectTimeout = request.resolveProperty(ClientProperties.READ_TIMEOUT, Integer.class);
- if (connectTimeout != null) {
- builder.timeout(Duration.ofMillis(connectTimeout));
+ final Integer readTimeout = request.resolveProperty(ClientProperties.READ_TIMEOUT, Integer.class);
+ if (readTimeout != null) {
+ builder.timeout(Duration.ofMillis(readTimeout));
}
processExtensions(builder, request);
return builder.build();
diff --git a/connectors/netty-connector/pom.xml b/connectors/netty-connector/pom.xml
index 3a3908b..28bb733 100644
--- a/connectors/netty-connector/pom.xml
+++ b/connectors/netty-connector/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-netty-connector</artifactId>
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java
index 471321f..6072a52 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/Expect100ContinueConnectorExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023 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
@@ -30,20 +30,21 @@
class Expect100ContinueConnectorExtension
implements ConnectorExtension<HttpRequest, IOException> {
+
+ private final NettyConnectorProvider.Config.RW requestConfiguration;
+
+ Expect100ContinueConnectorExtension(NettyConnectorProvider.Config.RW requestConfiguration) {
+ this.requestConfiguration = requestConfiguration;
+ }
+
private static final String EXCEPTION_MESSAGE = "Server rejected operation";
@Override
public void invoke(ClientRequest request, HttpRequest extensionParam) {
final long length = request.getLengthLong();
- final RequestEntityProcessing entityProcessing = request.resolveProperty(
- ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.class);
-
- final Boolean expectContinueActivated = request.resolveProperty(
- ClientProperties.EXPECT_100_CONTINUE, Boolean.class);
- final Long expectContinueSizeThreshold = request.resolveProperty(
- ClientProperties.EXPECT_100_CONTINUE_THRESHOLD_SIZE,
- ClientProperties.DEFAULT_EXPECT_100_CONTINUE_THRESHOLD_SIZE);
-
+ final RequestEntityProcessing entityProcessing = requestConfiguration.requestEntityProcessing(request);
+ final Boolean expectContinueActivated = requestConfiguration.expect100Continue(request);
+ final long expectContinueSizeThreshold = requestConfiguration.expect100ContinueThreshold(request);
final boolean allowStreaming = length > expectContinueSizeThreshold
|| entityProcessing == RequestEntityProcessing.CHUNKED;
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 58ed5b4..29e48b3 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
@@ -30,7 +30,6 @@
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
-import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.ClientResponse;
import org.glassfish.jersey.http.HttpHeaders;
@@ -55,17 +54,14 @@
*/
class JerseyClientHandler extends SimpleChannelInboundHandler<HttpObject> {
- private static final int DEFAULT_MAX_REDIRECTS = 5;
-
// Modified only by the same thread. No need to synchronize it.
private final Set<URI> redirectUriHistory;
private final ClientRequest jerseyRequest;
private final CompletableFuture<ClientResponse> responseAvailable;
private final CompletableFuture<?> responseDone;
- private final boolean followRedirects;
- private final int maxRedirects;
private final NettyConnector connector;
private final NettyHttpRedirectController redirectController;
+ private final NettyConnectorProvider.Config.RW requestConfiguration;
private NettyInputStream nis;
private ClientResponse jerseyResponse;
@@ -73,19 +69,20 @@
private boolean readTimedOut;
JerseyClientHandler(ClientRequest request, CompletableFuture<ClientResponse> responseAvailable,
- CompletableFuture<?> responseDone, Set<URI> redirectUriHistory, NettyConnector connector) {
+ CompletableFuture<?> responseDone, Set<URI> redirectUriHistory, NettyConnector connector,
+ NettyConnectorProvider.Config.RW requestConfiguration) {
this.redirectUriHistory = redirectUriHistory;
this.jerseyRequest = request;
this.responseAvailable = responseAvailable;
this.responseDone = responseDone;
- // Follow redirects by default
- this.followRedirects = jerseyRequest.resolveProperty(ClientProperties.FOLLOW_REDIRECTS, true);
- this.maxRedirects = jerseyRequest.resolveProperty(NettyClientProperties.MAX_REDIRECTS, DEFAULT_MAX_REDIRECTS);
+ this.requestConfiguration = requestConfiguration;
this.connector = connector;
+ // Follow redirects by default
+ requestConfiguration.followRedirects(jerseyRequest);
+ requestConfiguration.maxRedirects(jerseyRequest);
- final NettyHttpRedirectController customRedirectController = jerseyRequest
- .resolveProperty(NettyClientProperties.HTTP_REDIRECT_CONTROLLER, NettyHttpRedirectController.class);
- this.redirectController = customRedirectController == null ? new NettyHttpRedirectController() : customRedirectController;
+ this.redirectController = requestConfiguration.redirectController(jerseyRequest);
+ this.redirectController.init(requestConfiguration);
}
@Override
@@ -111,7 +108,7 @@
ClientResponse cr = jerseyResponse;
jerseyResponse = null;
int responseStatus = cr.getStatus();
- if (followRedirects
+ if (Boolean.TRUE.equals(requestConfiguration.followRedirects())
&& (responseStatus == ResponseStatus.Redirect3xx.MOVED_PERMANENTLY_301.getStatusCode()
|| responseStatus == ResponseStatus.Redirect3xx.FOUND_302.getStatusCode()
|| responseStatus == ResponseStatus.Redirect3xx.SEE_OTHER_303.getStatusCode()
@@ -138,16 +135,17 @@
// infinite loop detection
responseAvailable.completeExceptionally(
new RedirectException(LocalizationMessages.REDIRECT_INFINITE_LOOP()));
- } else if (redirectUriHistory.size() > maxRedirects) {
+ } else if (redirectUriHistory.size() > requestConfiguration.maxRedirects.get()) {
// maximal number of redirection
- responseAvailable.completeExceptionally(
- new RedirectException(LocalizationMessages.REDIRECT_LIMIT_REACHED(maxRedirects)));
+ responseAvailable.completeExceptionally(new RedirectException(
+ LocalizationMessages.REDIRECT_LIMIT_REACHED(requestConfiguration.maxRedirects.get())));
} else {
ClientRequest newReq = new ClientRequest(jerseyRequest);
newReq.setUri(newUri);
ctx.close();
if (redirectController.prepareRedirect(newReq, cr)) {
- final NettyConnector newConnector = new NettyConnector(newReq.getClient());
+ final NettyConnector newConnector =
+ new NettyConnector(newReq.getClient(), connector.clientConfiguration);
newConnector.execute(newReq, redirectUriHistory, new CompletableFuture<ClientResponse>() {
@Override
public boolean complete(ClientResponse value) {
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyClientProperties.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyClientProperties.java
index 4b2e4c9..7dc3495 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyClientProperties.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyClientProperties.java
@@ -73,6 +73,11 @@
public static final String IDLE_CONNECTION_PRUNE_TIMEOUT = "jersey.config.client.idleConnectionPruneTimeout";
/**
+ * Enable or disable the Netty logging by {@code LoggingHandler(Level.DEBUG)}. Disabled by default.
+ */
+ public static final String LOGGING_ENABLED = "jersey.config.client.netty.loggingEnabled";
+
+ /**
* <p>
* This property determines the maximum number of idle connections that will be simultaneously kept alive, per destination.
* The default is 5.
@@ -157,7 +162,8 @@
DEFAULT_HEADER_SIZE = 8192;
/**
- * Parameter which allows extending of the initial line length for the Netty connector
+ * Parameter which allows extending of the first line length of the HTTP header for the Netty connector.
+ * Taken from {@link io.netty.handler.codec.http.HttpClientCodec#HttpClientCodec(int, int, int)}.
*
* @since 2.44
*/
@@ -166,12 +172,12 @@
/**
* Default initial line length for Netty Connector.
- * Taken from {@link io.netty.handler.codec.http.HttpClientCodec#HttpClientCodec(int, int, int)}
+ * Typically, set this to the same value as {@link #MAX_HEADER_SIZE}.
*
* @since 2.44
*/
public static final Integer
- DEFAULT_INITIAL_LINE_LENGTH = 4096;
+ DEFAULT_INITIAL_LINE_LENGTH = 8192;
/**
* Parameter which allows extending of the chunk size for the Netty connector
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectionController.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectionController.java
new file mode 100644
index 0000000..5d8725c
--- /dev/null
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectionController.java
@@ -0,0 +1,39 @@
+/*
+ * 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.netty.connector;
+
+import org.glassfish.jersey.client.ClientRequest;
+
+import java.net.URI;
+
+/**
+ * Adjustable connection pooling controller.
+ */
+public class NettyConnectionController {
+ /**
+ * Get the group of connections to be pooled, purged idle, and reused together.
+ *
+ * @param clientRequest the HTTP client request.
+ * @param uri the uri for the HTTP client request.
+ * @param hostName the hostname for the request. Can differ from the hostname in the uri based on other request attributes.
+ * @param port the real port for the request. Can differ from the port in the uri based on other request attributes.
+ * @return the group of connections identifier.
+ */
+ public String getConnectionGroup(ClientRequest clientRequest, URI uri, String hostName, int port) {
+ return uri.getScheme() + "://" + hostName + ":" + port;
+ }
+}
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 a65560c..ba80967 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
@@ -18,8 +18,6 @@
import java.io.IOException;
import java.io.OutputStream;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
@@ -36,7 +34,6 @@
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import java.util.function.Supplier;
import javax.net.ssl.SSLContext;
@@ -56,10 +53,8 @@
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.DefaultFullHttpRequest;
-import io.netty.handler.codec.http.DefaultHttpHeaders;
import io.netty.handler.codec.http.DefaultHttpRequest;
import io.netty.handler.codec.http.HttpChunkedInput;
-import io.netty.handler.codec.http.HttpClientCodec;
import io.netty.handler.codec.http.HttpContentDecompressor;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaders;
@@ -68,8 +63,8 @@
import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.codec.http.LastHttpContent;
-import io.netty.handler.proxy.HttpProxyHandler;
-import io.netty.handler.proxy.ProxyHandler;
+import io.netty.handler.logging.LogLevel;
+import io.netty.handler.logging.LoggingHandler;
import io.netty.handler.ssl.ApplicationProtocolConfig;
import io.netty.handler.ssl.ClientAuth;
import io.netty.handler.ssl.IdentityCipherSuiteFilter;
@@ -81,7 +76,6 @@
import io.netty.handler.timeout.IdleStateHandler;
import io.netty.resolver.NoopAddressResolverGroup;
import io.netty.util.concurrent.GenericFutureListener;
-import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.ClientResponse;
import org.glassfish.jersey.client.innate.ClientProxy;
@@ -106,6 +100,7 @@
final EventLoopGroup group;
final Client client;
final HashMap<String, ArrayList<Channel>> connections = new HashMap<>();
+ final NettyConnectorProvider.Config.RW clientConfiguration;
private static final LazyValue<String> NETTY_VERSION = Values.lazy(
(Value<String>) () -> {
@@ -118,63 +113,29 @@
return "Netty " + nettyVersion;
});
- // If HTTP keepalive is enabled the value of "http.maxConnections" determines the maximum number
- // of idle connections that will be simultaneously kept alive, per destination.
- private static final String HTTP_KEEPALIVE_STRING = System.getProperty("http.keepAlive");
- // http.keepalive (default: true)
- private static final Boolean HTTP_KEEPALIVE =
- HTTP_KEEPALIVE_STRING == null ? Boolean.TRUE : Boolean.parseBoolean(HTTP_KEEPALIVE_STRING);
-
- // http.maxConnections (default: 5)
- private static final int DEFAULT_MAX_POOL_SIZE = 5;
- private static final int MAX_POOL_SIZE = Integer.getInteger("http.maxConnections", DEFAULT_MAX_POOL_SIZE);
- private static final int DEFAULT_MAX_POOL_IDLE = 60; // seconds
- private static final int DEFAULT_MAX_POOL_SIZE_TOTAL = 60; // connections
-
-
- private final Integer maxPoolSize; // either from system property, or from Jersey config, or default
- private final Integer maxPoolSizeTotal; //either from Jersey config, or default
- private final Integer maxPoolIdle; // either from Jersey config, or default
-
static final String INACTIVE_POOLED_CONNECTION_HANDLER = "inactive_pooled_connection_handler";
private static final String PRUNE_INACTIVE_POOL = "prune_inactive_pool";
private static final String READ_TIMEOUT_HANDLER = "read_timeout_handler";
private static final String REQUEST_HANDLER = "request_handler";
private static final String EXPECT_100_CONTINUE_HANDLER = "expect_100_continue_handler";
- NettyConnector(Client client) {
+ NettyConnector(Client client, NettyConnectorProvider.Config.RW connectorConfiguration) {
+ this.client = client;
+ this.clientConfiguration = connectorConfiguration.fromClient(client);
final Configuration configuration = client.getConfiguration();
- final Map<String, Object> properties = configuration.getProperties();
- final Object threadPoolSize = properties.get(ClientProperties.ASYNC_THREADPOOL_SIZE);
-
- if (threadPoolSize != null && threadPoolSize instanceof Integer && (Integer) threadPoolSize > 0) {
- executorService = VirtualThreadUtil.withConfig(configuration).newFixedThreadPool((Integer) threadPoolSize);
- this.group = new NioEventLoopGroup((Integer) threadPoolSize);
+ final Integer threadPoolSize = this.clientConfiguration.asyncThreadPoolSize();
+ if (threadPoolSize != null && threadPoolSize > 0) {
+ executorService = VirtualThreadUtil
+ .withConfig(clientConfiguration.prefixedConfiguration(configuration))
+ .newFixedThreadPool(threadPoolSize);
+ this.group = new NioEventLoopGroup(threadPoolSize);
} else {
- executorService = VirtualThreadUtil.withConfig(configuration).newCachedThreadPool();
+ executorService = VirtualThreadUtil
+ .withConfig(clientConfiguration.prefixedConfiguration(configuration))
+ .newCachedThreadPool();
this.group = new NioEventLoopGroup();
}
-
- this.client = client;
-
- final Object maxPoolSizeTotalProperty = properties.get(NettyClientProperties.MAX_CONNECTIONS_TOTAL);
- final Object maxPoolIdleProperty = properties.get(NettyClientProperties.IDLE_CONNECTION_PRUNE_TIMEOUT);
- final Object maxPoolSizeProperty = properties.get(NettyClientProperties.MAX_CONNECTIONS);
-
- maxPoolSizeTotal = maxPoolSizeTotalProperty != null ? (Integer) maxPoolSizeTotalProperty : DEFAULT_MAX_POOL_SIZE_TOTAL;
- maxPoolIdle = maxPoolIdleProperty != null ? (Integer) maxPoolIdleProperty : DEFAULT_MAX_POOL_IDLE;
- maxPoolSize = maxPoolSizeProperty != null
- ? (Integer) maxPoolSizeProperty
- : (HTTP_KEEPALIVE ? MAX_POOL_SIZE : DEFAULT_MAX_POOL_SIZE);
-
- if (maxPoolSizeTotal < 0) {
- throw new ProcessingException(LocalizationMessages.WRONG_MAX_POOL_TOTAL(maxPoolSizeTotal));
- }
-
- if (maxPoolSize < 0) {
- throw new ProcessingException(LocalizationMessages.WRONG_MAX_POOL_SIZE(maxPoolSize));
- }
}
@Override
@@ -207,25 +168,31 @@
protected void execute(final ClientRequest jerseyRequest, final Set<URI> redirectUriHistory,
final CompletableFuture<ClientResponse> responseAvailable) {
- Integer timeout = jerseyRequest.resolveProperty(ClientProperties.READ_TIMEOUT, 0);
- final Integer expect100ContinueTimeout = jerseyRequest.resolveProperty(
- NettyClientProperties.EXPECT_100_CONTINUE_TIMEOUT,
- NettyClientProperties.DEFAULT_EXPECT_100_CONTINUE_TIMEOUT_VALUE);
- if (timeout == null || timeout < 0) {
- throw new ProcessingException(LocalizationMessages.WRONG_READ_TIMEOUT(timeout));
+ final NettyConnectorProvider.Config.RW requestConfiguration =
+ clientConfiguration
+ .fromRequest(jerseyRequest)
+ .readTimeout(jerseyRequest)
+ .expect100ContinueTimeout(jerseyRequest);
+ final int readTimeout = requestConfiguration.readTimeout();
+ if (readTimeout < 0) {
+ throw new ProcessingException(LocalizationMessages.WRONG_READ_TIMEOUT(readTimeout));
}
final CompletableFuture<?> responseDone = new CompletableFuture<>();
final URI requestUri = jerseyRequest.getUri();
- String host = requestUri.getHost();
- int port = requestUri.getPort() != -1 ? requestUri.getPort() : "https".equals(requestUri.getScheme()) ? 443 : 80;
+ final String host = requestUri.getHost();
+ final int port = requestUri.getPort() != -1
+ ? requestUri.getPort()
+ : "https".equalsIgnoreCase(requestUri.getScheme()) ? 443 : 80;
try {
- final SSLParamConfigurator sslConfig = SSLParamConfigurator.builder()
+ final SSLParamConfigurator sslConfig = SSLParamConfigurator.builder(requestConfiguration)
.request(jerseyRequest).setSNIAlways(true).setSNIHostName(jerseyRequest).build();
- String key = requestUri.getScheme() + "://" + sslConfig.getSNIHostName() + ":" + port;
+ final String key = requestConfiguration
+ .connectionController()
+ .getConnectionGroup(jerseyRequest, requestUri, sslConfig.getSNIHostName(), port);
ArrayList<Channel> conns;
synchronized (connections) {
conns = connections.get(key);
@@ -245,8 +212,8 @@
} catch (NoSuchElementException e) {
/*
* Eat it.
- * It could happen that the channel was closed, pipeline cleared and
- * then it will fail to remove the names with this exception.
+ * It could happen that the channel was closed, pipeline cleared,
+ * and then it will fail to remove the names with this exception.
*/
}
if (!chan.isOpen()) {
@@ -258,20 +225,15 @@
final JerseyExpectContinueHandler expect100ContinueHandler = new JerseyExpectContinueHandler();
if (chan == null) {
- Integer connectTimeout = jerseyRequest.resolveProperty(ClientProperties.CONNECT_TIMEOUT, 0);
+ requestConfiguration.connectTimeout(jerseyRequest);
Bootstrap b = new Bootstrap();
// http proxy
- Optional<ClientProxy> proxy = ClientProxy.proxyFromRequest(jerseyRequest);
- if (!proxy.isPresent()) {
- proxy = ClientProxy.proxyFromProperties(requestUri);
- }
- proxy.ifPresent(clientProxy -> {
+ final Optional<ClientProxy> handlerProxy = requestConfiguration.proxy(jerseyRequest, requestUri);
+ handlerProxy.ifPresent(clientProxy -> {
b.resolver(NoopAddressResolverGroup.INSTANCE); // request hostname resolved by the HTTP proxy
});
- final Optional<ClientProxy> handlerProxy = proxy;
-
b.group(group)
.channel(NioSocketChannel.class)
.handler(new ChannelInitializer<SocketChannel>() {
@@ -283,19 +245,14 @@
// http proxy
handlerProxy.ifPresent(clientProxy -> {
- final URI u = clientProxy.uri();
- InetSocketAddress proxyAddr = new InetSocketAddress(u.getHost(),
- u.getPort() == -1 ? 8080 : u.getPort());
- ProxyHandler proxy1 = createProxyHandler(jerseyRequest, proxyAddr,
- clientProxy.userName(), clientProxy.password(), connectTimeout);
- p.addLast(proxy1);
+ p.addLast(requestConfiguration.createProxyHandler(clientProxy, jerseyRequest));
});
// Enable HTTPS if necessary.
if ("https".equals(requestUri.getScheme())) {
// making client authentication optional for now; it could be extracted to configurable property
JdkSslContext jdkSslContext = new JdkSslContext(
- getSslContext(client, jerseyRequest),
+ requestConfiguration.sslContext(client, jerseyRequest),
true,
(Iterable) null,
IdentityCipherSuiteFilter.INSTANCE,
@@ -310,8 +267,7 @@
final SslHandler sslHandler = jdkSslContext.newHandler(
ch.alloc(), sslConfig.getSNIHostName(), port <= 0 ? 443 : port, executorService
);
- if (ClientProperties.getValue(config.getProperties(),
- NettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION, true)) {
+ if (requestConfiguration.isSslHostnameVerificationEnabled(config.getProperties())) {
sslConfig.setEndpointIdentificationAlgorithm(sslHandler.engine());
}
@@ -320,16 +276,10 @@
p.addLast(sslHandler);
}
- final Integer maxHeaderSize = ClientProperties.getValue(config.getProperties(),
- NettyClientProperties.MAX_HEADER_SIZE,
- NettyClientProperties.DEFAULT_HEADER_SIZE);
- final Integer maxChunkSize = ClientProperties.getValue(config.getProperties(),
- NettyClientProperties.MAX_CHUNK_SIZE,
- NettyClientProperties.DEFAULT_CHUNK_SIZE);
- final Integer maxInitialLineLength = ClientProperties.getValue(config.getProperties(),
- NettyClientProperties.MAX_INITIAL_LINE_LENGTH,
- NettyClientProperties.DEFAULT_INITIAL_LINE_LENGTH);
- p.addLast(new HttpClientCodec(maxInitialLineLength, maxHeaderSize, maxChunkSize));
+ if (requestConfiguration.loggingEnabled.get()) {
+ p.addLast(new LoggingHandler(LogLevel.INFO));
+ }
+ p.addLast(requestConfiguration.createHttpClientCodec(config.getProperties()));
p.addLast(EXPECT_100_CONTINUE_HANDLER, expect100ContinueHandler);
p.addLast(new ChunkedWriteHandler());
p.addLast(new HttpContentDecompressor());
@@ -337,8 +287,8 @@
});
// connect timeout
- if (connectTimeout > 0) {
- b.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeout);
+ if (requestConfiguration.connectTimeout() > 0) {
+ b.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, requestConfiguration.connectTimeout());
}
// Make the connection attempt.
@@ -357,12 +307,12 @@
// assert: it is ok to abort the entire response, if responseDone is completed exceptionally - in particular, nothing
// will leak
final Channel ch = chan;
- JerseyClientHandler clientHandler =
- new JerseyClientHandler(jerseyRequest, responseAvailable, responseDone, redirectUriHistory, this);
+ JerseyClientHandler clientHandler = new JerseyClientHandler(
+ jerseyRequest, responseAvailable, responseDone, redirectUriHistory, this, requestConfiguration);
// read timeout makes sense really as an inactivity timeout
ch.pipeline().addLast(READ_TIMEOUT_HANDLER,
- new IdleStateHandler(0, 0, timeout, TimeUnit.MILLISECONDS));
+ new IdleStateHandler(0, 0, requestConfiguration.readTimeout(), TimeUnit.MILLISECONDS));
ch.pipeline().addLast(REQUEST_HANDLER, clientHandler);
responseDone.whenComplete((_r, th) -> {
@@ -370,7 +320,8 @@
ch.pipeline().remove(clientHandler);
if (th == null) {
- ch.pipeline().addLast(INACTIVE_POOLED_CONNECTION_HANDLER, new IdleStateHandler(0, 0, maxPoolIdle));
+ ch.pipeline().addLast(INACTIVE_POOLED_CONNECTION_HANDLER,
+ new IdleStateHandler(0, 0, requestConfiguration.maxPoolIdle.get()));
ch.pipeline().addLast(PRUNE_INACTIVE_POOL, new PruneIdlePool(connections, key));
boolean added = true;
synchronized (connections) {
@@ -381,7 +332,9 @@
connections.put(key, conns1);
} else {
synchronized (conns1) {
- if ((maxPoolSizeTotal == 0 || connections.size() < maxPoolSizeTotal) && conns1.size() < maxPoolSize) {
+ if ((requestConfiguration.maxPoolSizeTotal.get() == 0
+ || connections.size() < requestConfiguration.maxPoolSizeTotal.get())
+ && conns1.size() < requestConfiguration.maxPoolSize.get()) {
conns1.add(ch);
} else { // else do not add the Channel to the idle pool
added = false;
@@ -433,7 +386,7 @@
};
ch.closeFuture().addListener(closeListener);
- final NettyEntityWriter entityWriter = nettyEntityWriter(jerseyRequest, ch);
+ final NettyEntityWriter entityWriter = nettyEntityWriter(jerseyRequest, ch, requestConfiguration);
switch (entityWriter.getType()) {
case CHUNKED:
HttpUtil.setTransferEncodingChunked(nettyRequest, true);
@@ -493,7 +446,7 @@
});
headersSet.await();
- new Expect100ContinueConnectorExtension().invoke(jerseyRequest, nettyRequest);
+ new Expect100ContinueConnectorExtension(requestConfiguration).invoke(jerseyRequest, nettyRequest);
boolean continueExpected = HttpUtil.is100ContinueExpected(nettyRequest);
boolean expectationsFailed = false;
@@ -503,7 +456,7 @@
expect100ContinueHandler.attachCountDownLatch(expect100ContinueLatch);
//send expect request, sync and wait till either response or timeout received
entityWriter.writeAndFlush(nettyRequest);
- expect100ContinueLatch.await(expect100ContinueTimeout, TimeUnit.MILLISECONDS);
+ expect100ContinueLatch.await(requestConfiguration.expect100ContTimeout.get(), TimeUnit.MILLISECONDS);
try {
expect100ContinueHandler.processExpectationStatus();
} catch (TimeoutException e) {
@@ -543,13 +496,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();
+ /* package */ NettyEntityWriter nettyEntityWriter(
+ ClientRequest clientRequest, Channel channel, NettyConnectorProvider.Config.RW requestConfiguration) {
+ return NettyEntityWriter
+ .getInstance(clientRequest, channel, () -> requestConfiguration.requestEntityProcessing(clientRequest));
}
private String buildPathWithQueryParameters(URI requestUri) {
@@ -602,21 +552,7 @@
}
}
- private static ProxyHandler createProxyHandler(ClientRequest jerseyRequest, SocketAddress proxyAddr,
- String userName, String password, long connectTimeout) {
- final Boolean filter = jerseyRequest.resolveProperty(NettyClientProperties.FILTER_HEADERS_FOR_PROXY, Boolean.TRUE);
- HttpHeaders httpHeaders = setHeaders(jerseyRequest, new DefaultHttpHeaders(), Boolean.TRUE.equals(filter));
-
- ProxyHandler proxy = userName == null ? new HttpProxyHandler(proxyAddr, httpHeaders)
- : new HttpProxyHandler(proxyAddr, userName, password, httpHeaders);
- if (connectTimeout > 0) {
- proxy.setConnectTimeoutMillis(connectTimeout);
- }
-
- return proxy;
- }
-
- private static HttpHeaders setHeaders(ClientRequest jerseyRequest, HttpHeaders headers, boolean proxyOnly) {
+ /* package */ static HttpHeaders setHeaders(ClientRequest jerseyRequest, HttpHeaders headers, boolean proxyOnly) {
for (final Map.Entry<String, List<String>> e : jerseyRequest.getStringHeaders().entrySet()) {
final String key = e.getKey();
if (!proxyOnly || JerseyClientHandler.ProxyHeaders.INSTANCE.test(key) || additionalProxyHeadersToKeep(key)) {
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorConfiguration.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorConfiguration.java
new file mode 100644
index 0000000..99f763c
--- /dev/null
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorConfiguration.java
@@ -0,0 +1,503 @@
+/*
+ * 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.netty.connector;
+
+import io.netty.handler.codec.http.DefaultHttpHeaders;
+import io.netty.handler.codec.http.HttpClientCodec;
+import io.netty.handler.codec.http.HttpHeaders;
+import io.netty.handler.proxy.HttpProxyHandler;
+import io.netty.handler.proxy.ProxyHandler;
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.innate.ClientProxy;
+import org.glassfish.jersey.internal.util.collection.Ref;
+import org.glassfish.jersey.client.innate.ConnectorConfiguration;
+
+import jakarta.ws.rs.ProcessingException;
+import jakarta.ws.rs.client.Client;
+import java.net.InetSocketAddress;
+import java.net.URI;
+import java.util.Map;
+
+class NettyConnectorConfiguration<N extends NettyConnectorConfiguration<N>> extends ConnectorConfiguration<N> {
+
+ /* package */ final NullableRef<NettyConnectionController> connectionController = NullableRef.empty();
+ /* package */ final NullableRef<Boolean> enableHostnameVerification = NullableRef.empty();
+ /* package */ final Ref<Integer> expect100ContTimeout = NullableRef.empty();
+ /* package */ final NullableRef<Boolean> filterHeadersForProxy = NullableRef.empty();
+ /* package */ final NullableRef<Integer> firstHttpHeaderLineLength = NullableRef.empty();
+ /* package */ final Ref<Boolean> loggingEnabled = NullableRef.empty();
+ /* package */ final NullableRef<Integer> maxChunkSize = NullableRef.empty();
+ /* package */ final NullableRef<Integer> maxHeaderSize = NullableRef.empty();
+ // either from Jersey config, or default
+ /* package */ final Ref<Integer> maxPoolSizeTotal = NullableRef.empty();
+ // either from Jersey config, or default
+ /* package */ final Ref<Integer> maxPoolIdle = NullableRef.empty();
+ // either from system property, or from Jersey config, or default
+ /* package */ final Ref<Integer> maxPoolSize = NullableRef.empty();
+ /* package */ final Ref<Integer> maxRedirects = NullableRef.empty();
+ /* package */ final NullableRef<Boolean> preserveMethodOnRedirect = NullableRef.empty();
+ /* package */ final NullableRef<NettyHttpRedirectController> redirectController = NullableRef.empty();
+
+ // If HTTP keepalive is enabled the value of "http.maxConnections" determines the maximum number
+ // of idle connections that will be simultaneously kept alive, per destination.
+ private static final String HTTP_KEEPALIVE_STRING = System.getProperty("http.keepAlive");
+ // http.keepalive (default: true)
+ private static final Boolean HTTP_KEEPALIVE =
+ HTTP_KEEPALIVE_STRING == null ? Boolean.TRUE : Boolean.parseBoolean(HTTP_KEEPALIVE_STRING);
+
+ // http.maxConnections (default: 5)
+ private static final int DEFAULT_MAX_POOL_SIZE = 5;
+ private static final int MAX_POOL_SIZE = Integer.getInteger("http.maxConnections", DEFAULT_MAX_POOL_SIZE);
+ private static final int DEFAULT_MAX_POOL_IDLE = 60; // seconds
+ private static final int DEFAULT_MAX_POOL_SIZE_TOTAL = 60; // connections
+
+ private static final int DEFAULT_MAX_REDIRECTS = 5;
+
+ /**
+ * Set the connection pooling controller for the Netty Connector.
+ *
+ * @param controller the connection pooling controller.
+ * @return updated configuration.
+ */
+ public N connectionController(NettyConnectionController controller) {
+ connectionController.set(controller);
+ return self();
+ }
+
+ /**
+ * This setting determines waiting time in milliseconds for 100-Continue response when 100-Continue is sent by the client.
+ * The property {@link NettyClientProperties#EXPECT_100_CONTINUE_TIMEOUT} has precedence over this setting.
+ *
+ * @param millis the timeout for 100-Continue response.
+ * @return updated configuration.
+ */
+ public N expect100ContinueTimeout(int millis) {
+ expect100ContTimeout.set(millis);
+ return self();
+ }
+
+ /**
+ * Enable or disable the endpoint identification algorithm to HTTPS. The property
+ * {@link NettyClientProperties#ENABLE_SSL_HOSTNAME_VERIFICATION} takes precedence over this setting.
+ *
+ * @param enable enable or disable the hostname verification.
+ * @return updated configuration.
+ */
+ public N enableSslHostnameVerification(boolean enable) {
+ enableHostnameVerification.set(enable);
+ return self();
+ }
+
+ /**
+ * Enable or disable the Netty logging by {@code LoggingHandler(Level.DEBUG)}. Disabled by default.
+ * The property {@link NettyClientProperties#LOGGING_ENABLED} takes precedence over this setting.
+ *
+ * @param enable to enable or disable.
+ * @return updated configuration.
+ */
+ public N enableLoggingHandler(boolean enable) {
+ loggingEnabled.set(enable);
+ return self();
+ }
+
+ /**
+ * Filter the HTTP headers for requests (CONNECT) towards the proxy except for PROXY-prefixed
+ * and HOST headers when {@code true}.
+ * The property {@link NettyClientProperties#FILTER_HEADERS_FOR_PROXY} has precedence over this setting.
+ *
+ * @param filter to filter or not. The default is {@code true}.
+ * @return updated configuration.
+ */
+ public N filterHeadersForProxy(boolean filter) {
+ filterHeadersForProxy.set(filter);
+ return self();
+ }
+
+ /**
+ * This property determines the number of seconds the idle connections are kept in the pool before pruned.
+ * The default is 60. Specify 0 to disable. The property {@link NettyClientProperties#IDLE_CONNECTION_PRUNE_TIMEOUT}
+ * has precedence over this setting.
+ *
+ * @param seconds the timeout in seconds.
+ * @return updated configuration.
+ */
+ public N idleConnectionPruneTimeout(int seconds) {
+ maxPoolIdle.set(seconds);
+ return self();
+ }
+
+ /**
+ * Set the maximum length of the first line of the HTTP header.
+ * The property {@link NettyClientProperties#MAX_INITIAL_LINE_LENGTH} has precedence over this setting.
+ *
+ * @param length the length of the first line of the HTTP header.
+ * @return updated configuration.
+ */
+ public N initialHttpHeaderLineLength(int length) {
+ firstHttpHeaderLineLength.set(length);
+ return self();
+ }
+
+ /**
+ * Set the maximum chunk size for the Netty connector. The property {@link NettyClientProperties#MAX_CHUNK_SIZE}
+ * has precedence over this setting.
+ *
+ * @param size the new size of chunks.
+ * @return updated configuration.
+ */
+ public N maxChunkSize(int size) {
+ maxChunkSize.set(size);
+ return self();
+ }
+
+ /**
+ * This setting determines the maximum number of idle connections that will be simultaneously kept alive, per destination.
+ * The default is 5. The property {@link NettyClientProperties#MAX_CONNECTIONS} takes precedence over this setting.
+ *
+ * @param maxCount maximum number of idle connections per destination.
+ * @return updated configuration.
+ */
+ public N maxConnectionsPerDestination(int maxCount) {
+ maxPoolSize.set(maxCount);
+ return self();
+ }
+
+ /**
+ * Set the maximum header size in bytes for the HTTP headers processed by Netty.
+ * The property {@link NettyClientProperties#MAX_HEADER_SIZE} has precedence over this setting.
+ *
+ * @param size the new maximum header size.
+ * @return updated configuration.
+ */
+ public N maxHeaderSize(int size) {
+ maxHeaderSize.set(size);
+ return self();
+ }
+
+ /**
+ * Set the maximum number of redirects to prevent infinite redirect loop. The default is 5.
+ * The property {@link NettyClientProperties#MAX_REDIRECTS} has precedence over this setting.
+ *
+ * @param max the maximum number of redirects.
+ * @return updated configuration.
+ */
+ public N maxRedirects(int max) {
+ maxRedirects.set(max);
+ return self();
+ }
+
+ /**
+ * Set the maximum number of idle connections that will be simultaneously kept alive. The property
+ * {@link NettyClientProperties#MAX_CONNECTIONS_TOTAL} has precedence over this setting.
+ *
+ * @param max the maximum number of idle connections.
+ * @return updated configuration.
+ */
+ public N maxTotalConnections(int max) {
+ maxPoolSizeTotal.set(max);
+ return self();
+ }
+
+ /**
+ * Set the preservation of methods during HTTP redirect.
+ * By default, the HTTP POST request are not transformed into HTTP GET for status 301 & 302.
+ * The property {@link NettyClientProperties#PRESERVE_METHOD_ON_REDIRECT} has precedence over this setting.
+ *
+ * @param preserve to preserve or not to preserve.
+ * @return updated configuration.
+ */
+ public N preserveMethodOnRedirect(boolean preserve) {
+ preserveMethodOnRedirect.set(preserve);
+ return self();
+ }
+
+ /**
+ * Set the Netty Connector HTTP redirect controller.
+ * The property {@link NettyClientProperties#HTTP_REDIRECT_CONTROLLER} has precedence over this setting.
+ *
+ * @param controller the HTTP redirect controller.
+ * @return updated configuration.
+ */
+ public N redirectController(NettyHttpRedirectController controller) {
+ redirectController.set(controller);
+ return self();
+ }
+
+ @SuppressWarnings("unchecked")
+ protected N self() {
+ return (N) this;
+ }
+
+ abstract static class ReadWrite<N extends ReadWrite<N>>
+ extends NettyConnectorConfiguration<N>
+ implements ConnectorConfiguration.Read<N> {
+
+ @Override
+ public <X extends ConnectorConfiguration<?>> void setNonEmpty(X otherCC) {
+ NettyConnectorConfiguration<?> other = (NettyConnectorConfiguration<?>) otherCC;
+ ConnectorConfiguration.Read.super.setNonEmpty(other);
+ this.connectionController.setNonEmpty(other.connectionController);
+ this.redirectController.setNonEmpty(other.redirectController);
+ this.connectionController.setNonEmpty(other.connectionController);
+ this.enableHostnameVerification.setNonEmpty(other.enableHostnameVerification);
+ ((NullableRef<Integer>) this.expect100ContTimeout).setNonEmpty((NullableRef<Integer>) other.expect100ContTimeout);
+ this.filterHeadersForProxy.setNonEmpty(other.filterHeadersForProxy);
+ this.firstHttpHeaderLineLength.setNonEmpty(other.firstHttpHeaderLineLength);
+ ((NullableRef<Boolean>) this.loggingEnabled).setNonEmpty((NullableRef<Boolean>) other.loggingEnabled);
+ this.maxChunkSize.setNonEmpty(other.maxChunkSize);
+ this.maxHeaderSize.setNonEmpty(other.maxHeaderSize);
+ ((NullableRef<Integer>) this.maxPoolIdle).setNonEmpty((NullableRef<Integer>) other.maxPoolIdle);
+ ((NullableRef<Integer>) this.maxPoolSize).setNonEmpty((NullableRef<Integer>) other.maxPoolSize);
+ ((NullableRef<Integer>) this.maxPoolSizeTotal).setNonEmpty((NullableRef<Integer>) other.maxPoolSizeTotal);
+ ((NullableRef<Integer>) this.maxRedirects).setNonEmpty((NullableRef<Integer>) other.maxRedirects);
+ this.preserveMethodOnRedirect.setNonEmpty(other.preserveMethodOnRedirect);
+ this.redirectController.setNonEmpty(other.redirectController);
+ }
+
+ @Override
+ public N init() {
+ Read.super.init();
+ enableSslHostnameVerification(Boolean.TRUE);
+ expect100ContinueTimeout(NettyClientProperties.DEFAULT_EXPECT_100_CONTINUE_TIMEOUT_VALUE);
+ filterHeadersForProxy(Boolean.TRUE);
+ initialHttpHeaderLineLength(NettyClientProperties.DEFAULT_INITIAL_LINE_LENGTH);
+ enableLoggingHandler(Boolean.FALSE);
+ maxChunkSize(NettyClientProperties.DEFAULT_CHUNK_SIZE);
+ maxHeaderSize(NettyClientProperties.DEFAULT_HEADER_SIZE);
+ // either from Jersey config, or default
+ maxTotalConnections(DEFAULT_MAX_POOL_SIZE_TOTAL);
+ // either from Jersey config, or default
+ maxPoolIdle.set(DEFAULT_MAX_POOL_IDLE);
+ // either from system property, or from Jersey config, or default
+ maxPoolSize.set(HTTP_KEEPALIVE ? MAX_POOL_SIZE : DEFAULT_MAX_POOL_SIZE);
+ maxRedirects(DEFAULT_MAX_REDIRECTS);
+ preserveMethodOnRedirect(Boolean.TRUE);
+ return self();
+ }
+
+ /**
+ * Get the preset {@link NettyConnectionController} or create an instance of the default one, if not preset.
+ * @return the {@link NettyConnectionController} instance.
+ */
+ /* package */ NettyConnectionController connectionController() {
+ return connectionController.isPresent() ? connectionController.get() : new NettyConnectionController();
+ }
+
+ /**
+ * Update {@link #expect100ContinueTimeout(int) expect 100-Continue timeout} based on current http request properties.
+ *
+ * @param clientRequest the current http client request.
+ * @return updated configuration.
+ */
+ /* package */ N expect100ContinueTimeout(ClientRequest clientRequest) {
+ expect100ContTimeout.set(
+ clientRequest.resolveProperty(
+ prefixed(NettyClientProperties.EXPECT_100_CONTINUE_TIMEOUT), expect100ContTimeout.get()));
+ return this.self();
+ }
+
+ /**
+ * Return value of {@link #enableSslHostnameVerification(boolean)} setting either from the configuration of from the
+ * HTTP client request properties. The default is {@code true}.
+ *
+ * @param properties the HTTP client request properties.
+ * @return the value of SSL hostname verification setting.
+ */
+ /* package */ boolean isSslHostnameVerificationEnabled(Map<String, Object> properties) {
+ return ClientProperties.getValue(properties,
+ prefixed(NettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION),
+ enableHostnameVerification.get());
+ }
+
+ /**
+ * Update {@link #maxRedirects(int)} value from the HTTP Client request.
+ * @param request the HTTP Client request.
+ * @return maximum redirects value.
+ */
+ /* package */ int maxRedirects(ClientRequest request) {
+ maxRedirects.set(
+ request.resolveProperty(prefixed(NettyClientProperties.MAX_REDIRECTS), maxRedirects.get()));
+ return maxRedirects.get();
+ }
+
+ /**
+ * Update the {@link #preserveMethodOnRedirect(boolean) preservation} of HTTP method during HTTP redirect
+ * by HTTP client request properties.
+ *
+ * @param request HTTP client request.
+ * @return the value of preservation.
+ */
+ /* package */ boolean preserveMethodOnRedirect(ClientRequest request) {
+ preserveMethodOnRedirect.set(
+ request.resolveProperty(
+ prefixed(NettyClientProperties.PRESERVE_METHOD_ON_REDIRECT), preserveMethodOnRedirect.get()));
+ return preserveMethodOnRedirect.get();
+ }
+
+ /**
+ * Get the instance of preset {@link NettyHttpRedirectController} either from configuration,
+ * or from the HTTP client request, or the default if non set.
+ * @param request the HTTP client request.
+ * @return an instance of {@link NettyHttpRedirectController}.
+ */
+ /* package */ NettyHttpRedirectController redirectController(ClientRequest request) {
+ NettyHttpRedirectController customRedirectController =
+ request.resolveProperty(
+ prefixed(NettyClientProperties.HTTP_REDIRECT_CONTROLLER), NettyHttpRedirectController.class);
+ if (customRedirectController == null) {
+ customRedirectController = redirectController.get();
+ }
+ if (customRedirectController == null) {
+ customRedirectController = new NettyHttpRedirectController();
+ }
+
+ return customRedirectController;
+ }
+
+ /**
+ * <p>
+ * Return a new instance of configuration updated by the merged settings from this and client properties.
+ * Only properties unresolved during the request are updated.
+ * </p><p>
+ * {@code This} is meant to be settings from the connector.
+ * The priorities should go DEFAULTS -> CONNECTOR -> CLIENT -> REQUEST.
+ * </p>
+ *
+ * @param client the REST client.
+ * @return a new instance of configuration.
+ */
+ /* package */ N fromClient(Client client) {
+ final Map<String, Object> properties = client.getConfiguration().getProperties();
+ final N clientConfiguration = copyFromClient(client.getConfiguration());
+
+ final Object threadPoolSize = properties.get(clientConfiguration.prefixed(ClientProperties.ASYNC_THREADPOOL_SIZE));
+ if (threadPoolSize instanceof Integer && (Integer) threadPoolSize > 0) {
+ clientConfiguration.asyncThreadPoolSize((Integer) threadPoolSize);
+ }
+
+ final Object maxPoolSizeTotalProperty = properties.get(
+ clientConfiguration.prefixed(NettyClientProperties.MAX_CONNECTIONS_TOTAL));
+ final Object maxPoolIdleProperty = properties.get(
+ clientConfiguration.prefixed(NettyClientProperties.IDLE_CONNECTION_PRUNE_TIMEOUT));
+ final Object maxPoolSizeProperty = properties.get(
+ clientConfiguration.prefixed(NettyClientProperties.MAX_CONNECTIONS));
+
+ if (maxPoolSizeTotalProperty != null) {
+ clientConfiguration.maxPoolSizeTotal.set((Integer) maxPoolSizeTotalProperty);
+ }
+
+ if (maxPoolIdleProperty != null) {
+ clientConfiguration.maxPoolIdle.set((Integer) maxPoolIdleProperty);
+ }
+
+ if (maxPoolSizeProperty != null) {
+ clientConfiguration.maxPoolSize.set((Integer) maxPoolSizeProperty);
+ }
+
+ if (clientConfiguration.maxPoolSizeTotal.get() < 0) {
+ throw new ProcessingException(LocalizationMessages.WRONG_MAX_POOL_TOTAL(maxPoolSizeTotal.get()));
+ }
+
+ if (clientConfiguration.maxPoolSize.get() < 0) {
+ throw new ProcessingException(LocalizationMessages.WRONG_MAX_POOL_SIZE(maxPoolSize.get()));
+ }
+
+ final Object logging = properties.get(clientConfiguration.prefixed(NettyClientProperties.LOGGING_ENABLED));
+ if (logging instanceof Boolean) {
+ clientConfiguration.loggingEnabled.set((Boolean) logging);
+ } else if (logging instanceof String) {
+ clientConfiguration.loggingEnabled.set(Boolean.valueOf((String) logging));
+ }
+
+ return clientConfiguration;
+ }
+
+ /**
+ * <p>
+ * Return a new instance of configuration updated by the merged settings from this and HTTP client request properties.
+ * Only properties unresolved during the request are updated.
+ * </p><p>
+ * {@code This} is meant to be settings from the connector.
+ * The priorities should go DEFAULTS -> CONNECTOR -> CLIENT -> REQUEST.
+ * </p>
+
+ * @param request the HTTP client request.
+ * @return a new instance of configuration.
+ */
+ /* package */ N fromRequest(ClientRequest request) {
+ final N requestConfiguration = copyFromRequest(request);
+
+ final Boolean logging = request.resolveProperty(prefixed(NettyClientProperties.LOGGING_ENABLED), Boolean.class);
+ if (logging != null) {
+ requestConfiguration.loggingEnabled.set(logging);
+ }
+
+ return requestConfiguration;
+ }
+
+
+ /**
+ * Create an instance of {@link HttpClientCodec} based on preset settings {@link #initialHttpHeaderLineLength(int)},
+ * {@link #maxHeaderSize} and {@link #maxChunkSize}. The settings can be preset in the configuration or
+ * on the HTTP client request.
+ *
+ * @param properties The HTTP client request properties.
+ * @return the {@link HttpClientCodec} instance.
+ */
+ /* package */ HttpClientCodec createHttpClientCodec(Map<String, Object> properties) {
+ firstHttpHeaderLineLength.set(ClientProperties.getValue(properties,
+ prefixed(NettyClientProperties.MAX_INITIAL_LINE_LENGTH), firstHttpHeaderLineLength.get()));
+ maxHeaderSize.set(
+ ClientProperties.getValue(properties, prefixed(NettyClientProperties.MAX_HEADER_SIZE), maxHeaderSize.get()));
+ maxChunkSize.set(
+ ClientProperties.getValue(properties, prefixed(NettyClientProperties.MAX_CHUNK_SIZE), maxChunkSize.get()));
+
+ return new HttpClientCodec(firstHttpHeaderLineLength.get(), maxHeaderSize.get(), maxChunkSize.get());
+ }
+
+ /**
+ * Create an instance of {@link ProxyHandler} based on HTTP request URI's port and address,
+ * the preset proxy {@link #proxyUri(URI) uri}, {@link #proxyUserName(String) username},
+ * and {@link #proxyPassword(String) password}.
+ *
+ * Can filter headers {@link #filterHeadersForProxy(boolean)}.
+ *
+ * @param clientProxy the Jersey {@link ClientProxy} instance.
+ * @param jerseyRequest the HTTP client request containing HTTP headers to be filtered.
+ * @return a Netty {@link ProxyHandler} instance.
+ */
+ /* package */ ProxyHandler createProxyHandler(ClientProxy clientProxy, ClientRequest jerseyRequest) {
+ final URI u = clientProxy.uri();
+ InetSocketAddress proxyAddr = new InetSocketAddress(u.getHost(), u.getPort() == -1 ? 8080 : u.getPort());
+
+ filterHeadersForProxy.set(jerseyRequest
+ .resolveProperty(prefixed(NettyClientProperties.FILTER_HEADERS_FOR_PROXY), filterHeadersForProxy.get()));
+ HttpHeaders httpHeaders = NettyConnector.setHeaders(
+ jerseyRequest, new DefaultHttpHeaders(), Boolean.TRUE.equals(filterHeadersForProxy.get()));
+
+ ProxyHandler proxy = clientProxy.userName() == null ? new HttpProxyHandler(proxyAddr, httpHeaders)
+ : new HttpProxyHandler(proxyAddr, clientProxy.userName(), clientProxy.password(), httpHeaders);
+ if (connectTimeout.get() > 0) {
+ proxy.setConnectTimeoutMillis(connectTimeout.get());
+ }
+
+ return proxy;
+ }
+ }
+
+}
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorProvider.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorProvider.java
index cdf90dd..46f27a7 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorProvider.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyConnectorProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020 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
@@ -51,8 +51,53 @@
@Beta
public class NettyConnectorProvider implements ConnectorProvider {
+ private final Config config;
+
+ public NettyConnectorProvider() {
+ this.config = config();
+ }
+
+ private NettyConnectorProvider(Config config) {
+ this.config = config;
+ }
+
@Override
public Connector getConnector(Client client, Configuration runtimeConfig) {
- return new NettyConnector(client);
+ return new NettyConnector(client, config.rw());
+ }
+
+ /**
+ * Instantiate a builder allowing to configure the NettyConnectorProvider.
+ * @return a new {@link Config} instance.
+ */
+ public static Config config() {
+ return new Config();
+ }
+
+ public static final class Config extends NettyConnectorConfiguration<Config> {
+
+ private Config() {
+ }
+
+ /* package */ RW rw() {
+ RW rw = new RW();
+ rw.setNonEmpty(this);
+ return rw;
+ }
+
+ public NettyConnectorProvider build() {
+ return new NettyConnectorProvider(this);
+ }
+
+ /* package */ static class RW extends ReadWrite<RW> {
+ @Override
+ public RW instance() {
+ return new RW();
+ }
+
+ public RW me() {
+ return this;
+ }
+ }
}
}
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyHttpRedirectController.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyHttpRedirectController.java
index 670be3e..6c4c41c 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyHttpRedirectController.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/NettyHttpRedirectController.java
@@ -34,9 +34,15 @@
*/
public class NettyHttpRedirectController {
+ private NettyConnectorProvider.Config.RW configuration;
+
+ /* package */ void init(NettyConnectorProvider.Config.RW configuration) {
+ this.configuration = configuration;
+ }
+
/**
* Configure the HTTP request after HTTP Redirect response has been received.
- * By default, the HTTP POST request is transformed into HTTP GET for status 301 & 302.
+ * By default, the HTTP POST request is not transformed into HTTP GET for status 301 & 302.
* Also, HTTP Headers described by RFC 9110 Section 15.4 are removed from the new HTTP Request.
*
* @param request The new {@link ClientRequest} to be sent to the redirected URI.
@@ -44,7 +50,7 @@
* @return {@code true} when the new request should be sent.
*/
public boolean prepareRedirect(ClientRequest request, ClientResponse response) {
- final Boolean keepMethod = request.resolveProperty(NettyClientProperties.PRESERVE_METHOD_ON_REDIRECT, Boolean.TRUE);
+ final boolean keepMethod = configuration.preserveMethodOnRedirect(request);
if (Boolean.FALSE.equals(keepMethod) && request.getMethod().equals(HttpMethod.POST)) {
switch (response.getStatus()) {
diff --git a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/NettyEntityWriter.java b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/NettyEntityWriter.java
index bcd3fd8..f758f95 100644
--- a/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/NettyEntityWriter.java
+++ b/connectors/netty-connector/src/main/java/org/glassfish/jersey/netty/connector/internal/NettyEntityWriter.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
@@ -16,9 +16,9 @@
package org.glassfish.jersey.netty.connector.internal;
+import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.handler.stream.ChunkedInput;
-import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.RequestEntityProcessing;
@@ -28,6 +28,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Supplier;
/**
* The Entity Writer is used to write entity in Netty. One implementation is delayed,
@@ -60,7 +61,7 @@
/**
* Flushes the writen objects. Can throw IOException.
- * @throws IOException
+ * @throws IOException exception.
*/
void flush() throws IOException;
@@ -68,7 +69,7 @@
* Get the netty Chunked Input to be written.
* @return The Chunked input instance
*/
- ChunkedInput getChunkedInput();
+ ChunkedInput<ByteBuf> getChunkedInput();
/**
* Get the {@link OutputStream} used to write an entity
@@ -78,20 +79,20 @@
/**
* Get the length of the entity written to the {@link OutputStream}
- * @return
+ * @return length of the entity.
*/
long getLength();
/**
- * Return Type of
- * @return
+ * Return Type of the {@link NettyEntityWriter}.
+ * @return type of the writer.
*/
Type getType();
- static NettyEntityWriter getInstance(ClientRequest clientRequest, Channel channel) {
+ static NettyEntityWriter getInstance(
+ ClientRequest clientRequest, Channel channel, Supplier<RequestEntityProcessing> requestEntityProcessingSupplier) {
final long lengthLong = clientRequest.getLengthLong();
- final RequestEntityProcessing entityProcessing = clientRequest.resolveProperty(
- ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.class);
+ final RequestEntityProcessing entityProcessing = requestEntityProcessingSupplier.get();
if ((entityProcessing == null && lengthLong == -1) || entityProcessing == RequestEntityProcessing.CHUNKED) {
return new DirectEntityWriter(channel, Type.CHUNKED);
@@ -129,7 +130,7 @@
}
@Override
- public ChunkedInput getChunkedInput() {
+ public ChunkedInput<ByteBuf> getChunkedInput() {
return stream;
}
@@ -203,7 +204,7 @@
}
@Override
- public ChunkedInput getChunkedInput() {
+ public ChunkedInput<ByteBuf> getChunkedInput() {
return writer.getChunkedInput();
}
@@ -226,7 +227,7 @@
private class DelayedOutputStream extends OutputStream {
private final List<WriteAction> actions = new ArrayList<>();
private int writeLen = 0;
- private AtomicBoolean streamFlushed = new AtomicBoolean(false);
+ private final AtomicBoolean streamFlushed = new AtomicBoolean(false);
@Override
public void write(int b) throws IOException {
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputClosedOnErrorTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputClosedOnErrorTest.java
index 1d0135d..22ce8d3 100644
--- a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputClosedOnErrorTest.java
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ChunkedInputClosedOnErrorTest.java
@@ -83,10 +83,11 @@
ConnectorProvider provider = new ConnectorProvider() {
@Override
public Connector getConnector(Client client, Configuration runtimeConfig) {
- return new NettyConnector(client) {
+ return new NettyConnector(client, NettyConnectorProvider.config().rw()) {
@Override
- NettyEntityWriter nettyEntityWriter(ClientRequest clientRequest, Channel channel) {
- writer.set(super.nettyEntityWriter(clientRequest, channel));
+ NettyEntityWriter nettyEntityWriter(ClientRequest clientRequest, Channel channel,
+ NettyConnectorProvider.Config.RW config) {
+ writer.set(super.nettyEntityWriter(clientRequest, channel, config));
writerSetLatch.countDown();
return new NettyEntityWriter() {
private boolean slept = false;
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
index 78a3448..fed5f61 100644
--- 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
@@ -1,5 +1,5 @@
/*
- * 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
@@ -223,9 +223,12 @@
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);
+ return new NettyConnector(client, NettyConnectorProvider.config().rw()) {
+ @Override
+ NettyEntityWriter nettyEntityWriter(
+ ClientRequest clientRequest, Channel channel, NettyConnectorProvider.Config.RW config) {
+ NettyEntityWriter wrapped = NettyEntityWriter.getInstance(
+ clientRequest, channel, () -> config.requestEntityProcessing(clientRequest));
JerseyChunkedInput chunkedInput = (JerseyChunkedInput) wrapped.getChunkedInput();
try {
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ConnectorConfigTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ConnectorConfigTest.java
new file mode 100644
index 0000000..6dd9b03
--- /dev/null
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/ConnectorConfigTest.java
@@ -0,0 +1,1683 @@
+/*
+ * 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.netty.connector;
+
+import io.netty.handler.codec.http.HttpClientCodec;
+import io.netty.handler.codec.http.HttpRequest;
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.ClientResponse;
+import org.glassfish.jersey.client.RequestEntityProcessing;
+import org.glassfish.jersey.client.innate.ClientProxy;
+import org.glassfish.jersey.http.HttpHeaders;
+import org.glassfish.jersey.internal.MapPropertiesDelegate;
+import org.glassfish.jersey.internal.util.collection.Ref;
+import org.glassfish.jersey.client.innate.ConnectorConfiguration;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import javax.net.ssl.SSLContext;
+import jakarta.ws.rs.ProcessingException;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Configuration;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.net.InetSocketAddress;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
+public class ConnectorConfigTest {
+
+ private static final String PREFIX = "test.";
+
+ private static ClientRequest createRequest(Client client) {
+ return new ClientRequest(URI.create("http://localhost:8080"),
+ (ClientConfig) client.getConfiguration(), new MapPropertiesDelegate()) {
+ };
+ }
+
+ @Test
+ public void testPrefixedConfig() {
+ ConnectorConfig.RW r = new ConnectorConfig.RW();
+ Configuration prefixed, unprefixed;
+
+ unprefixed = r.config();
+ unprefixed.getProperties().put(ClientProperties.CONNECT_TIMEOUT, 1000);
+ prefixed = r.prefix(PREFIX).prefixedConfiguration(unprefixed);
+ Assertions.assertNull(prefixed.getProperty(ClientProperties.CONNECT_TIMEOUT));
+ Assertions.assertNull(prefixed.getProperties().get(ClientProperties.CONNECT_TIMEOUT));
+
+ unprefixed = r.config();
+ unprefixed.getProperties().put(PREFIX + ClientProperties.CONNECT_TIMEOUT, 2000);
+ prefixed = r.prefix(PREFIX).prefixedConfiguration(unprefixed);
+ Assertions.assertEquals(2000, prefixed.getProperty(ClientProperties.CONNECT_TIMEOUT));
+ Assertions.assertEquals(2000, prefixed.getProperties().get(ClientProperties.CONNECT_TIMEOUT));
+
+ unprefixed = r.config();
+ prefixed = r.prefix(PREFIX).prefixedConfiguration(unprefixed);
+ unprefixed.getProperties().put(ClientProperties.CONNECT_TIMEOUT, 2000);
+ prefixed.getProperties().putAll(unprefixed.getProperties());
+ Assertions.assertNull(prefixed.getProperty(ClientProperties.CONNECT_TIMEOUT));
+ Assertions.assertNull(prefixed.getProperties().get(ClientProperties.CONNECT_TIMEOUT));
+
+ unprefixed = r.config();
+ prefixed = r.prefix(PREFIX).prefixedConfiguration(unprefixed);
+ unprefixed.getProperties().put(PREFIX + ClientProperties.CONNECT_TIMEOUT, 2000);
+ prefixed.getProperties().putAll(unprefixed.getProperties());
+ Assertions.assertEquals(2000, prefixed.getProperty(ClientProperties.CONNECT_TIMEOUT));
+ Assertions.assertEquals(2000, prefixed.getProperties().get(ClientProperties.CONNECT_TIMEOUT));
+
+ unprefixed = r.config();
+ prefixed = r.prefix(PREFIX).prefixedConfiguration(unprefixed);
+ prefixed.getProperties().put(PREFIX + ClientProperties.PROXY_USERNAME, "USERNAME");
+ Assertions.assertEquals("USERNAME", prefixed.getProperty(ClientProperties.PROXY_USERNAME));
+ prefixed.getProperties().put(ClientProperties.PROXY_PASSWORD, "PASSWORD");
+ Assertions.assertNull(prefixed.getProperty(ClientProperties.PROXY_PASSWORD));
+ }
+
+ @Test
+ public void testAsyncThreadPoolSize() {
+ AtomicInteger result = new AtomicInteger(0);
+ class RWAsync extends RW {
+ @Override
+ public Integer asyncThreadPoolSize() {
+ result.set(super.asyncThreadPoolSize());
+ return super.asyncThreadPoolSize();
+ }
+
+ @Override
+ public RWAsync instance() {
+ return new RWAsync();
+ }
+ }
+
+ Client client = ClientBuilder.newClient();
+ NettyConnectorProvider.Config.RW rw0 = new RWAsync().asyncThreadPoolSize(10);
+ new NettyConnector(client, rw0);
+ Assertions.assertEquals(10, result.get());
+
+ result.set(0);
+ NettyConnectorProvider.Config.RW rw1 = new RWAsync().asyncThreadPoolSize(20);
+ client.property(ClientProperties.CONNECTOR_CONFIGURATION, rw1);
+ new NettyConnector(client, rw0);
+ Assertions.assertEquals(20, result.get());
+
+ result.set(0);
+ client.property(ClientProperties.ASYNC_THREADPOOL_SIZE, 30);
+ new NettyConnector(client, rw0);
+ Assertions.assertEquals(30, result.get());
+ }
+
+ @Test
+ public void testConnectTimeout() {
+ final AtomicInteger result = new AtomicInteger(0);
+ class RWConnect extends NettyConnectorProvider.Config.RW {
+ @Override
+ public int connectTimeout() {
+ result.set(super.connectTimeout());
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWConnect instance() {
+ return new RWConnect();
+ }
+ }
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000)).request().apply();
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECT_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request().apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECT_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(4000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECT_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(5000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect().prefix(PREFIX)).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(2000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECT_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+ }
+
+ @Test
+ public void testExpect100Continue() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWExpect extends RW {
+
+ @Override
+ public Boolean expect100Continue(ClientRequest request) {
+ result.set(super.expect100Continue(request));
+ return result.get();
+ }
+
+ @Override
+ public int connectTimeout() {
+ config.set(this);
+ return super.connectTimeout();
+ }
+
+ @Override
+ public RWExpect instance() {
+ return new RWExpect();
+ }
+ }
+
+ Request req = new TestClient(new RWExpect()).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertNull(result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100Continue(true)).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100Continue(true).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.EXPECT_100_CONTINUE, false))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100Continue(true).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100Continue(false)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100Continue(true)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100Continue(false)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.EXPECT_100_CONTINUE, true))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100Continue(false)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(true, result.get());
+ }
+
+ @Test
+ public void testExpect100ContinueThreshold() {
+ final AtomicReference<Long> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWExpect extends RW {
+
+ @Override
+ public long expect100ContinueThreshold(ClientRequest request) {
+ result.set(super.expect100ContinueThreshold(request));
+ return result.get();
+ }
+
+ @Override
+ public int connectTimeout() {
+ config.set(this);
+ return super.connectTimeout();
+ }
+
+ @Override
+ public RWExpect instance() {
+ return new RWExpect();
+ }
+ }
+
+ Request req = new TestClient(new RWExpect()).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(ClientProperties.DEFAULT_EXPECT_100_CONTINUE_THRESHOLD_SIZE, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueThreshold(1000)).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueThreshold(1000).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.EXPECT_100_CONTINUE_THRESHOLD_SIZE, 2000))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueThreshold(1000).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100ContinueThreshold(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100ContinueThreshold(1000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100ContinueThreshold(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.EXPECT_100_CONTINUE_THRESHOLD_SIZE, 1000))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100ContinueThreshold(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(1000, result.get());
+ }
+
+ @Test
+ public void testExpect100ContinueTimeout() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWExpect extends RW {
+
+ @Override
+ public NettyConnectorProvider.Config.RW expect100ContinueTimeout(ClientRequest request) {
+ super.expect100ContinueTimeout(request);
+ result.set(this.expect100ContTimeout.get());
+ return this;
+ }
+
+ @Override
+ public int connectTimeout() {
+ config.set(this);
+ return super.connectTimeout();
+ }
+
+ @Override
+ public RWExpect instance() {
+ return new RWExpect();
+ }
+ }
+
+ Request req = new TestClient(new RWExpect()).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(NettyClientProperties.DEFAULT_EXPECT_100_CONTINUE_TIMEOUT_VALUE, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueTimeout(1000)).request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueTimeout(1000).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.EXPECT_100_CONTINUE_TIMEOUT, 2000))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().expect100ContinueTimeout(1000).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100ContinueTimeout(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, (HttpRequest) null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWExpect().expect100ContinueTimeout(1000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100ContinueTimeout(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWExpect().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.EXPECT_100_CONTINUE_TIMEOUT, 1000))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWExpect().expect100ContinueTimeout(2000)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ new Expect100ContinueConnectorExtension(config.get()).invoke(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(1000, result.get());
+ }
+
+ @Test
+ public void testFollowRedirects() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWFollow extends RW {
+
+ @Override
+ public boolean followRedirects() {
+ result.set(super.followRedirects());
+ return result.get();
+ }
+
+ @Override
+ public int connectTimeout() {
+ config.set(this);
+ return super.connectTimeout();
+ }
+
+ @Override
+ public RWFollow instance() {
+ return new RWFollow();
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWFollow()).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(new RWFollow().copy().followRedirects(), result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().followRedirects(false)).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().followRedirects(false).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.FOLLOW_REDIRECTS, true))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().followRedirects(false).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWFollow().followRedirects(true)))
+ .apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWFollow().followRedirects(false)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFollow().followRedirects(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.FOLLOW_REDIRECTS, false))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFollow().followRedirects(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().followRedirects();
+ Assertions.assertEquals(false, result.get());
+ }
+
+ @Test
+ public void testProxy() {
+ final AtomicReference<ClientProxy> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWProxy extends RW {
+
+ @Override
+ public Optional<ClientProxy> proxy(ClientRequest request, URI requestUri) {
+ Optional<ClientProxy> proxy = super.proxy(request, requestUri);
+ result.set(proxy.orElse(null));
+ return proxy;
+ }
+
+ @Override
+ public RWProxy instance() {
+ return new RWProxy();
+ }
+ }
+ String proxyUri = "http://proxy.org:8080";
+ String userName = "USERNAME";
+ String password = "PASSWORD";
+
+ new TestClient(new RWProxy()).request().apply();
+ Assertions.assertNull(result.get());
+
+ result.set(null);
+ new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)).request().apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy().prefix(PREFIX).proxyUri(proxyUri).proxyUserName("XXX").proxyPassword(password))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.PROXY_USERNAME, userName))
+ .request(r -> r.setProperty(ClientProperties.PROXY_PASSWORD, "XXX"))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy().prefix(PREFIX).proxyUri(proxyUri).proxyUserName("XXX").proxyPassword(password))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWProxy().proxyUserName(userName).proxyPassword(null)))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertNull(result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy().prefix(PREFIX)
+ .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP,
+ new InetSocketAddress(proxyUri.split("g:")[0] + "g", Integer.parseInt(proxyUri.split("g:")[1])))))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWProxy().proxyUserName(userName).proxyPassword(password).prefix(PREFIX)))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+ }
+
+ @Test
+ public void testReadTimeout() {
+ final AtomicInteger result = new AtomicInteger(0);
+ class RWRead extends NettyConnectorProvider.Config.RW {
+
+ @Override
+ public int readTimeout() {
+ result.set(super.readTimeout());
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWRead instance() {
+ return new RWRead();
+ }
+ }
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000)).request().apply();
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.READ_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request().apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.READ_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .request(r -> r.setProperty(ClientProperties.READ_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(5000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWRead().readTimeout(2000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWRead().readTimeout(4000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.READ_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+ }
+
+ @Test
+ public void testRequestEntityProcessing() {
+ final AtomicReference<RequestEntityProcessing> result = new AtomicReference<>();
+ final AtomicReference<RW> config = new AtomicReference<>();
+ class RWRP extends RW {
+
+ @Override
+ public RequestEntityProcessing requestEntityProcessing(ClientRequest request) {
+ result.set(super.requestEntityProcessing(request));
+ return result.get();
+ }
+
+ @Override
+ public RWRP instance() {
+ config.set(new RWRP());
+ return (RWRP) config.get();
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWRP().requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ try {
+ req.connector.nettyEntityWriter(req.request, null, config.get());
+ } catch (NullPointerException ignore) {
+ }
+ Assertions.assertEquals(RequestEntityProcessing.CHUNKED, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWRP().prefix(PREFIX).requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWRP().requestEntityProcessing(RequestEntityProcessing.BUFFERED).prefix(PREFIX)))
+ .apply();
+ try {
+ req.connector.nettyEntityWriter(req.request, null, config.get());
+ } catch (NullPointerException ignore) {
+ }
+ Assertions.assertEquals(RequestEntityProcessing.BUFFERED, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWRP().prefix(PREFIX).requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.REQUEST_ENTITY_PROCESSING,
+ RequestEntityProcessing.BUFFERED))
+ .apply();
+ try {
+ req.connector.nettyEntityWriter(req.request, null, config.get());
+ } catch (NullPointerException ignore) {
+ }
+ Assertions.assertEquals(RequestEntityProcessing.BUFFERED, result.get());
+ }
+
+ @Test
+ public void testSniHostName() {
+ final String sniHost = "sun.oracle.com";
+ final AtomicReference<String> sniRef = new AtomicReference<>();
+ final NettyConnectionController controller = new NettyConnectionController() {
+ @Override
+ public String getConnectionGroup(ClientRequest clientRequest, URI uri, String hostName, int port) {
+ sniRef.set(hostName);
+ return super.getConnectionGroup(clientRequest, uri, hostName, port);
+ }
+ };
+
+ final class RWSni extends RW {
+ @Override
+ public RWSni instance() {
+ return new RWSni();
+ }
+ }
+
+ new TestClient(new RWSni().connectionController(controller))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, sniHost))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+
+ new TestClient(new RWSni().connectionController(controller).sniHostName(sniHost))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, "moon.oracle.com"))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+
+ new TestClient(new RWSni().connectionController(controller).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().sniHostName("moon.oracle.com")))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, sniHost))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+
+ new TestClient(new RWSni().connectionController(controller).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().sniHostName(sniHost).prefix(PREFIX)))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, "moon.oracle.com"))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+
+ new TestClient(new RWSni().connectionController(controller).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().sniHostName("moon.oracle.com")))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, sniHost))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+
+ new TestClient(new RWSni().connectionController(controller).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().sniHostName(sniHost).prefix(PREFIX)))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.HOST, "moon.oracle.com"))
+ .apply();
+ Assertions.assertEquals(sniHost, sniRef.get());
+ }
+
+ @Test
+ public void testSslContext() {
+ final SSLContext testContext = new SSLContext(null, null, null){};
+ final AtomicReference<SSLContext> result = new AtomicReference<>();
+ final AtomicReference<RW> config = new AtomicReference<>();
+ class RWSsl extends RW {
+
+ @Override
+ public SSLContext sslContext(Client client, ClientRequest request) {
+ result.set(super.sslContext(client, request));
+ return result.get();
+ }
+
+ @Override
+ public RWSsl instance() {
+ RWSsl rw = new RWSsl();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWSsl().sslContextSupplier(() -> testContext)).request().apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSsl().prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.SSL_CONTEXT_SUPPLIER,
+ (Supplier<SSLContext>) () -> testContext)).apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSsl().prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSsl().prefix(PREFIX).sslContextSupplier(() -> testContext))).apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+ }
+
+ @Test
+ public void testConnectionController() {
+ final NettyConnectionController connectionController = new NettyConnectionController();
+ final AtomicReference<NettyConnectionController> result = new AtomicReference<>();
+
+ class RWController extends RW {
+
+ @Override
+ NettyConnectionController connectionController() {
+ result.set(super.connectionController());
+ return result.get();
+ }
+
+ @Override
+ public RWController instance() {
+ return new RWController();
+ }
+ }
+
+ new TestClient(new RWController().connectionController(connectionController)).request().apply();
+ Assertions.assertEquals(connectionController, result.get());
+
+ result.set(null);
+ new TestClient(new RWController().prefix(PREFIX).connectionController(new NettyConnectionController()))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().connectionController(connectionController).prefix(PREFIX))).apply();
+ Assertions.assertEquals(connectionController, result.get());
+ }
+
+ @Test
+ public void testEnableSslHostnameVerification() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWEnabled extends RW {
+
+ @Override
+ boolean isSslHostnameVerificationEnabled(Map<String, Object> properties) {
+ result.set(super.isSslHostnameVerificationEnabled(properties));
+ return result.get();
+ }
+
+ @Override
+ public RWEnabled instance() {
+ RWEnabled enabled = new RWEnabled();
+ config.set(enabled);
+ return enabled;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWEnabled()).request().apply();
+ config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(new RWEnabled().copy().followRedirects(), result.get());
+
+ result.set(null);
+ req = new TestClient(new RWEnabled().enableSslHostnameVerification(false)).request().apply();
+ config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(false, result.get());
+
+// NOT PER REQUEST
+// result.set(null);
+// req = new TestClient(new RWEnabled().enableSslHostnameVerification(false).prefix(PREFIX))
+// .request(r -> r.setProperty(PREFIX + NettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION, true))
+// .apply();
+// config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+// Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWEnabled().enableSslHostnameVerification(false).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWEnabled().enableSslHostnameVerification(true)))
+ .apply();
+ config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWEnabled())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWEnabled().enableSslHostnameVerification(false)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWEnabled().enableSslHostnameVerification(true)))
+ .apply();
+ config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWEnabled().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.ENABLE_SSL_HOSTNAME_VERIFICATION, false))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWEnabled().enableSslHostnameVerification(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ config.get().isSslHostnameVerificationEnabled(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(false, result.get());
+ }
+
+ @Test
+ public void testMaxRedirects() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWMaxRed extends RW {
+
+ @Override
+ int maxRedirects(ClientRequest request) {
+ result.set(super.maxRedirects(request));
+ return result.get();
+ }
+
+ @Override
+ public RWMaxRed instance() {
+ RWMaxRed max = new RWMaxRed();
+ config.set(max);
+ return max;
+ }
+ }
+
+ Request req = new TestClient(new RWMaxRed()).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(new RWMaxRed().copy().maxRedirects(req.request), result.get());
+
+ result.set(null);
+ req = new TestClient(new RWMaxRed().maxRedirects(2)).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(2, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWMaxRed().maxRedirects(2).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.MAX_REDIRECTS, 3))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(3, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWMaxRed().maxRedirects(2).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWMaxRed().maxRedirects(3)))
+ .apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(3, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWMaxRed())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWMaxRed().maxRedirects(2)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWMaxRed().maxRedirects(3)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(3, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWMaxRed().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_REDIRECTS, 2))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWMaxRed().maxRedirects(3)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ Assertions.assertEquals(2, result.get());
+ }
+
+ @Test
+ public void testRedirectController() {
+ final NettyHttpRedirectController controller = new NettyHttpRedirectController();
+ final AtomicReference<NettyHttpRedirectController> result = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWController extends RW {
+
+ @Override
+ NettyHttpRedirectController redirectController(ClientRequest request) {
+ result.set(super.redirectController(request));
+ return result.get();
+ }
+
+ @Override
+ public RWController instance() {
+ RWController max = new RWController();
+ config.set(max);
+ return max;
+ }
+ }
+
+ Request req;
+
+ result.set(null);
+ req = new TestClient(new RWController().redirectController(controller)).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().redirectController(req.request);
+ Assertions.assertEquals(controller, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().redirectController(new NettyHttpRedirectController()).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.HTTP_REDIRECT_CONTROLLER, controller))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().redirectController(req.request);
+ Assertions.assertEquals(controller, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().redirectController(new NettyHttpRedirectController()).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWController().redirectController(controller)))
+ .apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ config.get().redirectController(req.request);
+ Assertions.assertEquals(controller, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().redirectController(new NettyHttpRedirectController())))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().redirectController(controller)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+// config.get().redirectController(req.request);
+ Assertions.assertEquals(controller, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.HTTP_REDIRECT_CONTROLLER, controller))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().redirectController(new NettyHttpRedirectController())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+// config.get().redirectController(req.request);
+ Assertions.assertEquals(controller, result.get());
+ }
+
+ @Test
+ public void testPreserveMethodOnRedirect() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ final AtomicReference<NettyHttpRedirectController> controller = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWController extends RW {
+
+ @Override
+ boolean preserveMethodOnRedirect(ClientRequest request) {
+ result.set(super.preserveMethodOnRedirect(request));
+ return result.get();
+ }
+
+ @Override
+ NettyHttpRedirectController redirectController(ClientRequest request) {
+ controller.set(super.redirectController(request));
+ return controller.get();
+ }
+
+ @Override
+ public RWController instance() {
+ RWController max = new RWController();
+ config.set(max);
+ return max;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWController()).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(new RWController().copy().preserveMethodOnRedirect(req.request), result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().preserveMethodOnRedirect(false)).request().apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().preserveMethodOnRedirect(true).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.PRESERVE_METHOD_ON_REDIRECT, false))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().preserveMethodOnRedirect(true).prefix(PREFIX))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWController().preserveMethodOnRedirect(false)))
+ .apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().preserveMethodOnRedirect(true)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().preserveMethodOnRedirect(false)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWController().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.PRESERVE_METHOD_ON_REDIRECT, false))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWController().preserveMethodOnRedirect(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ new JerseyClientHandler(req.request, new CompletableFuture<ClientResponse>(),
+ new CompletableFuture<Object>(), new HashSet<>(), req.connector, config.get());
+ try {
+ controller.get().prepareRedirect(req.request, null);
+ } catch (NullPointerException expected) {
+ }
+ Assertions.assertEquals(false, result.get());
+ }
+
+ @Test
+ public void testFilterHeadersForProxy() {
+ final AtomicReference<ClientProxy> proxy = new AtomicReference<>();
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWProxy extends RW {
+ @Override
+ public Optional<ClientProxy> proxy(ClientRequest request, URI requestUri) {
+ Optional<ClientProxy> oProxy = super.proxy(request, requestUri);
+ proxy.set(oProxy.orElse(null));
+ return oProxy;
+ }
+
+ @Override
+ public RWProxy instance() {
+ RWProxy rw = new RWProxy();
+ config.set(rw);
+ return rw;
+ }
+ }
+ String proxyUri = "http://proxy.org:8080";
+ String userName = "USERNAME";
+ String password = "PASSWORD";
+
+ Request req;
+ req = new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)).request().apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(((Ref<Boolean>) new RWProxy().copy().filterHeadersForProxy).get(),
+ ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+
+ config.set(null);
+ req = new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)
+ .filterHeadersForProxy(false)).request().apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(false, ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+
+ config.set(null);
+ req = new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.FILTER_HEADERS_FOR_PROXY, false))
+ .apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(false, ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+
+ config.set(null);
+ new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)
+ .prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.FILTER_HEADERS_FOR_PROXY, false))
+ .request().apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(false, ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+
+ config.set(null);
+ new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)
+ .prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().filterHeadersForProxy(false).prefix(PREFIX)))
+ .request().apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(false, ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+
+ config.set(null);
+ new TestClient(new RWProxy().proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().filterHeadersForProxy(false).prefix(PREFIX)))
+ .apply();
+ config.get().createProxyHandler(proxy.get(), req.request);
+ Assertions.assertEquals(false, ((Ref<Boolean>) config.get().filterHeadersForProxy).get());
+ }
+
+ @Test
+ public void testFirstHttpHeaderLineLength() {
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWFHHLL extends RW {
+
+ @Override
+ HttpClientCodec createHttpClientCodec(Map<String, Object> properties) {
+ HttpClientCodec codec = super.createHttpClientCodec(properties);
+ result.set(firstHttpHeaderLineLength.get());
+ return codec;
+ }
+
+ @Override
+ public RWFHHLL instance() {
+ RWFHHLL rw = new RWFHHLL();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWFHHLL()).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(NettyClientProperties.DEFAULT_INITIAL_LINE_LENGTH, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFHHLL().initialHttpHeaderLineLength(5555)).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFHHLL().initialHttpHeaderLineLength(1111).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFHHLL().initialHttpHeaderLineLength(5555).prefix(PREFIX))).apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFHHLL().initialHttpHeaderLineLength(1111).prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_INITIAL_LINE_LENGTH, 5555))
+ .request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFHHLL().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_INITIAL_LINE_LENGTH, 5555))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFHHLL().initialHttpHeaderLineLength(8888).prefix(PREFIX)))
+ .apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+ }
+
+ @Test
+ public void testLoggingHandler() {
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ class RWLog extends RW {
+ @Override
+ public RWLog instance() {
+ RWLog rw = new RWLog();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ new TestClient(new RWLog()).request().apply();
+ Assertions.assertFalse(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(true)).request().apply();
+ Assertions.assertTrue(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(false).prefix(PREFIX))
+ .request(r -> r.setProperty(NettyClientProperties.LOGGING_ENABLED, true))
+ .apply();
+ Assertions.assertFalse(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(false).prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.LOGGING_ENABLED, true))
+ .request()
+ .apply();
+ Assertions.assertTrue(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(false).prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + NettyClientProperties.LOGGING_ENABLED, true))
+ .apply();
+ Assertions.assertTrue(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(false).prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWLog().enableLoggingHandler(true)))
+ .request()
+ .apply();
+ Assertions.assertTrue(config.get().loggingEnabled.get());
+
+ new TestClient(new RWLog().enableLoggingHandler(false).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWLog().enableLoggingHandler(true).prefix(PREFIX)))
+ .apply();
+ Assertions.assertTrue(config.get().loggingEnabled.get());
+ }
+
+ @Test
+ public void testMaxHeaderSize() {
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWSize extends RW {
+
+ @Override
+ HttpClientCodec createHttpClientCodec(Map<String, Object> properties) {
+ HttpClientCodec codec = super.createHttpClientCodec(properties);
+ result.set(maxHeaderSize.get());
+ return codec;
+ }
+
+ @Override
+ public RWSize instance() {
+ RWSize rw = new RWSize();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWSize()).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(NettyClientProperties.DEFAULT_HEADER_SIZE, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxHeaderSize(5555)).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxHeaderSize(1111).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSize().maxHeaderSize(5555).prefix(PREFIX))).apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxHeaderSize(1111).prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_HEADER_SIZE, 5555))
+ .request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_HEADER_SIZE, 5555))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSize().maxHeaderSize(8888).prefix(PREFIX)))
+ .apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+ }
+
+ @Test
+ public void testMaxChunkSize() {
+ final AtomicReference<NettyConnectorProvider.Config.RW> config = new AtomicReference<>();
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWSize extends RW {
+
+ @Override
+ HttpClientCodec createHttpClientCodec(Map<String, Object> properties) {
+ HttpClientCodec codec = super.createHttpClientCodec(properties);
+ result.set(maxChunkSize.get());
+ return codec;
+ }
+
+ @Override
+ public RWSize instance() {
+ RWSize rw = new RWSize();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWSize()).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(NettyClientProperties.DEFAULT_CHUNK_SIZE, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxChunkSize(5555)).request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxChunkSize(1111).prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSize().maxChunkSize(5555).prefix(PREFIX))).apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().maxChunkSize(1111).prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_CHUNK_SIZE, 5555))
+ .request().apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSize().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_CHUNK_SIZE, 5555))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSize().maxChunkSize(8888).prefix(PREFIX)))
+ .apply();
+ config.get().createHttpClientCodec(req.request.getConfiguration().getProperties());
+ Assertions.assertEquals(5555, result.get());
+ }
+
+ @Test
+ public void testMaxTotalConnections() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWConn extends RW {
+
+ @Override
+ NettyConnectorProvider.Config.RW fromClient(Client client) {
+ NettyConnectorProvider.Config.RW rw = super.fromClient(client);
+ result.set(rw.maxPoolSizeTotal.get());
+ return rw;
+ }
+
+ @Override
+ public RWConn instance() {
+ return new RWConn();
+ }
+ }
+
+ new TestClient(new RWConn().maxTotalConnections(55)).request().apply();
+ Assertions.assertEquals(55, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_CONNECTIONS_TOTAL, 55))
+ .request().apply();
+ Assertions.assertEquals(55, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).maxTotalConnections(55)))
+ .request().apply();
+ Assertions.assertEquals(55, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ // NOT PER REQUEST
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).maxTotalConnections(55)))
+ .apply();
+ Assertions.assertEquals(new RWConn().copy().maxPoolSizeTotal.get(), result.get());
+ }
+
+ @Test
+ public void testMaxConnectionsPerDestination() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWConn extends RW {
+
+ @Override
+ NettyConnectorProvider.Config.RW fromClient(Client client) {
+ NettyConnectorProvider.Config.RW rw = super.fromClient(client);
+ result.set(rw.maxPoolSize.get());
+ return rw;
+ }
+
+ @Override
+ public RWConn instance() {
+ return new RWConn();
+ }
+ }
+
+ new TestClient(new RWConn().maxConnectionsPerDestination(15)).request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.MAX_CONNECTIONS, 15))
+ .request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).maxConnectionsPerDestination(15)))
+ .request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ // NOT PER REQUEST
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).maxConnectionsPerDestination(15)))
+ .apply();
+ Assertions.assertEquals(new RWConn().copy().maxPoolSize.get(), result.get());
+ }
+
+ @Test
+ public void testIdleConnectionPruneTimeout() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ class RWConn extends RW {
+
+ @Override
+ NettyConnectorProvider.Config.RW fromClient(Client client) {
+ NettyConnectorProvider.Config.RW rw = super.fromClient(client);
+ result.set(rw.maxPoolIdle.get());
+ return rw;
+ }
+
+ @Override
+ public RWConn instance() {
+ return new RWConn();
+ }
+ }
+
+ new TestClient(new RWConn().idleConnectionPruneTimeout(15)).request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + NettyClientProperties.IDLE_CONNECTION_PRUNE_TIMEOUT, 15))
+ .request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).idleConnectionPruneTimeout(15)))
+ .request().apply();
+ Assertions.assertEquals(15, result.get());
+
+ result.set(null);
+ new TestClient(new RWConn().prefix(PREFIX))
+ // NOT PER REQUEST
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ NettyConnectorProvider.config().prefix(PREFIX).idleConnectionPruneTimeout(15)))
+ .apply();
+ Assertions.assertEquals(new RWConn().copy().maxPoolIdle.get(), result.get());
+ }
+
+ @Test
+ public void testPrecedence() {
+ NettyConnectorProvider.Config.RW builderLower = NettyConnectorProvider.config().rw();
+ builderLower.maxTotalConnections(55);
+
+ NettyConnectorProvider.Config.RW builderUpper = builderLower.copy();
+ builderUpper.maxTotalConnections(56);
+ Assertions.assertEquals(56, builderUpper.maxPoolSizeTotal.get());
+
+ Client client = ClientBuilder.newClient();
+ client.property(NettyClientProperties.MAX_CONNECTIONS_TOTAL, 57);
+ NettyConnectorProvider.Config.RW result = builderUpper.fromClient(client);
+ Assertions.assertEquals(57, result.maxPoolSizeTotal.get());
+ Assertions.assertEquals(60, result.maxPoolIdle.get());
+ }
+
+ private static class ConnectorConfig extends ConnectorConfiguration<ConnectorConfig> {
+ private static class RW extends ConnectorConfiguration<RW> implements Read<RW> {
+ @Override
+ public RW instance() {
+ return new RW();
+ }
+
+ @Override
+ public RW me() {
+ return this;
+ }
+
+ public Configuration config() {
+ Map<String, Object> empty = new HashMap<>();
+ Configuration configuration = (Configuration) Proxy.newProxyInstance(
+ getClass().getClassLoader(),
+ new Class[]{Configuration.class}, new InvocationHandler() {
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ switch (method.getName()) {
+ case "getProperties":
+ return empty;
+ case "getProperty":
+ return empty.get(args[0]);
+ }
+ return null;
+ }
+ });
+
+ return configuration;
+ }
+ }
+ }
+
+ private static class RW extends NettyConnectorProvider.Config.RW {
+ @Override
+ public int connectTimeout() {
+ throw new IllegalStateException();
+ }
+ }
+
+
+ private static class TestClient {
+ private final NettyConnectorProvider.Config.RW rw;
+ private final Client client;
+
+ private TestClient(NettyConnectorProvider.Config.RW rw) {
+ this.rw = rw;
+ this.client = ClientBuilder.newClient(new ClientConfig().connectorProvider(new NettyConnectorProvider()));
+ }
+
+ public TestClient client(Consumer<Client> consumer) {
+ consumer.accept(client);
+ return this;
+ }
+
+ public TestClient rw(Consumer<NettyConnectorProvider.Config.RW> consumer) {
+ consumer.accept(rw);
+ return this;
+ }
+
+ public Request request() {
+ return new Request(client, rw);
+ }
+
+ public Request request(Consumer<ClientRequest> consumer) {
+ return request().request(consumer);
+ }
+ }
+
+ private static class Request {
+ final ClientRequest request;
+ final Client client;
+ final NettyConnectorProvider.Config.RW rw;
+ NettyConnector connector;
+
+ Request(Client client, NettyConnectorProvider.Config.RW rw) {
+ this.client = client;
+ this.rw = rw;
+ request = createRequest(client);
+ }
+
+ public Request request(Consumer<ClientRequest> consumer) {
+ consumer.accept(request);
+ return this;
+ }
+
+ public Request apply() {
+ try {
+ connector = new NettyConnector(client, rw);
+ connector.apply(request);
+ } catch (ProcessingException expected) {
+ }
+ return this;
+ }
+ }
+}
diff --git a/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/CustomConnectionControllerTest.java b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/CustomConnectionControllerTest.java
new file mode 100644
index 0000000..abf23e5
--- /dev/null
+++ b/connectors/netty-connector/src/test/java/org/glassfish/jersey/netty/connector/CustomConnectionControllerTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.netty.connector;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientRequest;
+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.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Response;
+import java.net.URI;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+public class CustomConnectionControllerTest extends JerseyTest {
+ final AtomicBoolean hit = new AtomicBoolean(false);
+
+ @Path("/")
+ public static class CustomConnectionControllerTestResource {
+ @GET
+ public String get() {
+ return "ok";
+ }
+ }
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(CustomConnectionControllerTestResource.class);
+ }
+
+ @Override
+ protected void configureClient(ClientConfig config) {
+ NettyConnectorProvider provider = NettyConnectorProvider.config().connectionController(new NettyConnectionController() {
+ @Override
+ public String getConnectionGroup(ClientRequest clientRequest, URI uri, String hostName, int port) {
+ hit.set(true);
+ return super.getConnectionGroup(clientRequest, uri, hostName, port);
+ }
+ }).build();
+
+ config.connectorProvider(provider);
+ }
+
+ @Test
+ public void testCustomConnectionControllerIsInvoked() {
+ try (Response response = target().request().get()) {
+ Assertions.assertEquals(200, response.getStatus());
+ }
+ client().close();
+ Assertions.assertEquals(true, hit.get());
+
+ }
+}
diff --git a/connectors/pom.xml b/connectors/pom.xml
index 751659a..339733d 100644
--- a/connectors/pom.xml
+++ b/connectors/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.connectors</groupId>
diff --git a/containers/glassfish/jersey-gf-ejb/pom.xml b/containers/glassfish/jersey-gf-ejb/pom.xml
index 69b559e..74036fa 100644
--- a/containers/glassfish/jersey-gf-ejb/pom.xml
+++ b/containers/glassfish/jersey-gf-ejb/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers.glassfish</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-gf-ejb</artifactId>
diff --git a/containers/glassfish/pom.xml b/containers/glassfish/pom.xml
index d90f166..f02fd71 100644
--- a/containers/glassfish/pom.xml
+++ b/containers/glassfish/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.containers.glassfish</groupId>
diff --git a/containers/grizzly2-http/pom.xml b/containers/grizzly2-http/pom.xml
index 9bfdaac..f4588f8 100644
--- a/containers/grizzly2-http/pom.xml
+++ b/containers/grizzly2-http/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-grizzly2-http</artifactId>
diff --git a/containers/grizzly2-servlet/pom.xml b/containers/grizzly2-servlet/pom.xml
index 1f9232b..0a7cfe3 100644
--- a/containers/grizzly2-servlet/pom.xml
+++ b/containers/grizzly2-servlet/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-grizzly2-servlet</artifactId>
diff --git a/containers/helidon/pom.xml b/containers/helidon/pom.xml
index 31d389c..a54fb51 100644
--- a/containers/helidon/pom.xml
+++ b/containers/helidon/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-helidon-http</artifactId>
diff --git a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainer.java b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainer.java
index 20295d6..b263a08 100644
--- a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainer.java
+++ b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainer.java
@@ -36,13 +36,17 @@
private ApplicationHandler applicationHandler;
- private HelidonJerseyBridge bridge;
-
HelidonHttpContainer(Application application, HelidonJerseyBridge bridge) {
this.applicationHandler = new ApplicationHandler(application,
new HelidonHttpContainerBinder(), bridge.getParentContext());
- this.bridge = bridge;
- webServer = bridge.getBuilder().build();
+ this.webServer = bridge.getBuilder().build();
+ bridge.setContainer(this);
+ }
+
+ HelidonHttpContainer(Class<? extends Application> applicationClass, HelidonJerseyBridge bridge) {
+ this.applicationHandler = new ApplicationHandler(applicationClass,
+ new HelidonHttpContainerBinder());
+ this.webServer = bridge.getBuilder().build();
bridge.setContainer(this);
}
@@ -108,4 +112,8 @@
public WebServerConfig prototype() {
return webServer.prototype();
}
+
+ public io.helidon.webserver.WebServer unwrap() {
+ return webServer;
+ }
}
diff --git a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerBuilder.java b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerBuilder.java
index 469baf7..98d790f 100644
--- a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerBuilder.java
+++ b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerBuilder.java
@@ -44,6 +44,8 @@
private Application application;
+ private Class<? extends Application> applicationClass;
+
private String path;
private Tls tls;
@@ -88,6 +90,11 @@
return this.application;
}
+ public HelidonHttpContainerBuilder applicationClass(Class<? extends Application> applicationClass) {
+ this.applicationClass = applicationClass;
+ return this;
+ }
+
public HelidonHttpContainerBuilder path(String path) {
this.path = path;
return this;
@@ -136,13 +143,14 @@
public HelidonHttpContainer build() {
configureBaseUri();
- webServerBuilder.config(Config.global())
+ webServerBuilder.config(Config.create())
.routing(configureRouting());
this.tls = configureTls();
if (this.tls != null) {
webServerBuilder.tls(this.tls);
}
- return new HelidonHttpContainer(application, bridge);
+ return (application == null)
+ ? new HelidonHttpContainer(applicationClass, bridge) : new HelidonHttpContainer(application, bridge);
}
private TlsConfig.Builder addSSLParameterss(TlsConfig.Builder builder) {
@@ -191,7 +199,7 @@
.host(baseUri.getHost())
.port(baseUri.getPort());
} else {
- if (webServerBuilder.port() < 0) {
+ if (webServerBuilder.port() <= 0) {
webServerBuilder.port(Container.DEFAULT_HTTP_PORT);
}
diff --git a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerProvider.java b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerProvider.java
index 7c57739..02b069f 100644
--- a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerProvider.java
+++ b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpContainerProvider.java
@@ -16,17 +16,37 @@
package org.glassfish.jersey.helidon;
-import io.helidon.webserver.WebServer;
import jakarta.ws.rs.ProcessingException;
+import jakarta.ws.rs.SeBootstrap;
import jakarta.ws.rs.core.Application;
+import org.glassfish.jersey.server.JerseySeBootstrapConfiguration;
import org.glassfish.jersey.server.spi.ContainerProvider;
+import org.glassfish.jersey.server.spi.WebServer;
+import org.glassfish.jersey.server.spi.WebServerProvider;
-public class HelidonHttpContainerProvider implements ContainerProvider {
+public class HelidonHttpContainerProvider implements ContainerProvider,
+ WebServerProvider {
@Override
public <T> T createContainer(Class<T> type, Application application) throws ProcessingException {
- if (type != WebServer.class && type != HelidonHttpContainer.class) {
+ if (type != io.helidon.webserver.WebServer.class && type != HelidonHttpContainer.class) {
return null;
}
return type.cast(new HelidonHttpContainer(application, new HelidonJerseyBridge()));
}
+
+ @Override
+ public <T extends WebServer> T createServer(Class<T> type, Application application,
+ SeBootstrap.Configuration configuration) throws ProcessingException {
+ return WebServerProvider.isSupportedWebServer(HelidonHttpServer.class, type, configuration)
+ ? type.cast(new HelidonHttpServer(application, JerseySeBootstrapConfiguration.from(configuration)))
+ : null;
+ }
+
+ @Override
+ public <T extends WebServer> T createServer(Class<T> type, Class<? extends Application> applicationClass,
+ SeBootstrap.Configuration configuration) throws ProcessingException {
+ return WebServerProvider.isSupportedWebServer(HelidonHttpServer.class, type, configuration)
+ ? type.cast(new HelidonHttpServer(applicationClass, JerseySeBootstrapConfiguration.from(configuration)))
+ : null;
+ }
}
diff --git a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpServer.java b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpServer.java
new file mode 100644
index 0000000..145bba0
--- /dev/null
+++ b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonHttpServer.java
@@ -0,0 +1,102 @@
+/*
+ * 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.helidon;
+
+import jakarta.ws.rs.core.Application;
+import org.glassfish.jersey.server.JerseySeBootstrapConfiguration;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.server.spi.Container;
+import org.glassfish.jersey.server.spi.WebServer;
+
+import javax.net.ssl.SSLParameters;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CompletionException;
+import java.util.concurrent.CompletionStage;
+
+public final class HelidonHttpServer implements WebServer {
+
+ private final HelidonHttpContainer helidonHttpContainer;
+
+ HelidonHttpServer(Application application) {
+ this(HelidonHttpContainerBuilder.builder().application(application), JerseySeBootstrapConfiguration.builder().build());
+ }
+
+ HelidonHttpServer(Application application, JerseySeBootstrapConfiguration seBootstrapConfig) {
+ this(HelidonHttpContainerBuilder.builder().application(application), seBootstrapConfig);
+ }
+
+ HelidonHttpServer(Class<? extends Application> applicationClass, JerseySeBootstrapConfiguration seBootstrapConfig) {
+ this(HelidonHttpContainerBuilder.builder().applicationClass(applicationClass), seBootstrapConfig);
+ }
+
+ HelidonHttpServer(final HelidonHttpContainerBuilder builder, JerseySeBootstrapConfiguration seBootstrapConfig) {
+ builder.uri(seBootstrapConfig.uri(false));
+ if (seBootstrapConfig.isHttps()) {
+ builder.sslContext(seBootstrapConfig.sslContext());
+ if (seBootstrapConfig.sslClientAuthentication() != null) {
+ final SSLParameters params = new SSLParameters();
+ switch (seBootstrapConfig.sslClientAuthentication()) {
+ case OPTIONAL:
+ params.setWantClientAuth(true);
+ break;
+ case MANDATORY:
+ params.setNeedClientAuth(true);
+ break;
+ }
+ builder.sslParameters(params);
+ }
+ }
+ this.helidonHttpContainer = builder.build();
+ }
+
+ @Override
+ public Container container() {
+ return helidonHttpContainer;
+ }
+
+ @Override
+ public int port() {
+ return helidonHttpContainer.port();
+ }
+
+ @Override
+ public CompletionStage<?> start() {
+ return CompletableFuture.runAsync(() -> {
+ try {
+ this.helidonHttpContainer.start();
+ } catch (final Exception e) {
+ throw new CompletionException(e);
+ }
+ });
+ }
+
+ @Override
+ public CompletionStage<?> stop() {
+ return CompletableFuture.runAsync(() -> {
+ try {
+ this.helidonHttpContainer.stop();
+ } catch (final Exception e) {
+ throw new CompletionException(e);
+ }
+ });
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> nativeClass) {
+ return nativeClass.cast(helidonHttpContainer.unwrap());
+ }
+}
diff --git a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonJerseyRoutingService.java b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonJerseyRoutingService.java
index eed3160..6bbbe55 100644
--- a/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonJerseyRoutingService.java
+++ b/containers/helidon/src/main/java/org/glassfish/jersey/helidon/HelidonJerseyRoutingService.java
@@ -25,6 +25,7 @@
import io.helidon.http.HeaderNames;
import io.helidon.http.HeaderValues;
import io.helidon.http.InternalServerException;
+import io.helidon.http.ServerResponseHeaders;
import io.helidon.http.Status;
import io.helidon.webserver.KeyPerformanceIndicatorSupport;
import io.helidon.webserver.http.HttpRules;
@@ -52,12 +53,9 @@
import java.lang.reflect.Type;
import java.net.URI;
import java.security.Principal;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.Set;
-import java.util.WeakHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
@@ -97,7 +95,7 @@
}
private ApplicationHandler appHandler() {
- return bridge.getContainer().getApplicationHandler();
+ return container().getApplicationHandler();
}
private Container container() {
@@ -117,8 +115,7 @@
@Override
public void afterStop() {
try {
- final InjectionManager ij = appHandler().getInjectionManager();
- appHandler().onShutdown(bridge.getContainer());
+ appHandler().onShutdown(container());
} catch (Exception e) {
if (LOGGER.isLoggable(System.Logger.Level.DEBUG)) {
LOGGER.log(System.Logger.Level.DEBUG, "Exception during shutdown of Jersey", e);
@@ -140,6 +137,11 @@
}
private void doHandle(final Context ctx, final ServerRequest req, final ServerResponse res) {
+ ServerResponseHeaders savedResponseHeaders = null;
+ if (req.listenerContext().config().restoreResponseHeaders()) {
+ savedResponseHeaders = ServerResponseHeaders.create(res.headers());
+ }
+
final BaseUriRequestUri uris = BaseUriRequestUri.resolve(req);
final ContainerRequest requestContext = new ContainerRequest(uris.baseUri,
uris.requestUri,
@@ -189,6 +191,9 @@
final RoutingResponse routing = (RoutingResponse) res;
if (routing.reset()) {
res.status(Status.OK_200);
+ if (savedResponseHeaders != null) {
+ savedResponseHeaders.forEach(res::header);
+ }
routing.next();
}
}
diff --git a/containers/helidon/src/test/java/org/glassfish/jersey/helidon/HelidonHttpContainerProviderTest.java b/containers/helidon/src/test/java/org/glassfish/jersey/helidon/HelidonHttpContainerProviderTest.java
new file mode 100644
index 0000000..f1c4596
--- /dev/null
+++ b/containers/helidon/src/test/java/org/glassfish/jersey/helidon/HelidonHttpContainerProviderTest.java
@@ -0,0 +1,180 @@
+/*
+ * 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.helidon;
+
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.SeBootstrap;
+import jakarta.ws.rs.SeBootstrap.Configuration.SSLClientAuthentication;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.UriBuilder;
+import org.glassfish.jersey.internal.util.PropertiesHelper;
+import org.glassfish.jersey.server.ServerProperties;
+import org.glassfish.jersey.server.spi.Container;
+import org.glassfish.jersey.server.spi.WebServer;
+import org.glassfish.jersey.server.spi.WebServerProvider;
+import org.junit.jupiter.api.Test;
+
+import javax.net.ssl.SSLContext;
+import java.security.AccessController;
+import java.security.NoSuchAlgorithmException;
+import java.util.Collections;
+import java.util.Set;
+import java.util.concurrent.CompletionStage;
+import java.util.concurrent.ExecutionException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import static java.lang.Boolean.TRUE;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.instanceOf;
+
+/**
+ * Unit tests for {@link HelidonHttpContainerProvider}.
+ *
+ */
+public final class HelidonHttpContainerProviderTest {
+
+ @Test
+ public void helidonServerProviderTest() throws InterruptedException, ExecutionException {
+ helidonContainerProvider(new ServerApplicationSingleton(), new Resource());
+ }
+
+ @Test
+ public void helidonServerClassProviderTest() throws InterruptedException, ExecutionException {
+ helidonContainerProvider(ServerApplicationSingleton.class, new Resource());
+ }
+
+ private void helidonContainerProvider(final Object application, final Resource resource)
+ throws InterruptedException, ExecutionException {
+ // given
+ final WebServerProvider webServerProvider = new HelidonHttpContainerProvider();
+ final SeBootstrap.Configuration configuration = configuration(getPort());
+
+ // when
+ final WebServer webServer = (application instanceof Application)
+ ? webServerProvider.createServer(WebServer.class, (Application) application, configuration)
+ : webServerProvider.createServer(WebServer.class, (Class<Application>) application, configuration);
+ final Object nativeHandle = webServer.unwrap(Object.class);
+ final CompletionStage<?> start = webServer.start();
+ final Object startResult = start.toCompletableFuture().get();
+ final Container container = webServer.container();
+ final int port = webServer.port();
+ final String entity = ClientBuilder.newClient()
+ .target(UriBuilder.newInstance().scheme("http").host("localhost").port(port).build()).request()
+ .get(String.class);
+ final CompletionStage<?> stop = webServer.stop();
+ final Object stopResult = stop.toCompletableFuture().get();
+
+ // then
+ assertThat(webServer, is(instanceOf(HelidonHttpServer.class)));
+ assertThat(nativeHandle, is(instanceOf(io.helidon.webserver.WebServer.class)));
+ assertThat(startResult, is(nullValue()));
+ assertThat(container, is(instanceOf(HelidonHttpContainer.class)));
+ assertThat(port, is(greaterThan(0)));
+ assertThat(entity, is(resource.toString()));
+ assertThat(stopResult, is(nullValue()));
+ }
+
+ @Path("/")
+ public static class Resource {
+ @GET
+ @Override
+ public String toString() {
+ return Resource.class.getName();
+ }
+ }
+
+ private static class ServerApplicationSingleton extends Application {
+ @Override
+ public final Set<Object> getSingletons() {
+ return Collections.singleton(new Resource());
+ }
+ }
+
+ private static final Logger LOGGER = Logger.getLogger(HelidonHttpContainerProviderTest.class.getName());
+
+ private static final int DEFAULT_PORT = 0;
+
+ private static int getPort() {
+ final String value = AccessController
+ .doPrivileged(PropertiesHelper.getSystemProperty("jersey.config.test.container.port"));
+ if (value != null) {
+ try {
+ final int i = Integer.parseInt(value);
+ if (i < 0) {
+ throw new NumberFormatException("Value is negative.");
+ }
+ return i;
+ } catch (final NumberFormatException e) {
+ LOGGER.log(Level.CONFIG,
+ "Value of 'jersey.config.test.container.port'"
+ + " property is not a valid non-negative integer [" + value + "]."
+ + " Reverting to default [" + DEFAULT_PORT + "].",
+ e);
+ }
+ }
+
+ return DEFAULT_PORT;
+ }
+
+ @Test
+ public void freePortTest() {
+ final WebServerProvider webServerProvider = new HelidonHttpContainerProvider();
+ final Application application = new Application();
+ final SeBootstrap.Configuration configuration = configuration(SeBootstrap.Configuration.FREE_PORT);
+
+ final WebServer webServer = webServerProvider.createServer(WebServer.class, application, configuration);
+ webServer.start().whenComplete((x, y) -> {
+ assertThat(webServer.port(), is(greaterThan(0)));
+ }); //Helidon returns actual port only when server is running. Otherwise, it returns -1.
+
+ webServer.stop();
+ }
+
+ private SeBootstrap.Configuration configuration(int port) {
+ return name -> {
+ switch (name) {
+ case SeBootstrap.Configuration.PROTOCOL:
+ return "HTTP";
+ case SeBootstrap.Configuration.HOST:
+ return "localhost";
+ case SeBootstrap.Configuration.PORT:
+ return port;
+ case SeBootstrap.Configuration.ROOT_PATH:
+ return "/";
+ case SeBootstrap.Configuration.SSL_CLIENT_AUTHENTICATION:
+ return SSLClientAuthentication.NONE;
+ case SeBootstrap.Configuration.SSL_CONTEXT:
+ try {
+ return SSLContext.getDefault();
+ } catch (final NoSuchAlgorithmException e) {
+ throw new RuntimeException(e);
+ }
+ case ServerProperties.WEBSERVER_AUTO_START:
+ return TRUE;
+ default:
+ return null;
+ }
+ };
+ }
+
+}
diff --git a/containers/jdk-http/pom.xml b/containers/jdk-http/pom.xml
index 892d039..b54a400 100644
--- a/containers/jdk-http/pom.xml
+++ b/containers/jdk-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-jdk-http</artifactId>
diff --git a/containers/jersey-servlet/pom.xml b/containers/jersey-servlet/pom.xml
index a8af9bb..4f87241 100644
--- a/containers/jersey-servlet/pom.xml
+++ b/containers/jersey-servlet/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-servlet</artifactId>
diff --git a/containers/jetty-http/pom.xml b/containers/jetty-http/pom.xml
index 78f0af1..a55a174 100644
--- a/containers/jetty-http/pom.xml
+++ b/containers/jetty-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-jetty-http</artifactId>
diff --git a/containers/jetty-http2/pom.xml b/containers/jetty-http2/pom.xml
index 4dde03b..2ee53bf 100644
--- a/containers/jetty-http2/pom.xml
+++ b/containers/jetty-http2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.containers</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-jetty-http2</artifactId>
diff --git a/containers/jetty-servlet/pom.xml b/containers/jetty-servlet/pom.xml
index 97f9267..7b75989 100644
--- a/containers/jetty-servlet/pom.xml
+++ b/containers/jetty-servlet/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-jetty-servlet</artifactId>
diff --git a/containers/netty-http/pom.xml b/containers/netty-http/pom.xml
index e98791e..783e510 100644
--- a/containers/netty-http/pom.xml
+++ b/containers/netty-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-container-netty-http</artifactId>
diff --git a/containers/pom.xml b/containers/pom.xml
index 4b20f53..3438276 100644
--- a/containers/pom.xml
+++ b/containers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.containers</groupId>
diff --git a/core-client/pom.xml b/core-client/pom.xml
index 93e6514..04eb6bd 100644
--- a/core-client/pom.xml
+++ b/core-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.core</groupId>
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java b/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
index 364bff0..552b1ac 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/ClientProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 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
@@ -155,6 +155,15 @@
public static final String BACKGROUND_SCHEDULER_THREADPOOL_SIZE = "jersey.config.client.backgroundScheduler.threadPoolSize";
/**
+ * The connector configuration object available through connector provider configuration methods.
+ *
+ * <p>
+ * The name of the configuration property is <tt>{@value}</tt>.
+ * </p>
+ */
+ public static final String CONNECTOR_CONFIGURATION = "jersey.config.client.ConnectorConfiguration";
+
+ /**
* If {@link org.glassfish.jersey.client.filter.EncodingFilter} is
* registered, this property indicates the value of Content-Encoding
* property the filter should be adding.
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 dd96928..b8ec60b 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
@@ -1,5 +1,5 @@
/*
- * 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
@@ -20,14 +20,12 @@
import java.net.HttpURLConnection;
import java.net.Proxy;
import java.net.URL;
-import java.util.Map;
-import java.util.logging.Logger;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.Configuration;
import org.glassfish.jersey.client.internal.HttpUrlConnector;
-import org.glassfish.jersey.client.internal.LocalizationMessages;
+import org.glassfish.jersey.client.internal.HttpUrlConnectorConfiguration;
import org.glassfish.jersey.client.spi.Connector;
import org.glassfish.jersey.client.spi.ConnectorProvider;
@@ -110,26 +108,22 @@
*/
public static final String SET_METHOD_WORKAROUND =
"jersey.config.client.httpUrlConnection.setMethodWorkaround";
- /**
- * Default connection factory to be used.
- */
- private static final ConnectionFactory DEFAULT_CONNECTION_FACTORY = new DefaultConnectionFactory();
- private static final Logger LOGGER = Logger.getLogger(HttpUrlConnectorProvider.class.getName());
-
- private ConnectionFactory connectionFactory;
- private int chunkSize;
- private boolean useFixedLengthStreaming;
- private boolean useSetMethodWorkaround;
+ protected final Config config;
/**
* Create new {@link java.net.HttpURLConnection}-based Jersey client connector provider.
*/
public HttpUrlConnectorProvider() {
- this.connectionFactory = DEFAULT_CONNECTION_FACTORY;
- this.chunkSize = ClientProperties.DEFAULT_CHUNK_SIZE;
- this.useFixedLengthStreaming = false;
- this.useSetMethodWorkaround = false;
+ this.config = new Config();
+ }
+
+ private HttpUrlConnectorProvider(Config config) {
+ this.config = config;
+ }
+
+ public static Config config() {
+ return new Config();
}
/**
@@ -140,11 +134,7 @@
* @throws java.lang.NullPointerException in case the supplied connectionFactory is {@code null}.
*/
public HttpUrlConnectorProvider connectionFactory(final ConnectionFactory connectionFactory) {
- if (connectionFactory == null) {
- throw new NullPointerException(LocalizationMessages.NULL_INPUT_PARAMETER("connectionFactory"));
- }
-
- this.connectionFactory = connectionFactory;
+ config.connectionFactory(connectionFactory);
return this;
}
@@ -164,10 +154,7 @@
* @throws java.lang.IllegalArgumentException in case the specified chunk size is negative.
*/
public HttpUrlConnectorProvider chunkSize(final int chunkSize) {
- if (chunkSize < 0) {
- throw new IllegalArgumentException(LocalizationMessages.NEGATIVE_INPUT_PARAMETER("chunkSize"));
- }
- this.chunkSize = chunkSize;
+ config.chunkSize(chunkSize);
return this;
}
@@ -183,7 +170,7 @@
* @return updated connector provider instance.
*/
public HttpUrlConnectorProvider useFixedLengthStreaming() {
- this.useFixedLengthStreaming = true;
+ config.useFixedLengthStreaming(true);
return this;
}
@@ -199,28 +186,18 @@
* @return updated connector provider instance.
*/
public HttpUrlConnectorProvider useSetMethodWorkaround() {
- this.useSetMethodWorkaround = true;
+ config.useSetMethodWorkaround(true);
return this;
}
@Override
- public Connector getConnector(final Client client, final Configuration config) {
- final Map<String, Object> properties = config.getProperties();
-
- int computedChunkSize = ClientProperties.getValue(properties,
- ClientProperties.CHUNKED_ENCODING_SIZE, chunkSize, Integer.class);
- if (computedChunkSize < 0) {
- LOGGER.warning(LocalizationMessages.NEGATIVE_CHUNK_SIZE(computedChunkSize, chunkSize));
- computedChunkSize = chunkSize;
- }
-
- final boolean computedUseFixedLengthStreaming = ClientProperties.getValue(properties,
- USE_FIXED_LENGTH_STREAMING, useFixedLengthStreaming, Boolean.class);
- final boolean computedUseSetMethodWorkaround = ClientProperties.getValue(properties,
- SET_METHOD_WORKAROUND, useSetMethodWorkaround, Boolean.class);
-
- return createHttpUrlConnector(client, connectionFactory, computedChunkSize, computedUseFixedLengthStreaming,
- computedUseSetMethodWorkaround);
+ public Connector getConnector(final Client client, final Configuration configuration) {
+ this.config.preInit(configuration);
+ return createHttpUrlConnector(client,
+ this.config.connectionFactory(),
+ this.config.chunkSize(),
+ this.config.fixLengthStreaming(),
+ this.config.setMethodWorkaround());
}
/**
@@ -230,7 +207,7 @@
* @param connectionFactory {@link javax.net.ssl.HttpsURLConnection} factory to be used when creating
* connections.
* @param chunkSize chunk size to use when using HTTP chunked transfer coding.
- * @param fixLengthStreaming specify if the the {@link java.net.HttpURLConnection#setFixedLengthStreamingMode(int)
+ * @param fixLengthStreaming specify if the {@link java.net.HttpURLConnection#setFixedLengthStreamingMode(int)
* fixed-length streaming mode} on the underlying HTTP URL connection instances should
* be used when sending requests.
* @param setMethodWorkaround specify if the reflection workaround should be used to set HTTP URL connection method
@@ -240,12 +217,33 @@
protected Connector createHttpUrlConnector(Client client, ConnectionFactory connectionFactory,
int chunkSize, boolean fixLengthStreaming,
boolean setMethodWorkaround) {
- return new HttpUrlConnector(
- client,
- connectionFactory,
- chunkSize,
- fixLengthStreaming,
- setMethodWorkaround);
+ return new HttpUrlConnector(client, client.getConfiguration(), config);
+ }
+
+ public static final class Config extends HttpUrlConnectorConfiguration<Config> {
+ public HttpUrlConnectorProvider build() {
+ return new HttpUrlConnectorProvider(this);
+ }
+
+ /* package */ ConnectionFactory connectionFactory() {
+ return connectionFactory.get();
+ }
+
+ /* package */ int chunkSize() {
+ return chunkSize.get();
+ }
+
+ /* package */ boolean fixLengthStreaming() {
+ return useFixedLengthStreaming.get();
+ }
+
+ /* package */ boolean setMethodWorkaround() {
+ return useSetMethodWorkaround.get();
+ }
+
+ /* package */ void preInit(Configuration configuration) {
+ super.preInit(configuration.getProperties());
+ }
}
/**
@@ -291,23 +289,6 @@
}
}
- private static class DefaultConnectionFactory implements ConnectionFactory {
-
- @Override
- public HttpURLConnection getConnection(final URL url) throws IOException {
- return connect(url, null);
- }
-
- @Override
- public HttpURLConnection getConnection(URL url, Proxy proxy) throws IOException {
- return connect(url, proxy);
- }
-
- private HttpURLConnection connect(URL url, Proxy proxy) throws IOException {
- return (proxy == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(proxy);
- }
- }
-
@Override
public boolean equals(final Object o) {
if (this == o) {
@@ -318,22 +299,11 @@
}
final HttpUrlConnectorProvider that = (HttpUrlConnectorProvider) o;
-
- if (chunkSize != that.chunkSize) {
- return false;
- }
- if (useFixedLengthStreaming != that.useFixedLengthStreaming) {
- return false;
- }
-
- return connectionFactory.equals(that.connectionFactory);
+ return config.equals(that.config);
}
@Override
public int hashCode() {
- int result = connectionFactory.hashCode();
- result = 31 * result + chunkSize;
- result = 31 * result + (useFixedLengthStreaming ? 1 : 0);
- return result;
+ return config.hashCode();
}
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/InvocationBuilderListenerStage.java b/core-client/src/main/java/org/glassfish/jersey/client/InvocationBuilderListenerStage.java
index 7f5d455..67bad95 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/InvocationBuilderListenerStage.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/InvocationBuilderListenerStage.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020 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
@@ -40,18 +40,18 @@
* would be created, this class is utilized.
*/
/* package */ class InvocationBuilderListenerStage {
- final Iterator<InvocationBuilderListener> invocationBuilderListenerIterator;
+ private final Iterable<InvocationBuilderListener> invocationBuilderListenerIterable;
/* package */ InvocationBuilderListenerStage(InjectionManager injectionManager) {
final RankedComparator<InvocationBuilderListener> comparator =
new RankedComparator<>(RankedComparator.Order.ASCENDING);
- invocationBuilderListenerIterator = Providers
- .getAllProviders(injectionManager, InvocationBuilderListener.class, comparator).iterator();
+ invocationBuilderListenerIterable = Providers
+ .getAllProviders(injectionManager, InvocationBuilderListener.class, comparator);
}
/* package */ void invokeListener(JerseyInvocation.Builder builder) {
- while (invocationBuilderListenerIterator.hasNext()) {
- invocationBuilderListenerIterator.next().onNewBuilder(new InvocationBuilderContextImpl(builder));
+ for (InvocationBuilderListener invocationBuilderListener : invocationBuilderListenerIterable) {
+ invocationBuilderListener.onNewBuilder(new InvocationBuilderContextImpl(builder));
}
}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/innate/ClientProxy.java b/core-client/src/main/java/org/glassfish/jersey/client/innate/ClientProxy.java
index 68ab324..1d82b06 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/innate/ClientProxy.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/innate/ClientProxy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022 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
@@ -16,8 +16,8 @@
package org.glassfish.jersey.client.innate;
import org.glassfish.jersey.client.ClientProperties;
-import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.internal.LocalizationMessages;
+import org.glassfish.jersey.internal.PropertiesResolver;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Configuration;
@@ -31,6 +31,7 @@
import java.util.Arrays;
import java.util.Base64;
import java.util.Locale;
+import java.util.Map;
import java.util.Optional;
/**
@@ -42,16 +43,20 @@
// do not instantiate
};
- public static Optional<ClientProxy> proxyFromRequest(ClientRequest request) {
+ public static Optional<ClientProxy> proxyFromRequest(PropertiesResolver request) {
return getProxy(request);
}
- public static Optional<ClientProxy> proxyFromProperties(URI requestUri) {
+ public static Optional<ClientProxy> proxyFromUri(URI requestUri) {
return getSystemPropertiesProxy(requestUri);
}
+ public static Optional<ClientProxy> proxyFromProperties(Map<String, Object> properties) {
+ return getProxy(properties);
+ }
+
public static Optional<ClientProxy> proxyFromConfiguration(Configuration configuration) {
- return getProxy(configuration);
+ return getProxy(configuration.getProperties());
}
public static ClientProxy proxy(Proxy proxy) {
@@ -103,7 +108,7 @@
return userName;
};
- private static Optional<ClientProxy> getProxy(ClientRequest request) {
+ private static Optional<ClientProxy> getProxy(PropertiesResolver request) {
Object proxyUri = request.resolveProperty(ClientProperties.PROXY_URI, Object.class);
if (proxyUri != null) {
ClientProxy proxy = toProxy(proxyUri);
@@ -118,13 +123,13 @@
return Optional.empty();
}
- private static Optional<ClientProxy> getProxy(Configuration config) {
- Object proxyUri = config.getProperties().get(ClientProperties.PROXY_URI);
+ private static Optional<ClientProxy> getProxy(Map<String, Object> properties) {
+ Object proxyUri = properties.get(ClientProperties.PROXY_URI);
if (proxyUri != null) {
ClientProxy proxy = toProxy(proxyUri);
if (proxy != null) {
- proxy.userName = ClientProperties.getValue(config.getProperties(), ClientProperties.PROXY_USERNAME, String.class);
- proxy.password = ClientProperties.getValue(config.getProperties(), ClientProperties.PROXY_PASSWORD, String.class);
+ proxy.userName = ClientProperties.getValue(properties, ClientProperties.PROXY_USERNAME, String.class);
+ proxy.password = ClientProperties.getValue(properties, ClientProperties.PROXY_PASSWORD, String.class);
return Optional.of(proxy);
} else {
return Optional.empty();
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/innate/ConnectorConfiguration.java b/core-client/src/main/java/org/glassfish/jersey/client/innate/ConnectorConfiguration.java
new file mode 100644
index 0000000..48e9244
--- /dev/null
+++ b/core-client/src/main/java/org/glassfish/jersey/client/innate/ConnectorConfiguration.java
@@ -0,0 +1,895 @@
+/*
+ * 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.client.innate;
+
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.RequestEntityProcessing;
+import org.glassfish.jersey.client.innate.http.SSLParamConfigurator;
+import org.glassfish.jersey.internal.PropertiesResolver;
+
+import javax.net.ssl.SSLContext;
+import jakarta.ws.rs.RuntimeType;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.core.Configuration;
+import jakarta.ws.rs.core.Feature;
+import java.net.Proxy;
+import java.net.URI;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
+
+/**
+ * Configuration object to use for configuring the client connectors and HTTP request processing.
+ * This configuration provides settings to be handled by the connectors, mainly declared by {@link ClientProperties}.
+ *
+ * @param <E> the connector configuration subtype.
+ */
+public class ConnectorConfiguration<E extends ConnectorConfiguration<E>> {
+ protected final NullableRef<Integer> connectTimeout = NullableRef.empty();
+ protected final NullableRef<Boolean> expect100Continue = NullableRef.empty();
+ protected final NullableRef<Long> expect100continueThreshold = NullableRef.empty();
+ protected final NullableRef<Boolean> followRedirects = NullableRef.empty();
+ protected final NullableRef<String> prefix = NullableRef.empty();
+ protected final NullableRef<Object> proxyUri = NullableRef.empty();
+ protected final NullableRef<String> proxyUserName = NullableRef.empty();
+ protected final NullableRef<String> proxyPassword = NullableRef.empty();
+ protected final NullableRef<Integer> readTimeout = NullableRef.empty();
+ protected final NullableRef<RequestEntityProcessing> requestEntityProcessing = NullableRef.empty();
+ protected final NullableRef<String> sniHostname = NullableRef.empty();
+ protected final NullableRef<Supplier<SSLContext>> sslContextSupplier = NullableRef.empty();
+ protected final NullableRef<Integer> threadPoolSize = NullableRef.empty();
+
+ /**
+ * Use factory methods provided by each connector supporting this configuration object and its subclass instead.
+ */
+ protected ConnectorConfiguration() {
+ }
+
+ /**
+ * Set the asynchronous thread-pool size. The property {@link ClientProperties#ASYNC_THREADPOOL_SIZE}
+ * has precedence over this setting.
+ *
+ * @param threadPoolSize the size of the asynchronous thread-pool.
+ * @return updated configuration.
+ */
+ public E asyncThreadPoolSize(int threadPoolSize) {
+ this.threadPoolSize.set(threadPoolSize);
+ return self();
+ }
+
+ /**
+ * Set connect timeout. The property {@link ClientProperties#CONNECT_TIMEOUT}
+ * has precedence over this setting.
+ *
+ * @param millis timeout in milliseconds.
+ * @return updated configuration.
+ */
+ public E connectTimeout(int millis) {
+ connectTimeout.set(millis);
+ return self();
+ }
+
+ /**
+ * Allows for HTTP Expect:100-Continue.
+ * The property {@link ClientProperties#EXPECT_100_CONTINUE} has precedence over this setting.
+ *
+ * @param enable allows for HTTP Expect:100-Continue or not.
+ * @return updated configuration.
+ */
+ public E expect100Continue(boolean enable) {
+ expect100Continue.set(enable);
+ return self();
+ }
+
+ /**
+ * Set the Expect:100-Continue content-length threshold size.
+ * The {@link ClientProperties#EXPECT_100_CONTINUE_THRESHOLD_SIZE} property has precedence over this setting.
+ *
+ * @param size the content-length threshold.
+ * @return updated configuration.
+ */
+ public E expect100ContinueThreshold(long size) {
+ expect100continueThreshold.set(size);
+ return self();
+ }
+
+ /**
+ * Set to follow redirects. The property {@link ClientProperties#FOLLOW_REDIRECTS} has precedence over this setting.
+ *
+ * @param follow to follow or not to follow.
+ * @return updated configuration.
+ */
+ public E followRedirects(boolean follow) {
+ followRedirects.set(follow);
+ return self();
+ }
+
+ /**
+ * <p>
+ * Set the prefix for the configuration properties used by Client/Request to configure and override the settings.
+ * For instance, if the prefix would be {@code com.example.MyProject.}, the property {@link #connectTimeout(int)}
+ * is overridden only by properties with key starting by the prefix,
+ * i.e. for {@link ClientProperties#CONNECT_TIMEOUT},
+ * the property key {@code com.example.MyProject.jersey.config.client.connectTimeout} would override the setting.
+ * </p>
+ * <p>
+ * The prefix can be used to override the settings by the System property set specifically for the
+ * prefixed connector. See {@link org.glassfish.jersey.CommonProperties#ALLOW_SYSTEM_PROPERTIES_PROVIDER}
+ * for enabling System properties usage.
+ * </p>
+ * <p>
+ * The default configuration prefix is empty.
+ * </p>
+ *
+ * @param prefix the non-null prefix.
+ * @throws NullPointerException if the prefix is null.
+ * @return updated configuration.
+ */
+ public E prefix(String prefix) {
+ this.prefix.set(Objects.requireNonNull(prefix));
+ return self();
+ }
+
+ /**
+ * Set proxy password. The property {@link ClientProperties#PROXY_PASSWORD}
+ * has precedence over this setting.
+ *
+ * @param proxyPassword the proxy password.
+ * @return updated configuration.
+ */
+ public E proxyPassword(String proxyPassword) {
+ this.proxyPassword.set(proxyPassword);
+ return self();
+ }
+
+ /**
+ * Set proxy username. The property {@link ClientProperties#PROXY_USERNAME}
+ * has precedence over this setting.
+ *
+ * @param userName the proxy username.
+ * @return updated configuration.
+ */
+ public E proxyUserName(String userName) {
+ proxyUserName.set(userName);
+ return self();
+ }
+
+ /**
+ * Set proxy URI. The property {@link ClientProperties#PROXY_URI}
+ * has precedence over this setting.
+ *
+ * @param proxyUri the proxy URI.
+ * @return updated configuration.
+ */
+ public E proxyUri(String proxyUri) {
+ this.proxyUri.set(proxyUri);
+ return self();
+ }
+
+ /**
+ * Set proxy URI. The property {@link ClientProperties#PROXY_URI}
+ * has precedence over this setting.
+ *
+ * @param proxyUri the proxy URI.
+ * @return updated configuration.
+ */
+ public E proxyUri(URI proxyUri) {
+ this.proxyUri.set(proxyUri);
+ return self();
+ }
+
+ /**
+ * Set HTTP proxy. The property {@link ClientProperties#PROXY_URI}
+ * has precedence over this setting.
+ *
+ * @param proxy the HTTP proxy.
+ * @return updated configuration.
+ */
+ public E proxy(Proxy proxy) {
+ this.proxyUri.set(proxy);
+ return self();
+ }
+
+ /**
+ * Set read timeout. The property {@link ClientProperties#READ_TIMEOUT}
+ * has precedence over this setting.
+ *
+ * @param millis timeout in milliseconds.
+ * @return updated configuration.
+ */
+ public E readTimeout(int millis) {
+ readTimeout.set(millis);
+ return self();
+ }
+
+ /**
+ * Set the request entity processing type.
+ *
+ * @param requestEntityProcessing the request entity processing type.
+ * @return the updated configuration.
+ */
+ public E requestEntityProcessing(RequestEntityProcessing requestEntityProcessing) {
+ this.requestEntityProcessing.set(requestEntityProcessing);
+ return self();
+ }
+
+ public E sniHostName(String sniHostname) {
+ this.sniHostname.set(sniHostname);
+ return self();
+ }
+
+ /**
+ * Set the {@link SSLContext} supplier. The property {@link ClientProperties#SSL_CONTEXT_SUPPLIER} has precedence over
+ * this setting.
+ *
+ * @param sslContextSupplier the {@link SSLContext} supplier.
+ * @return the updated configuration.
+ */
+ public E sslContextSupplier(Supplier<SSLContext> sslContextSupplier) {
+ this.sslContextSupplier.set(sslContextSupplier);
+ return self();
+ }
+
+ /**
+ * Return type-cast self.
+ * @return self.
+ */
+ @SuppressWarnings("unchecked")
+ protected E self() {
+ return (E) this;
+ }
+
+ /**
+ * <p>
+ * A reference to a value. The reference can be empty, but unlike the {@code Optional}, once a value is set,
+ * it never can be empty again. The {@code null} value is treated as a non-empty value of null.
+ * </p><p>
+ * This {@code null}
+ * can be used to override some previous configuration value, to distinguish the intentional {@code null} override
+ * from an empty (non-set) configuration value.
+ * </p>
+ * @param <T> type of the value.
+ */
+ protected static class NullableRef<T> implements org.glassfish.jersey.internal.util.collection.Ref<T> {
+
+ private NullableRef() {
+ // use factory methods;
+ }
+
+ /**
+ * Return a new empty reference.
+ *
+ * @return an empty reference.
+ * @param <T> The type of the empty value.
+ */
+ public static <T> NullableRef<T> empty() {
+ return new NullableRef<>();
+ }
+
+ /**
+ * Return a reference of a given value.
+ *
+ * @param value the value this reference refers to.*
+ * @return a new reference to a given value.
+ * @param <T> type of the value.
+ */
+ public static <T> NullableRef<T> of(T value) {
+ NullableRef<T> ref = new NullableRef<>();
+ ref.set(value);
+ return ref;
+ }
+
+ private boolean empty = true;
+ private T ref = null;
+
+ @Override
+ public void set(T value) {
+ empty = false;
+ ref = value;
+ }
+
+ /**
+ * Set or replace the value if other value is set.
+ * @param other a reference to another value.
+ */
+ public void setNonEmpty(NullableRef<T> other) {
+ other.ifPresent(this::set);
+ }
+
+ @Override
+ public T get() {
+ return ref;
+ }
+
+ /**
+ * Run action if and only if the condition applies.
+ *
+ * @param predicate the condition to be met.
+ * @param action the action to run if condition is met.
+ */
+ public void iff(Predicate<T> predicate, Runnable action) {
+ if (predicate.test(ref)) {
+ action.run();
+ }
+ }
+
+ /**
+ * If it is empty, sets the {@code value} value. Keeps the original value, otherwise.
+ *
+ * @param value the value to be set if empty.
+ */
+ public void ifEmptySet(T value) {
+ if (empty) {
+ set(value);
+ }
+ }
+
+ /**
+ * If a value is present, performs the given action with the value,
+ * otherwise does nothing.
+ *
+ * @param action the action to be performed, if a value is present
+ * @throws NullPointerException if value is present and the given action is
+ * {@code null}
+ */
+ public void ifPresent(Consumer<? super T> action) {
+ if (!empty) {
+ action.accept(ref);
+ }
+ }
+
+ /**
+ * If a value is present, performs the given action with the value,
+ * otherwise performs the given empty-based action.
+ *
+ * @param action the action to be performed, if a value is present
+ * @param emptyAction the empty-based action to be performed, if no value is
+ * present
+ * @throws NullPointerException if a value is present and the given action
+ * is {@code null}, or no value is present and the given empty-based
+ * action is {@code null}.
+ */
+ public void ifPresentOrElse(Consumer<? super T> action, Runnable emptyAction) {
+ if (!empty) {
+ action.accept(ref);
+ } else {
+ emptyAction.run();
+ }
+ }
+
+ /**
+ * Return the value if present, the {@code other} otherwise.
+ *
+ * @param other the value if not present
+ * @return inner value if present or the other otherwise.
+ */
+ public T ifPresentOrElse(T other) {
+ return empty ? other : ref;
+ }
+
+ /**
+ * If a value is not present, returns {@code true}, otherwise
+ * {@code false}.
+ *
+ * @return {@code true} if a value is not present, otherwise {@code false}
+ */
+ public boolean isEmpty() {
+ return empty;
+ }
+
+ /**
+ * If a value is present, returns {@code true}, otherwise {@code false}.
+ *
+ * @return {@code true} if a value is present, otherwise {@code false}
+ */
+ public boolean isPresent() {
+ return !empty;
+ }
+
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ref, empty);
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (!(o instanceof NullableRef)) {
+ return false;
+ }
+
+ NullableRef<?> that = (NullableRef<?>) o;
+ return Objects.equals(empty, that.empty) && Objects.equals(ref, that.ref);
+ }
+
+ @Override
+ public String toString() {
+ return empty ? "<empty>" : ref == null ? "<null>" : ref.toString();
+ }
+ }
+
+ protected interface Read<CC extends ConnectorConfiguration<CC> & Read<CC>>
+ extends SSLParamConfigurator.SSLParamConfiguratorConfiguration {
+
+ /**
+ * Set and replace the values of current configuration by values of other configuration
+ * if and only if the values of other configuration are set.
+ *
+ * @param other another configuration instance.
+ */
+ public default <X extends ConnectorConfiguration<?>> void setNonEmpty(X other) {
+ me().connectTimeout.setNonEmpty(other.connectTimeout);
+ me().expect100Continue.setNonEmpty(other.expect100Continue);
+ me().expect100continueThreshold.setNonEmpty(other.expect100continueThreshold);
+ me().followRedirects.setNonEmpty(other.followRedirects);
+ me().prefix.setNonEmpty(other.prefix);
+ me().proxyUri.setNonEmpty(other.proxyUri);
+ me().proxyUserName.setNonEmpty(other.proxyUserName);
+ me().proxyPassword.setNonEmpty(other.proxyPassword);
+ me().readTimeout.setNonEmpty(other.readTimeout);
+ me().requestEntityProcessing.setNonEmpty(other.requestEntityProcessing);
+ me().sniHostname.setNonEmpty(other.sniHostname);
+ me().sslContextSupplier.setNonEmpty(other.sslContextSupplier);
+ me().threadPoolSize.setNonEmpty(other.threadPoolSize);
+ }
+
+ /**
+ * Return the thread-pool size setting.
+ *
+ * @return the thread pool size setting.
+ */
+ public default Integer asyncThreadPoolSize() {
+ return me().threadPoolSize.get();
+ }
+
+ /**
+ * Update connect timeout value based on request properties settings.
+ *
+ * @param request the current HTTP client request.
+ * @return the updated configuration.
+ */
+ public default int connectTimeout(ClientRequest request) {
+ me().connectTimeout.set(
+ request.resolveProperty(prefixed(ClientProperties.CONNECT_TIMEOUT), me().connectTimeout.get())
+ );
+ return me().connectTimeout.get();
+ }
+
+ /**
+ * Get the value of connect timeout setting.
+ *
+ * @return connect timeout value.
+ */
+ public default int connectTimeout() {
+ return me().connectTimeout.get();
+ }
+
+ /**
+ * Sets the default value. The default methods cannot be set on instances passed by the customers using
+ * {@link ClientProperties#CONNECTOR_CONFIGURATION} since they would override the values previously set
+ * by the connector configuration object.
+ * @return the initialized configuration object.
+ */
+ public default CC init() {
+ me().connectTimeout(0)
+ .expect100ContinueThreshold(ClientProperties.DEFAULT_EXPECT_100_CONTINUE_THRESHOLD_SIZE)
+ .followRedirects(Boolean.TRUE)
+ .prefix("")
+ .readTimeout(0);
+ return me();
+ }
+
+ /**
+ * Utility method to create a new instance of configuration to preserve the settings of previous configuration.
+ *
+ * @return a new instance of the configuration.
+ */
+ public default CC copy() {
+ CC config = instance();
+ config.init();
+ config.setNonEmpty(me());
+ return config;
+ }
+
+ public default CC copyFromClient(Configuration configuration) {
+ CC clientConfiguration = copy();
+ final Map<String, Object> properties = configuration.getProperties();
+ Object configProp = properties.get(clientConfiguration.prefixed(ClientProperties.CONNECTOR_CONFIGURATION));
+ if (configProp != null) {
+ ConnectorConfiguration<?> clientCfg = (ConnectorConfiguration<?>) configProp;
+ if (me().prefix.equals(clientCfg.prefix) || clientCfg.prefix.get() == null) {
+ clientConfiguration.setNonEmpty(clientCfg);
+ }
+ } else {
+ configProp = properties.get(ClientProperties.CONNECTOR_CONFIGURATION);
+ if (configProp != null && me().prefix.equals(((ConnectorConfiguration<?>) configProp).prefix)) {
+ clientConfiguration.setNonEmpty((ConnectorConfiguration<?>) configProp);
+ }
+ }
+ return clientConfiguration;
+ }
+
+ public default CC copyFromRequest(ClientRequest request) {
+ CC requestConfiguration = copy();
+ Object configProp = request.getProperty(prefixed(ClientProperties.CONNECTOR_CONFIGURATION));
+ if (configProp != null) {
+ ConnectorConfiguration<?> requestCfg = (ConnectorConfiguration<?>) configProp;
+ if (me().prefix.equals(requestCfg.prefix) || requestCfg.prefix.get() == null) {
+ requestConfiguration.setNonEmpty(requestCfg);
+ }
+ } else {
+ configProp = request.getProperty(ClientProperties.CONNECTOR_CONFIGURATION);
+ if (configProp != null && me().prefix.equals(((ConnectorConfiguration<?>) configProp).prefix)) {
+ requestConfiguration.setNonEmpty((ConnectorConfiguration<?>) configProp);
+ }
+ }
+ return requestConfiguration;
+ }
+
+ @Override
+ default String getSniHostNameProperty(Configuration configuration) {
+ Object property = configuration.getProperty(prefixed(ClientProperties.SNI_HOST_NAME));
+ if (property == null) {
+ property = configuration.getProperty(prefixed(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT)));
+ }
+ return property == null ? me().sniHostname.get() : (String) property;
+ }
+
+ /**
+ * Update the {@link #expect100Continue(boolean)} from the HTTP client request.
+ *
+ * @param request the HTTP client request.
+ * @return the Expect: 100-Continue support value.
+ */
+ public default Boolean expect100Continue(ClientRequest request) {
+ final Boolean expectContinueActivated =
+ request.resolveProperty(prefixed(ClientProperties.EXPECT_100_CONTINUE), Boolean.class);
+ if (expectContinueActivated != null) {
+ me().expect100Continue.set(expectContinueActivated);
+ }
+ return me().expect100Continue.get();
+ }
+
+ /**
+ * Update the {@link #expect100ContinueThreshold(long)} from the HTTP client request.
+ *
+ * @param request the HTTP client request.
+ * @return the content length threshold size.
+ */
+ public default long expect100ContinueThreshold(ClientRequest request) {
+ me().expect100continueThreshold.set(
+ request.resolveProperty(prefixed(ClientProperties.EXPECT_100_CONTINUE_THRESHOLD_SIZE),
+ me().expect100continueThreshold.get())
+ );
+ return me().expect100continueThreshold.get();
+ }
+
+ /**
+ * Update the {@link #followRedirects(boolean)} setting from the HTTP client request. The default is {@code true}.
+ *
+ * @param request the HTTP client request.
+ * @return follow redirects setting.
+ */
+ public default boolean followRedirects(ClientRequest request) {
+ me().followRedirects.set(
+ request.resolveProperty(prefixed(ClientProperties.FOLLOW_REDIRECTS), me().followRedirects.get())
+ );
+ return me().followRedirects.get();
+ }
+
+ /**
+ * Get the value of the follow redirects setting. The default is {@code true}.
+ *
+ * @return whether to follow redirects or not.
+ */
+ public default boolean followRedirects() {
+ return me().followRedirects.get();
+ }
+
+ public default Configuration prefixedConfiguration(Configuration configuration) {
+ return me().prefix.get().isEmpty() ? configuration : new PrefixedConfiguration(me().prefix.get(), configuration);
+ }
+
+ /**
+ * Create optional client proxy information based on the proxy information set in the configuration
+ * or the HTTP client request. The used settings are {@link #proxy(Proxy)},
+ * {@link #proxyUri(URI)}, {@link #proxyUri(String)}, {@link #proxyUserName(String)},
+ * and {@link #proxyPassword(String)}.
+ *
+ * @param request the HTTP client request,
+ * @param requestUri the HTTP request URI. It can differ from the URI used in the request, based on other
+ * information set by the HTTP client request.
+ * @return the optional client proxy.
+ */
+ public default Optional<ClientProxy> proxy(ClientRequest request, URI requestUri) {
+ Optional<ClientProxy> proxy = ClientProxy.proxyFromRequest(
+ me().prefix.get().isEmpty()
+ ? request
+ : new PrefixedPropertiesResolver(me().prefix.get(), request)
+ );
+ if (!proxy.isPresent() && me().proxyUri.isPresent()) {
+ final Map<String, Object> properties = me().prefix.get().isEmpty()
+ ? new HashMap<>()
+ : new PrefixedMap<>(me().prefix.get(), new HashMap<>());
+ properties.put(me().prefix.get() + ClientProperties.PROXY_URI, me().proxyUri.get());
+ properties.put(me().prefix.get() + ClientProperties.PROXY_USERNAME, me().proxyUserName.get());
+ properties.put(me().prefix.get() + ClientProperties.PROXY_PASSWORD, me().proxyPassword.get());
+ request.getPropertyNames().forEach(k -> properties.put(k, request.getProperty(k)));
+ proxy = ClientProxy.proxyFromProperties(properties);
+ }
+ if (!proxy.isPresent()) {
+ proxy = ClientProxy.proxyFromUri(requestUri);
+ }
+ return proxy;
+ }
+
+ /**
+ * Update {@link #readTimeout(int) read timeout} based on the HTTP request properties.
+ *
+ * @param request the current HTTP client request.
+ * @return updated configuration.
+ */
+ public default CC readTimeout(ClientRequest request) {
+ me().readTimeout.set(request.resolveProperty(prefixed(ClientProperties.READ_TIMEOUT), me().readTimeout.get()));
+ return me();
+ }
+
+ /**
+ * Get the value of preset {@link #readTimeout(int)}.
+ *
+ * @return the read timeout milliseconds.
+ */
+ public default int readTimeout() {
+ return me().readTimeout.get();
+ }
+
+ /**
+ * Get the {@link RequestEntityProcessing} updated by the HTTP client request.
+ *
+ * @param request the HTTP client request.
+ * @return the RequestEntityProcessing type.
+ */
+ public default RequestEntityProcessing requestEntityProcessing(ClientRequest request) {
+ RequestEntityProcessing entityProcessing =
+ request.resolveProperty(prefixed(ClientProperties.REQUEST_ENTITY_PROCESSING), RequestEntityProcessing.class);
+ if (entityProcessing == null) {
+ entityProcessing = me().requestEntityProcessing.get();
+ }
+ return entityProcessing;
+ }
+
+ @Override
+ default String resolveSniHostNameProperty(PropertiesResolver resolver) {
+ String property = resolver.resolveProperty(prefixed(ClientProperties.SNI_HOST_NAME), String.class);
+ if (property == null) {
+ property = resolver.resolveProperty(
+ prefixed(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT)), String.class);
+ }
+ return property == null ? me().sniHostname.get() : property;
+ }
+
+ /**
+ * Get {@link SSLContext} either from the {@link ClientProperties#SSL_CONTEXT_SUPPLIER}, or from this configuration,
+ * or from the {@link Client#getSslContext()} in this order.
+ *
+ * @param client the client used to get the {@link SSLContext}.
+ * @param request the request used to get the {@link SSLContext}.
+ * @return the {@link SSLContext}.
+ */
+ public default SSLContext sslContext(Client client, ClientRequest request) {
+ @SuppressWarnings("unchecked")
+ Supplier<SSLContext> supplier =
+ request.resolveProperty(prefixed(ClientProperties.SSL_CONTEXT_SUPPLIER), Supplier.class);
+ if (supplier == null) {
+ supplier = me().sslContextSupplier.get();
+ }
+ return supplier == null ? client.getSslContext() : supplier.get();
+ }
+
+ public default String prefixed(String propertyName) {
+ return me().prefix.get() + propertyName;
+ }
+
+ /**
+ * Return a new instance of configuration.
+ * @return a new instance of configuration.
+ */
+ public CC instance();
+
+ /**
+ * Return typed-cast self.
+ * @return self.
+ */
+ public CC me();
+ }
+
+
+ /**
+ * A properties map that works with prefixed properties.
+ *
+ * @param <V> Object type.
+ */
+ private static class PrefixedMap<V> implements Map<String, V> {
+ private final Map<String, V> inner;
+ private final String prefix;
+
+ private PrefixedMap(String prefix, Map<String, V> inner) {
+ this.inner = inner;
+ this.prefix = prefix;
+ }
+
+ @Override
+ public int size() {
+ return inner.size();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return inner.isEmpty();
+ }
+
+ @Override
+ public boolean containsKey(Object key) {
+ return inner.containsKey(prefix + key);
+ }
+
+ @Override
+ public boolean containsValue(Object value) {
+ return inner.containsValue(value);
+ }
+
+ @Override
+ public V get(Object key) {
+ return inner.get(prefix + key);
+ }
+
+ @Override
+ public V put(String key, V value) {
+ return inner.put(key, value);
+ }
+
+ @Override
+ public V remove(Object key) {
+ return inner.remove(prefix + key);
+ }
+
+ @Override
+ public void putAll(Map<? extends String, ? extends V> m) {
+ inner.putAll(m);
+ }
+
+ @Override
+ public void clear() {
+ inner.clear();
+ }
+
+ @Override
+ public Set<String> keySet() {
+ return inner.keySet();
+ }
+
+ @Override
+ public Collection<V> values() {
+ return inner.values();
+ }
+
+ @Override
+ public Set<Entry<String, V>> entrySet() {
+ return inner.entrySet();
+ }
+ }
+
+ /**
+ * Properties resolver that resolves prefixed properties.
+ */
+ private static class PrefixedPropertiesResolver implements PropertiesResolver {
+ private final String prefix;
+ private final PropertiesResolver resolver;
+
+ private PrefixedPropertiesResolver(String prefix, PropertiesResolver resolver) {
+ this.prefix = prefix;
+ this.resolver = resolver;
+ }
+
+ @Override
+ public <T> T resolveProperty(String name, Class<T> type) {
+ return resolver.resolveProperty(prefix + name, type);
+ }
+
+ @Override
+ public <T> T resolveProperty(String name, T defaultValue) {
+ return resolver.resolveProperty(prefix + name, defaultValue);
+ }
+ }
+
+ protected static class PrefixedConfiguration implements Configuration {
+ private final String prefix;
+ private final Configuration inner;
+
+ private PrefixedConfiguration(String prefix, Configuration inner) {
+ this.prefix = prefix;
+ this.inner = inner;
+ }
+
+ @Override
+ public RuntimeType getRuntimeType() {
+ return inner.getRuntimeType();
+ }
+
+ @Override
+ public Map<String, Object> getProperties() {
+ return new PrefixedMap<>(prefix, inner.getProperties());
+ }
+
+ @Override
+ public Object getProperty(String name) {
+ return inner.getProperty(prefix + name);
+ }
+
+ @Override
+ public Collection<String> getPropertyNames() {
+ return inner.getPropertyNames();
+ }
+
+ @Override
+ public boolean isEnabled(Feature feature) {
+ return inner.isEnabled(feature);
+ }
+
+ @Override
+ public boolean isEnabled(Class<? extends Feature> featureClass) {
+ return inner.isEnabled(featureClass);
+ }
+
+ @Override
+ public boolean isRegistered(Object component) {
+ return inner.isRegistered(component);
+ }
+
+ @Override
+ public boolean isRegistered(Class<?> componentClass) {
+ return inner.isRegistered(componentClass);
+ }
+
+ @Override
+ public Map<Class<?>, Integer> getContracts(Class<?> componentClass) {
+ return inner.getContracts(componentClass);
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return inner.getClasses();
+ }
+
+ @Override
+ public Set<Object> getInstances() {
+ return inner.getInstances();
+ }
+ }
+}
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/innate/http/SSLParamConfigurator.java b/core-client/src/main/java/org/glassfish/jersey/client/innate/http/SSLParamConfigurator.java
index 67d4a63..6667213 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/innate/http/SSLParamConfigurator.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/innate/http/SSLParamConfigurator.java
@@ -20,7 +20,6 @@
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.http.HttpHeaders;
import org.glassfish.jersey.internal.PropertiesResolver;
-import org.glassfish.jersey.internal.guava.InetAddresses;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLParameters;
@@ -52,6 +51,11 @@
private String sniHostNameHeader = null;
private String sniHostPrecedence = null;
private boolean setAlways = false;
+ private final SSLParamConfiguratorConfiguration configConfiguration;
+
+ public Builder(SSLParamConfiguratorConfiguration configuration) {
+ this.configConfiguration = configuration;
+ }
/**
@@ -61,7 +65,7 @@
*/
public Builder request(ClientRequest clientRequest) {
this.sniHostNameHeader = getSniHostNameHeader(clientRequest.getHeaders());
- this.sniHostPrecedence = resolveSniHostNameProperty(clientRequest);
+ this.sniHostPrecedence = configConfiguration.resolveSniHostNameProperty(clientRequest);
this.uri = clientRequest.getUri();
return this;
}
@@ -72,7 +76,7 @@
* @return the builder instance
*/
public Builder configuration(Configuration configuration) {
- this.sniHostPrecedence = getSniHostNameProperty(configuration);
+ this.sniHostPrecedence = this.configConfiguration.getSniHostNameProperty(configuration);
return this;
}
@@ -141,7 +145,7 @@
* @return the builder instance.
*/
public Builder setSNIHostName(Configuration configuration) {
- return setSNIHostName(getSniHostNameProperty(configuration));
+ return setSNIHostName(this.configConfiguration.getSniHostNameProperty(configuration));
}
/**
@@ -160,7 +164,7 @@
* @return the builder instance.
*/
public Builder setSNIHostName(PropertiesResolver resolver) {
- return setSNIHostName(resolveSniHostNameProperty(resolver));
+ return setSNIHostName(configConfiguration.resolveSniHostNameProperty(resolver));
}
/**
@@ -180,22 +184,6 @@
final String hostHeader = hostHeaders.get(0).toString();
return hostHeader;
}
-
- private static String resolveSniHostNameProperty(PropertiesResolver resolver) {
- String property = resolver.resolveProperty(ClientProperties.SNI_HOST_NAME, String.class);
- if (property == null) {
- property = resolver.resolveProperty(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT), String.class);
- }
- return property;
- }
-
- private static String getSniHostNameProperty(Configuration configuration) {
- Object property = configuration.getProperty(ClientProperties.SNI_HOST_NAME);
- if (property == null) {
- property = configuration.getProperty(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT));
- }
- return (String) property;
- }
}
private SSLParamConfigurator(SSLParamConfigurator.Builder builder) {
@@ -212,7 +200,14 @@
* Create a new instance of TlsSupport class
**/
public static SSLParamConfigurator.Builder builder() {
- return new SSLParamConfigurator.Builder();
+ return new SSLParamConfigurator.Builder(DEFAULT_CONFIGURATION);
+ }
+
+ /**
+ * Create a new instance of TlsSupport class
+ **/
+ public static SSLParamConfigurator.Builder builder(SSLParamConfiguratorConfiguration configuration) {
+ return new SSLParamConfigurator.Builder(configuration);
}
/**
@@ -299,4 +294,25 @@
sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
sslEngine.setSSLParameters(sslParameters);
}
+
+ public static interface SSLParamConfiguratorConfiguration {
+ public default String getSniHostNameProperty(Configuration configuration) {
+ Object property = configuration.getProperty(ClientProperties.SNI_HOST_NAME);
+ if (property == null) {
+ property = configuration.getProperty(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT));
+ }
+ return (String) property;
+ }
+
+ public default String resolveSniHostNameProperty(PropertiesResolver resolver) {
+ String property = resolver.resolveProperty(ClientProperties.SNI_HOST_NAME, String.class);
+ if (property == null) {
+ property = resolver.resolveProperty(ClientProperties.SNI_HOST_NAME.toLowerCase(Locale.ROOT), String.class);
+ }
+ return property;
+ }
+ }
+
+ private static final SSLParamConfiguratorConfiguration DEFAULT_CONFIGURATION = new SSLParamConfiguratorConfiguration() {
+ };
}
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 630cb96..e1fd816 100644
--- a/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java
+++ b/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnector.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 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
@@ -52,6 +52,7 @@
import javax.net.ssl.SSLSocketFactory;
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;
@@ -81,7 +82,6 @@
public class HttpUrlConnector implements Connector {
private static final Logger LOGGER = Logger.getLogger(HttpUrlConnector.class.getName());
- 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 LazyValue<SSLSocketFactory> DEFAULT_SSL_SOCKET_FACTORY =
@@ -110,11 +110,7 @@
}
}
- private final HttpUrlConnectorProvider.ConnectionFactory connectionFactory;
- private final int chunkSize;
- private final boolean fixLengthStreaming;
- private final boolean setMethodWorkaround;
- private final boolean isRestrictedHeaderPropertySet;
+ private final HttpUrlConnectorConfiguration.ReadWrite clientConfig;
private Value<SSLSocketFactory> sslSocketFactory;
// SSLContext#getSocketFactory not idempotent
@@ -131,7 +127,7 @@
* @param client JAX-RS client instance for which the connector is being created.
* @param connectionFactory {@link javax.net.ssl.HttpsURLConnection} factory to be used when creating connections.
* @param chunkSize chunk size to use when using HTTP chunked transfer coding.
- * @param fixLengthStreaming specify if the the {@link java.net.HttpURLConnection#setFixedLengthStreamingMode(int)
+ * @param fixLengthStreaming specify if the {@link java.net.HttpURLConnection#setFixedLengthStreamingMode(int)
* fixed-length streaming mode} on the underlying HTTP URL connection instances should be
* used when sending requests.
* @param setMethodWorkaround specify if the reflection workaround should be used to set HTTP URL connection method
@@ -144,29 +140,23 @@
final boolean fixLengthStreaming,
final boolean setMethodWorkaround) {
- this.connectionFactory = connectionFactory;
- this.chunkSize = chunkSize;
- this.fixLengthStreaming = fixLengthStreaming;
- this.setMethodWorkaround = setMethodWorkaround;
+ this(client, client.getConfiguration(),
+ HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .chunkSize(chunkSize)
+ .useFixedLengthStreaming(fixLengthStreaming)
+ .useSetMethodWorkaround(setMethodWorkaround)
+ );
+ }
+ public HttpUrlConnector(Client client, Configuration configuration, HttpUrlConnectorConfiguration<?> config) {
+ this.clientConfig = config.rw().fromClient(configuration);
this.sslSocketFactory = Values.lazy(new Value<SSLSocketFactory>() {
@Override
public SSLSocketFactory get() {
return client.getSslContext().getSocketFactory();
}
});
-
- // check if sun.net.http.allowRestrictedHeaders system property has been set and log the result
- // the property is being cached in the HttpURLConnection, so this is only informative - there might
- // already be some connection(s), that existed before the property was set/changed.
- isRestrictedHeaderPropertySet = Boolean.valueOf(AccessController.doPrivileged(
- PropertiesHelper.getSystemProperty(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY, "false")
- ));
-
- LOGGER.config(isRestrictedHeaderPropertySet
- ? LocalizationMessages.RESTRICTED_HEADER_PROPERTY_SETTING_TRUE(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY)
- : LocalizationMessages.RESTRICTED_HEADER_PROPERTY_SETTING_FALSE(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY)
- );
}
private static InputStream getInputStream(final HttpURLConnection uc, final ClientRequest clientRequest) throws IOException {
@@ -342,9 +332,15 @@
* @param clientRequest the actual client request.
* @param uc http connection to be secured.
*/
- private void secureConnection(
- final ClientRequest clientRequest, final HttpURLConnection uc, final SSLParamConfigurator sniConfig) {
- setSslContextFactory(clientRequest.getClient(), clientRequest);
+ private void secureConnection(final ClientRequest clientRequest,
+ final HttpURLConnection uc,
+ final SSLParamConfigurator sniConfig,
+ final HttpUrlConnectorConfiguration.ReadWrite config) {
+ if (config.isSslContextSupplier() || config.isPrefixed()) {
+ setSslContextFactory(clientRequest.getClient(), clientRequest, config.sslContext(clientRequest));
+ } else {
+ setSslContextFactory(clientRequest.getClient(), clientRequest);
+ }
secureConnection(clientRequest.getClient(), uc); // keep this for compatibility
if (sniConfig.isSNIRequired() && uc instanceof HttpsURLConnection) { // set SNI
@@ -355,9 +351,17 @@
}
}
+ @Deprecated
protected void setSslContextFactory(Client client, ClientRequest request) {
- final Supplier<SSLContext> supplier = request.resolveProperty(ClientProperties.SSL_CONTEXT_SUPPLIER, Supplier.class);
+ setSslContextFactory(client, request, request.resolveProperty(ClientProperties.SSL_CONTEXT_SUPPLIER, Supplier.class));
+ }
+ protected void setSslContextFactory(Client client, ClientRequest request,
+ HttpUrlConnectorConfiguration.ReadWrite requestConfig) {
+ setSslContextFactory(client, request, requestConfig.sslContext(request));
+ }
+
+ private void setSslContextFactory(Client client, ClientRequest request, Supplier<SSLContext> supplier) {
if (supplier != null) {
sslSocketFactory = Values.lazy(new Value<SSLSocketFactory>() { // lazy for double-check locking if multiple requests
@Override
@@ -375,9 +379,10 @@
}
private ClientResponse _apply(final ClientRequest request) throws IOException {
+ HttpUrlConnectorConfiguration.ReadWrite requestConfiguration = clientConfig.fromRequest(request);
+
final HttpURLConnection uc;
- final Optional<ClientProxy> proxy = ClientProxy.proxyFromRequest(request);
- final SSLParamConfigurator sniConfig = SSLParamConfigurator.builder().request(request)
+ final SSLParamConfigurator sniConfig = SSLParamConfigurator.builder(requestConfiguration).request(request)
.setSNIHostName(request).build();
final URI sniUri;
if (sniConfig.isSNIRequired()) {
@@ -391,39 +396,45 @@
DEFAULT_SSL_SOCKET_FACTORY.get();
}
+ final Optional<ClientProxy> proxy = requestConfiguration.proxy(request, sniUri);
proxy.ifPresent(clientProxy -> ClientProxy.setBasicAuthorizationHeader(request.getHeaders(), proxy.get()));
- uc = this.connectionFactory.getConnection(sniUri.toURL(), proxy.isPresent() ? proxy.get().proxy() : null);
+ uc = ((Supplier<HttpUrlConnectorProvider.ConnectionFactory>) requestConfiguration.connectionFactory)
+ .get().getConnection(sniUri.toURL(), proxy.isPresent() ? proxy.get().proxy() : null);
uc.setDoInput(true);
final String httpMethod = request.getMethod();
- if (request.resolveProperty(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, setMethodWorkaround)) {
+ if (requestConfiguration.isMethodWorkaround(request)) {
setRequestMethodViaJreBugWorkaround(uc, httpMethod);
} else {
uc.setRequestMethod(httpMethod);
}
- uc.setInstanceFollowRedirects(request.resolveProperty(ClientProperties.FOLLOW_REDIRECTS, true));
+ uc.setInstanceFollowRedirects(requestConfiguration.followRedirects(request));
- uc.setConnectTimeout(request.resolveProperty(ClientProperties.CONNECT_TIMEOUT, uc.getConnectTimeout()));
+ if (requestConfiguration.connectTimeout() == 0) {
+ requestConfiguration.connectTimeout(uc.getConnectTimeout());
+ }
+ uc.setConnectTimeout(requestConfiguration.connectTimeout(request));
- uc.setReadTimeout(request.resolveProperty(ClientProperties.READ_TIMEOUT, uc.getReadTimeout()));
+ if (requestConfiguration.readTimeout() == 0) {
+ requestConfiguration.readTimeout(uc.getReadTimeout());
+ }
+ uc.setReadTimeout(requestConfiguration.readTimeout(request).readTimeout());
- secureConnection(request, uc, sniConfig);
+ secureConnection(request, uc, sniConfig, requestConfiguration);
final Object entity = request.getEntity();
Exception storedException = null;
try {
if (entity != null) {
- RequestEntityProcessing entityProcessing = request.resolveProperty(
- ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.class);
-
+ RequestEntityProcessing entityProcessing = requestConfiguration.requestEntityProcessing(request);
final long length = request.getLengthLong();
- if (entityProcessing == null || entityProcessing != RequestEntityProcessing.BUFFERED) {
- if (fixLengthStreaming && length > 0) {
+ if (entityProcessing != RequestEntityProcessing.BUFFERED) {
+ if (requestConfiguration.useFixedLengthStreaming.get() && length > 0) {
uc.setFixedLengthStreamingMode(length);
} else if (entityProcessing == RequestEntityProcessing.CHUNKED) {
- uc.setChunkedStreamingMode(chunkSize);
+ uc.setChunkedStreamingMode(requestConfiguration.chunkSize.get());
}
}
uc.setDoOutput(true);
@@ -438,13 +449,13 @@
processExtensions(request, uc);
request.setStreamProvider(contentLength -> {
- setOutboundHeaders(request.getStringHeaders(), uc);
+ setOutboundHeaders(request.getStringHeaders(), uc, requestConfiguration);
return uc.getOutputStream();
});
request.writeEntity();
} else {
- setOutboundHeaders(request.getStringHeaders(), uc);
+ setOutboundHeaders(request.getStringHeaders(), uc, requestConfiguration);
}
} catch (IOException ioe) {
storedException = handleException(request, ioe, uc);
@@ -496,7 +507,9 @@
return responseContext;
}
- private void setOutboundHeaders(MultivaluedMap<String, String> headers, HttpURLConnection uc) {
+ private void setOutboundHeaders(MultivaluedMap<String, String> headers,
+ HttpURLConnection uc,
+ HttpUrlConnectorConfiguration.ReadWrite requestConfiguration) {
boolean restrictedSent = false;
for (Map.Entry<String, List<String>> header : headers.entrySet()) {
String headerName = header.getKey();
@@ -520,14 +533,15 @@
uc.setRequestProperty(headerName, headerValue);
}
// if (at least one) restricted header was added and the allowRestrictedHeaders
- if (!isRestrictedHeaderPropertySet && !restrictedSent) {
+ if (!requestConfiguration.isRestrictedHeaderPropertySet.get() && !restrictedSent) {
if (isHeaderRestricted(headerName, headerValue)) {
restrictedSent = true;
}
}
}
if (restrictedSent) {
- LOGGER.warning(LocalizationMessages.RESTRICTED_HEADER_POSSIBLY_IGNORED(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY));
+ LOGGER.warning(LocalizationMessages.RESTRICTED_HEADER_POSSIBLY_IGNORED(
+ HttpUrlConnectorConfiguration.ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY));
}
}
@@ -635,7 +649,7 @@
private static class SniSSLSocketFactory extends SSLSocketFactory {
private final SSLSocketFactory socketFactory;
- private ThreadLocal<SSLParamConfigurator> sniConfigs = new ThreadLocal<>();
+ private final ThreadLocal<SSLParamConfigurator> sniConfigs = new ThreadLocal<>();
public void setSniConfig(SSLParamConfigurator sniConfigs) {
this.sniConfigs.set(sniConfigs);
diff --git a/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnectorConfiguration.java b/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnectorConfiguration.java
new file mode 100644
index 0000000..20c31f7
--- /dev/null
+++ b/core-client/src/main/java/org/glassfish/jersey/client/internal/HttpUrlConnectorConfiguration.java
@@ -0,0 +1,312 @@
+/*
+ * 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.client.internal;
+
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.HttpUrlConnectorProvider;
+import org.glassfish.jersey.client.innate.ConnectorConfiguration;
+import org.glassfish.jersey.internal.util.PropertiesHelper;
+import org.glassfish.jersey.internal.util.collection.Ref;
+
+import javax.net.ssl.SSLContext;
+import jakarta.ws.rs.core.Configuration;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.Proxy;
+import java.net.URL;
+import java.security.AccessController;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.Supplier;
+import java.util.logging.Logger;
+
+public abstract class HttpUrlConnectorConfiguration<C extends HttpUrlConnectorConfiguration<C>>
+ extends ConnectorConfiguration<C> {
+ private static final Logger LOGGER = Logger.getLogger(HttpUrlConnectorConfiguration.class.getName());
+ /* package */ static final String ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY = "sun.net.http.allowRestrictedHeaders";
+ /**
+ * Default connection factory to be used.
+ */
+ protected static final HttpUrlConnectorProvider.ConnectionFactory DEFAULT_CONNECTION_FACTORY =
+ new DefaultConnectionFactory();
+
+ protected NullableRef<HttpUrlConnectorProvider.ConnectionFactory> connectionFactory = NullableRef.empty();
+ protected Ref<Integer> chunkSize = NullableRef.empty();
+ /* package */ Ref<Boolean> isRestrictedHeaderPropertySet = NullableRef.empty();
+ protected Ref<Boolean> useFixedLengthStreaming = NullableRef.empty();
+ protected Ref<Boolean> useSetMethodWorkaround = NullableRef.empty();
+
+ protected void preInit(Map<String, Object> properties) {
+ connectionFactory.ifEmptySet(DEFAULT_CONNECTION_FACTORY);
+ ((NullableRef<Integer>) chunkSize).ifEmptySet(ClientProperties.DEFAULT_CHUNK_SIZE);
+ ((NullableRef<Boolean>) useFixedLengthStreaming).ifEmptySet(Boolean.FALSE);
+ ((NullableRef<Boolean>) useSetMethodWorkaround).ifEmptySet(Boolean.FALSE);
+
+ int computedChunkSize = ClientProperties.getValue(properties,
+ _prefixed(ClientProperties.CHUNKED_ENCODING_SIZE), chunkSize.get(), Integer.class);
+ if (computedChunkSize < 0) {
+ LOGGER.warning(LocalizationMessages.NEGATIVE_CHUNK_SIZE(computedChunkSize, chunkSize.get()));
+ } else {
+ chunkSize.set(computedChunkSize);
+ }
+
+ useFixedLengthStreaming(ClientProperties.getValue(properties,
+ _prefixed(HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING),
+ useFixedLengthStreaming.get(), Boolean.class));
+ useSetMethodWorkaround(ClientProperties.getValue(properties,
+ _prefixed(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND),
+ useSetMethodWorkaround.get(), Boolean.class));
+ }
+
+ private String _prefixed(String property) {
+ return prefix.ifPresentOrElse("") + property;
+ }
+
+ /**
+ * Set a custom {@link java.net.HttpURLConnection} factory.
+ *
+ * @param connectionFactory custom HTTP URL connection factory. Must not be {@code null}.
+ * @return updated configuration.
+ * @throws java.lang.NullPointerException in case the supplied connectionFactory is {@code null}.
+ */
+ public C connectionFactory(final HttpUrlConnectorProvider.ConnectionFactory connectionFactory) {
+ if (connectionFactory == null) {
+ throw new NullPointerException(LocalizationMessages.NULL_INPUT_PARAMETER("connectionFactory"));
+ }
+
+ this.connectionFactory.set(connectionFactory);
+ return self();
+ }
+
+ /**
+ * Set chunk size for requests transferred using a
+ * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1">HTTP chunked transfer coding</a>.
+ *
+ * If no value is set, the default chunk size of 4096 bytes will be used.
+ * <p>
+ * Note that this programmatically set value can be overridden by
+ * setting the {@link org.glassfish.jersey.client.ClientProperties#CHUNKED_ENCODING_SIZE} property
+ * specified in the Jersey client instance configuration.
+ * </p>
+ *
+ * @param chunkSize chunked transfer coding chunk size to be used.
+ * @return updated configuration.
+ * @throws java.lang.IllegalArgumentException in case the specified chunk size is negative.
+ */
+ public C chunkSize(final int chunkSize) {
+ if (chunkSize < 0) {
+ throw new IllegalArgumentException(LocalizationMessages.NEGATIVE_INPUT_PARAMETER("chunkSize"));
+ }
+ this.chunkSize.set(chunkSize);
+ return self();
+ }
+
+ /**
+ * Instruct the provided connectors to use the {@link java.net.HttpURLConnection#setFixedLengthStreamingMode(int)
+ * fixed-length streaming mode} on the underlying HTTP URL connection instance when sending requests.
+ * See {@link HttpUrlConnectorProvider#USE_FIXED_LENGTH_STREAMING} property documentation for more details.
+ * <p>
+ * Note that this programmatically set value can be overridden by
+ * setting the {@code USE_FIXED_LENGTH_STREAMING} property specified in the Jersey client instance configuration.
+ * </p>
+ *
+ * @return updated configuration.
+ */
+ public C useFixedLengthStreaming(boolean use) {
+ this.useFixedLengthStreaming.set(use);
+ return self();
+ }
+
+ /**
+ * Instruct the provided connectors to use reflection when setting the
+ * HTTP method value. See {@link HttpUrlConnectorProvider#SET_METHOD_WORKAROUND} property documentation for more details.
+ * <p>
+ * Note that this programmatically set value can be overridden by
+ * setting the {@code SET_METHOD_WORKAROUND} property specified in the Jersey client instance configuration
+ * or in the request properties.
+ * </p>
+ *
+ * @return updated configuration.
+ */
+ public C useSetMethodWorkaround(boolean use) {
+ this.useSetMethodWorkaround.set(use);
+ return self();
+ }
+
+ @Override
+ public boolean equals(final Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ final HttpUrlConnectorConfiguration<?> that = (HttpUrlConnectorConfiguration<?>) o;
+
+ if (!chunkSize.equals(that.chunkSize)) {
+ return false;
+ }
+ if (!useFixedLengthStreaming.equals(that.useFixedLengthStreaming)) {
+ return false;
+ }
+ if (!useSetMethodWorkaround.equals(that.useSetMethodWorkaround)) {
+ return false;
+ }
+ if (!isRestrictedHeaderPropertySet.equals(that.isRestrictedHeaderPropertySet)) {
+ return false;
+ }
+
+ return connectionFactory.equals(that.connectionFactory);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(connectionFactory, chunkSize, useFixedLengthStreaming,
+ useSetMethodWorkaround, isRestrictedHeaderPropertySet);
+ }
+
+ /* package */ ReadWrite rw() {
+ final ReadWrite readWrite = this instanceof ReadWrite ? ((ReadWrite) this).instance() : new ReadWrite();
+ readWrite.setNonEmpty(this);
+ return readWrite;
+ }
+
+ protected static class ReadWrite
+ extends HttpUrlConnectorConfiguration<ReadWrite>
+ implements ConnectorConfiguration.Read<ReadWrite> {
+
+ @Override
+ public <X extends ConnectorConfiguration<?>> void setNonEmpty(X otherC) {
+ HttpUrlConnectorConfiguration<?> other = (HttpUrlConnectorConfiguration<?>) otherC;
+ Read.super.setNonEmpty(other);
+
+ this.connectionFactory.setNonEmpty(other.connectionFactory);
+ ((NullableRef<Integer>) this.chunkSize).setNonEmpty((NullableRef<Integer>) other.chunkSize);
+ ((NullableRef<Boolean>) this.isRestrictedHeaderPropertySet).setNonEmpty(
+ (NullableRef<Boolean>) other.isRestrictedHeaderPropertySet);
+ ((NullableRef<Boolean>) this.useFixedLengthStreaming).setNonEmpty(
+ (NullableRef<Boolean>) other.useFixedLengthStreaming);
+ ((NullableRef<Boolean>) this.useSetMethodWorkaround).setNonEmpty((NullableRef<Boolean>) other.useSetMethodWorkaround);
+ }
+
+ @Override
+ public ReadWrite init() {
+ ConnectorConfiguration.Read.super.init();
+ preInit(Collections.emptyMap());
+ isRestrictedHeaderPropertySet.set(Boolean.FALSE);
+ return self();
+ }
+
+ ReadWrite fromClient(Configuration configuration) {
+ ReadWrite clientConfiguration = copyFromClient(configuration);
+ clientConfiguration.preInit(configuration.getProperties());
+
+ // check if sun.net.http.allowRestrictedHeaders system property has been set and log the result
+ // the property is being cached in the HttpURLConnection, so this is only informative - there might
+ // already be some connection(s), that existed before the property was set/changed.
+ isRestrictedHeaderPropertySet.set(Boolean.valueOf(AccessController.doPrivileged(
+ PropertiesHelper.getSystemProperty(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY, "false")
+ )));
+
+ LOGGER.config(isRestrictedHeaderPropertySet.get()
+ ? LocalizationMessages.RESTRICTED_HEADER_PROPERTY_SETTING_TRUE(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY)
+ : LocalizationMessages.RESTRICTED_HEADER_PROPERTY_SETTING_FALSE(ALLOW_RESTRICTED_HEADERS_SYSTEM_PROPERTY)
+ );
+
+ return clientConfiguration;
+ }
+
+ ReadWrite fromRequest(ClientRequest request) {
+ ReadWrite requestConfiguration = copyFromRequest(request);
+ requestConfiguration.chunkSize(
+ request.resolveProperty(prefixed(ClientProperties.CHUNKED_ENCODING_SIZE),
+ requestConfiguration.chunkSize.get()));
+ requestConfiguration.useFixedLengthStreaming(
+ request.resolveProperty(prefixed(HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING),
+ requestConfiguration.useFixedLengthStreaming.get()));
+ requestConfiguration.useSetMethodWorkaround(
+ request.resolveProperty(prefixed(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND),
+ requestConfiguration.useSetMethodWorkaround.get()));
+
+ return requestConfiguration;
+ }
+
+ @Override
+ public ReadWrite instance() {
+ return new ReadWrite();
+ }
+
+ @Override
+ public ReadWrite me() {
+ return this;
+ }
+
+ public boolean isMethodWorkaround(ClientRequest request) {
+ return request.resolveProperty(
+ prefixed(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND), useSetMethodWorkaround.get());
+ }
+
+ public boolean isPrefixed() {
+ return !prefix.get().isEmpty();
+ }
+
+ public boolean isSslContextSupplier() {
+ return sslContextSupplier.get() != null;
+ }
+
+ /**
+ * Get {@link SSLContext} either from the {@link ClientProperties#SSL_CONTEXT_SUPPLIER}, or from this configuration.
+ *
+ * @param request the request used to get the {@link SSLContext}.
+ * @return the {@link SSLContext} supplier.
+ */
+ public Supplier<SSLContext> sslContext(ClientRequest request) {
+ @SuppressWarnings("unchecked")
+ Supplier<SSLContext> supplier =
+ request.resolveProperty(prefixed(ClientProperties.SSL_CONTEXT_SUPPLIER), Supplier.class);
+ if (supplier == null) {
+ supplier = self().sslContextSupplier.get();
+ }
+ return supplier;
+ }
+
+ @Override
+ public ReadWrite self() {
+ return this;
+ }
+ }
+
+ private static class DefaultConnectionFactory implements HttpUrlConnectorProvider.ConnectionFactory {
+
+ @Override
+ public HttpURLConnection getConnection(final URL url) throws IOException {
+ return connect(url, null);
+ }
+
+ @Override
+ public HttpURLConnection getConnection(URL url, Proxy proxy) throws IOException {
+ return connect(url, proxy);
+ }
+
+ private HttpURLConnection connect(URL url, Proxy proxy) throws IOException {
+ return (proxy == null) ? (HttpURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(proxy);
+ }
+ }
+}
diff --git a/core-client/src/test/java/org/glassfish/jersey/client/HttpUrlConnectorConfigurationTest.java b/core-client/src/test/java/org/glassfish/jersey/client/HttpUrlConnectorConfigurationTest.java
new file mode 100644
index 0000000..5e31e48
--- /dev/null
+++ b/core-client/src/test/java/org/glassfish/jersey/client/HttpUrlConnectorConfigurationTest.java
@@ -0,0 +1,793 @@
+/*
+ * 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.client;
+
+import org.glassfish.jersey.client.innate.ClientProxy;
+import org.glassfish.jersey.client.innate.ConnectorConfiguration;
+import org.glassfish.jersey.client.internal.HttpUrlConnector;
+import org.glassfish.jersey.client.internal.HttpUrlConnectorConfiguration;
+import org.glassfish.jersey.http.HttpHeaders;
+import org.glassfish.jersey.internal.MapPropertiesDelegate;
+import org.glassfish.jersey.internal.util.JdkVersion;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import javax.net.ssl.SSLContext;
+import jakarta.ws.rs.ProcessingException;
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.MultivaluedMap;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.ProtocolException;
+import java.net.URI;
+import java.net.URL;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
+public class HttpUrlConnectorConfigurationTest {
+
+ public static final String PREFIX = "test.";
+
+ @Test
+ public void testConnectTimeout() {
+ final AtomicInteger result = new AtomicInteger(0);
+ class RWConnect extends Conf.RW {
+ @Override
+ public int connectTimeout(ClientRequest request) {
+ result.set(super.connectTimeout(request));
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWConnect instance() {
+ return new RWConnect();
+ }
+
+ }
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000)).request().apply();
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECT_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request().apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECT_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECT_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(5000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().connectTimeout(2000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWConnect().connectTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(0);
+ new TestClient(new RWConnect()).rw(rw -> rw.connectTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWConnect().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().connectTimeout(4000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECT_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+ }
+
+ @Test
+ public void testFollowRedirects() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ class RWFollow extends Conf.RW {
+
+ @Override
+ public boolean followRedirects(ClientRequest request) {
+ result.set(super.followRedirects(request));
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWFollow instance() {
+ return new RWFollow();
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWFollow()).request().apply();
+ Assertions.assertEquals(((RWFollow) new RWFollow().copy()).followRedirects(), result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().followRedirects(false)).request().apply();
+ Assertions.assertEquals(false, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().prefix(PREFIX).followRedirects(false))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.FOLLOW_REDIRECTS, true))
+ .apply();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().prefix(PREFIX).followRedirects(false))
+ .request(r -> r.setProperty(
+ PREFIX + ClientProperties.CONNECTOR_CONFIGURATION, new RWFollow().followRedirects(true)))
+ .apply();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow())
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWFollow().followRedirects(false)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFollow().followRedirects(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(true, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWFollow().prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.FOLLOW_REDIRECTS, false))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWFollow().followRedirects(true)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(false, result.get());
+ }
+
+ @Test
+ public void testProxy() {
+ final AtomicReference<ClientProxy> result = new AtomicReference<>();
+ class RWProxy extends Conf.RW {
+
+ @Override
+ public Optional<ClientProxy> proxy(ClientRequest request, URI requestUri) {
+ Optional<ClientProxy> proxy = super.proxy(request, requestUri);
+ result.set(proxy.orElse(null));
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWProxy instance() {
+ return new RWProxy();
+ }
+ }
+ String proxyUri = "http://proxy.org:8080";
+ String userName = "USERNAME";
+ String password = "PASSWORD";
+
+ new TestClient(new RWProxy()).request().apply();
+ Assertions.assertNull(result.get());
+
+ result.set(null);
+ new TestClient(new RWProxy()).rw(rw -> rw.proxyUri(proxyUri).proxyUserName(userName).proxyPassword(password))
+ .request().apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy()).rw(rw -> rw.prefix(PREFIX).proxyUri(proxyUri).proxyUserName("XXX").proxyPassword(password))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.PROXY_USERNAME, userName))
+ .request(r -> r.setProperty(ClientProperties.PROXY_PASSWORD, "XXX"))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy()).rw(rw -> rw.prefix(PREFIX).proxyUri(proxyUri).proxyUserName("XXX").proxyPassword(password))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().proxyUserName(userName).proxyPassword(null)))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertNull(result.get().password());
+
+ result.set(null);
+ new TestClient(new RWProxy().prefix(PREFIX)
+ .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP,
+ new InetSocketAddress(proxyUri.split("g:")[0] + "g", Integer.parseInt(proxyUri.split("g:")[1])))))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().proxyUserName(userName).proxyPassword(password).prefix(PREFIX)))
+ .apply();
+ Assertions.assertEquals(proxyUri, result.get().uri().toASCIIString());
+ Assertions.assertEquals(userName, result.get().userName());
+ Assertions.assertEquals(password, result.get().password());
+ }
+
+ @Test
+ public void testReadTimeout() {
+ final AtomicInteger result = new AtomicInteger(0);
+ class RWRead extends Conf.RW {
+
+ @Override
+ public RWRead readTimeout(ClientRequest clientRequest) {
+ super.readTimeout(clientRequest);
+ result.set(readTimeout());
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWRead instance() {
+ return new RWRead();
+ }
+ }
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000)).request().apply();
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.READ_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request().apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.READ_TIMEOUT, 3000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().connectTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(3000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(4000)))
+ .request(r -> r.setProperty(ClientProperties.READ_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(5000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().readTimeout(2000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWRead().readTimeout(4000)))
+ .apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(0);
+ new TestClient(new RWRead()).rw(rw -> rw.readTimeout(1000).prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION, new RWRead().readTimeout(2000)))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().readTimeout(4000).prefix(PREFIX)))
+ .request(r -> r.setProperty(ClientProperties.READ_TIMEOUT, 5000))
+ .apply();
+ Assertions.assertEquals(4000, result.get());
+ }
+
+ @Test
+ public void testRequestEntityProcessing() {
+ final AtomicReference<RequestEntityProcessing> result = new AtomicReference<>();
+ final AtomicReference<Conf.RW> config = new AtomicReference<>();
+ class RWRP extends Conf.RW {
+
+ @Override
+ public RequestEntityProcessing requestEntityProcessing(ClientRequest request) {
+ result.set(super.requestEntityProcessing(request));
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWRP instance() {
+ config.set(new RWRP());
+ return (RWRP) config.get();
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWRP().requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(RequestEntityProcessing.CHUNKED, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWRP().prefix(PREFIX).requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.BUFFERED).prefix(PREFIX)))
+ .apply();
+ Assertions.assertEquals(RequestEntityProcessing.BUFFERED, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWRP().prefix(PREFIX).requestEntityProcessing(RequestEntityProcessing.CHUNKED))
+ .request(r -> r.setEntity(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.REQUEST_ENTITY_PROCESSING,
+ RequestEntityProcessing.BUFFERED))
+ .apply();
+ Assertions.assertEquals(RequestEntityProcessing.BUFFERED, result.get());
+ }
+
+ @Test
+ public void testSslContext() {
+ final SSLContext testContext = new SSLContext(null, null, null){};
+ final AtomicReference<SSLContext> result = new AtomicReference<>();
+ final AtomicReference<Conf.RW> config = new AtomicReference<>();
+ class RWSsl extends Conf.RW {
+
+ @Override
+ public SSLContext sslContext(Client client, ClientRequest request) {
+ result.set(super.sslContext(client, request));
+ return result.get();
+ }
+
+ @Override
+ public boolean isSslContextSupplier() {
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public RWSsl instance() {
+ RWSsl rw = new RWSsl();
+ config.set(rw);
+ return rw;
+ }
+ }
+
+ Request req;
+ req = new TestClient(new RWSsl().sslContextSupplier(() -> testContext)).request().apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSsl().prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.SSL_CONTEXT_SUPPLIER,
+ (Supplier<SSLContext>) () -> testContext)).apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+
+ result.set(null);
+ req = new TestClient(new RWSsl().prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ new RWSsl().prefix(PREFIX).sslContextSupplier(() -> testContext))).apply();
+ config.get().sslContext(req.client, req.request);
+ Assertions.assertEquals(testContext, result.get());
+ }
+
+ @Test
+ public void testConnectionFactory() {
+ final AtomicReference<Boolean> result = new AtomicReference<>();
+ final HttpUrlConnectorProvider.ConnectionFactory connectionFactory = new HttpUrlConnectorProvider.ConnectionFactory() {
+ @Override
+ public HttpURLConnection getConnection(URL url) throws IOException {
+ result.set(true);
+ throw new IllegalStateException();
+ }
+ };
+
+ new TestClient(HttpUrlConnectorProvider.config().connectionFactory(connectionFactory)).request().apply();
+ Assertions.assertTrue(result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().connectionFactory(connectionFactory)))
+ .request().apply();
+ Assertions.assertNull(result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().connectionFactory(connectionFactory).prefix(PREFIX)))
+ .request().apply();
+ Assertions.assertTrue(result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().connectionFactory(connectionFactory).prefix(PREFIX)))
+ .apply();
+ Assertions.assertTrue(result.get());
+
+ result.set(null);
+ Client client = ClientBuilder.newClient();
+ try {
+ HttpUrlConnectorProvider.config().build()
+ .connectionFactory(connectionFactory)
+ .getConnector(client, client.getConfiguration()).apply(Request.createRequest(client));
+ } catch (IllegalStateException ise) {
+ // expected
+ }
+ Assertions.assertTrue(result.get());
+ }
+
+ @Test
+ public void testChunkSize() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ final HttpUrlConnectorProvider.ConnectionFactory connectionFactory = new HttpUrlConnectorProvider.ConnectionFactory() {
+ @Override
+ public HttpURLConnection getConnection(URL url) throws IOException {
+ return new HttpURLConnection(url) {
+ @Override
+ public void disconnect() {
+
+ }
+
+ @Override
+ public boolean usingProxy() {
+ return false;
+ }
+
+ @Override
+ public void connect() throws IOException {
+
+ }
+
+ @Override
+ public void setChunkedStreamingMode(int chunklen) {
+ result.set(chunklen);
+ throw new IllegalStateException();
+ }
+ };
+ }
+ };
+
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(ClientProperties.DEFAULT_CHUNK_SIZE, result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory)
+ .chunkSize(1000))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(1000, result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory)
+ .chunkSize(1000)
+ .prefix(PREFIX))
+ .client(c -> c.property(PREFIX + ClientProperties.CHUNKED_ENCODING_SIZE, 2000))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory)
+ .chunkSize(1000)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + ClientProperties.CHUNKED_ENCODING_SIZE, 2000))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory)
+ .chunkSize(1000)
+ .prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().chunkSize(2000).prefix(PREFIX)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(2000, result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .requestEntityProcessing(RequestEntityProcessing.CHUNKED)
+ .connectionFactory(connectionFactory)
+ .chunkSize(1000)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().chunkSize(2000).prefix(PREFIX)))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(2000, result.get());
+ }
+
+ @Test
+ public void testUseFixedLengthStreaming() {
+ final AtomicReference<Integer> result = new AtomicReference<>();
+ final class FixedLengthStreamingUrlConnection extends HttpURLConnection {
+ private FixedLengthStreamingUrlConnection(URL u) {
+ super(u);
+ }
+
+ @Override
+ public void disconnect() {
+
+ }
+
+ @Override
+ public boolean usingProxy() {
+ return false;
+ }
+
+ @Override
+ public void connect() throws IOException {
+
+ }
+
+ @Override
+ public void setFixedLengthStreamingMode(long contentLength) {
+ super.setFixedLengthStreamingMode(contentLength);
+ result.set((int) contentLength);
+ throw new IllegalStateException();
+ }
+ }
+ final HttpUrlConnectorProvider.ConnectionFactory connectionFactory = new HttpUrlConnectorProvider.ConnectionFactory() {
+ @Override
+ public HttpURLConnection getConnection(URL url) throws IOException {
+ return new FixedLengthStreamingUrlConnection(url);
+ }
+ };
+
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertNull(result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useFixedLengthStreaming(true))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(PREFIX.length(), result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useFixedLengthStreaming(false)
+ .prefix(PREFIX))
+ .client(c -> c.property(PREFIX + HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING, true))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(PREFIX.length(), result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useFixedLengthStreaming(false)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(PREFIX + HttpUrlConnectorProvider.USE_FIXED_LENGTH_STREAMING, true))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(PREFIX.length(), result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useFixedLengthStreaming(false)
+ .prefix(PREFIX))
+ .client(c -> c.property(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().useFixedLengthStreaming(true).prefix(PREFIX)))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(PREFIX.length(), result.get());
+
+ result.set(null);
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useFixedLengthStreaming(false)
+ .prefix(PREFIX))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().useFixedLengthStreaming(true).prefix(PREFIX)))
+ .request(r -> r.getRequestHeaders().add(HttpHeaders.CONTENT_LENGTH, String.valueOf(PREFIX.length())))
+ .request(r -> r.setEntity(PREFIX)).apply();
+ Assertions.assertEquals(PREFIX.length(), result.get());
+ }
+
+ @Test
+ public void testUseMethodWorkaround() {
+ JdkVersion version = JdkVersion.getJdkVersion();
+ if (!version.isReflectiveAccessToJdkSupported()) {
+ return;
+ }
+ final String method = "XYZ";
+ final AtomicReference<HttpURLConnection> result = new AtomicReference<>();
+ final HttpUrlConnectorProvider.ConnectionFactory connectionFactory = new HttpUrlConnectorProvider.ConnectionFactory() {
+ @Override
+ public HttpURLConnection getConnection(URL url) throws IOException {
+ return new HttpURLConnection(url) {
+ @Override
+ public void disconnect() {
+
+ }
+
+ @Override
+ public boolean usingProxy() {
+ return false;
+ }
+
+ @Override
+ public void connect() throws IOException {
+
+ }
+
+ @Override
+ public void setRequestMethod(String method) throws ProtocolException {
+ result.set(this);
+ super.setRequestMethod(method);
+ throw new IllegalStateException();
+ }
+ };
+ }
+ };
+
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory))
+ .request(r -> r.setMethod(method))
+ .apply();
+ Assertions.assertNotEquals(method, result.get().getRequestMethod());
+
+ new TestClient(HttpUrlConnectorProvider.config()
+ .connectionFactory(connectionFactory)
+ .useSetMethodWorkaround(true))
+ .request(r -> r.setMethod(method))
+ .apply();
+ Assertions.assertEquals(method, result.get().getRequestMethod());
+
+ HttpUrlConnectorProvider.Config config = HttpUrlConnectorProvider.config();
+ config.build().useSetMethodWorkaround();
+ new TestClient(config
+ .connectionFactory(connectionFactory))
+ .request(r -> r.setMethod(method))
+ .apply();
+ Assertions.assertEquals(method, result.get().getRequestMethod());
+
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX)
+ .connectionFactory(connectionFactory))
+ .request(r -> r.setMethod(method))
+ .request(r -> r.setProperty(ClientProperties.CONNECTOR_CONFIGURATION,
+ HttpUrlConnectorProvider.config().useSetMethodWorkaround(true).prefix(PREFIX)))
+ .apply();
+ Assertions.assertEquals(method, result.get().getRequestMethod());
+
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX)
+ .connectionFactory(connectionFactory))
+ .client(c -> c.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true))
+ .request(r -> r.setMethod(method))
+ .apply();
+ Assertions.assertNotEquals(method, result.get().getRequestMethod());
+
+ new TestClient(HttpUrlConnectorProvider.config().prefix(PREFIX)
+ .connectionFactory(connectionFactory))
+ .client(c -> c.property(PREFIX + HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true))
+ .request(r -> r.setMethod(method))
+ .apply();
+ Assertions.assertEquals(method, result.get().getRequestMethod());
+ }
+
+ private static class Conf extends HttpUrlConnectorConfiguration<Conf> {
+ private static class RW extends ReadWrite {
+ @Override
+ public <X extends ConnectorConfiguration<?>> void setNonEmpty(X otherC) {
+ super.setNonEmpty(otherC);
+ }
+
+ @Override
+ public RW prefix(String prefix) {
+ super.prefix(prefix);
+ return this;
+ }
+ }
+ }
+
+ private static class TestClient {
+ final Conf.RW rw;
+ final Client client;
+
+ private TestClient(ConnectorConfiguration<?> config) {
+ this.rw = config instanceof Conf.RW ? (Conf.RW) config : new Conf.RW() {
+ {
+ setNonEmpty(config);
+ }
+ };
+ this.client = ClientBuilder.newClient(new ClientConfig());
+ }
+
+ public TestClient client(Consumer<Client> consumer) {
+ consumer.accept(client);
+ return this;
+ }
+
+ public TestClient rw(Consumer<HttpUrlConnectorConfiguration<?>> consumer) {
+ consumer.accept(rw);
+ return this;
+ }
+
+ public Request request() {
+ return new Request(client, rw);
+ }
+
+ public Request request(Consumer<ClientRequest> consumer) {
+ return request().request(consumer);
+ }
+ }
+
+ private static class Request {
+ final ClientRequest request;
+ final Client client;
+ final Conf.RW rw;
+
+ Request(Client client, Conf.RW rw) {
+ this.client = client;
+ this.rw = rw;
+ request = createRequest(client);
+ }
+
+ private static ClientRequest createRequest(Client client) {
+ ClientRequest request = new ClientRequest(URI.create("http://localhost:8080"),
+ (ClientConfig) client.getConfiguration(), new MapPropertiesDelegate()) {
+ @Override
+ public void writeEntity() throws IOException {
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public MultivaluedMap<String, String> getStringHeaders() {
+ throw new IllegalStateException();
+ }
+ };
+ request.setMethod("POST");
+ return request;
+ }
+
+ public Request request(Consumer<ClientRequest> consumer) {
+ consumer.accept(request);
+ return this;
+ }
+
+ public Request apply() {
+ try {
+ HttpUrlConnector connector = new HttpUrlConnector(client, client.getConfiguration(), rw);
+ connector.apply(request);
+ } catch (ProcessingException | IllegalStateException expected) {
+ }
+ return this;
+ }
+ }
+}
diff --git a/core-client/src/test/java/org/glassfish/jersey/client/spi/InvocationBuilderListenerTest.java b/core-client/src/test/java/org/glassfish/jersey/client/spi/InvocationBuilderListenerTest.java
index ef45853..c8bf6fa 100644
--- a/core-client/src/test/java/org/glassfish/jersey/client/spi/InvocationBuilderListenerTest.java
+++ b/core-client/src/test/java/org/glassfish/jersey/client/spi/InvocationBuilderListenerTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2022 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
@@ -16,22 +16,17 @@
package org.glassfish.jersey.client.spi;
-import org.glassfish.jersey.internal.PropertiesDelegate;
import org.hamcrest.Matchers;
import org.hamcrest.MatcherAssert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-import jakarta.annotation.Priority;
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.client.WebTarget;
import jakarta.ws.rs.core.CacheControl;
-import jakarta.ws.rs.core.Configuration;
-import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
@@ -95,6 +90,20 @@
}
}
+ @Test
+ public void testCounter() {
+ CountingInvocationBuilderListener listener = new CountingInvocationBuilderListener();
+ target = target.register(listener);
+ try (Response r = target.request().get()) {
+ assertDefault(r);
+ Assertions.assertEquals(1, listener.getCount());
+ }
+ try (Response r = target.request().get()) {
+ assertDefault(r);
+ Assertions.assertEquals(2, listener.getCount());
+ }
+ }
+
private void assertDefault(Response response) {
Assertions.assertEquals(key(ONE) + "=" + ONE, response.readEntity(String.class));
}
@@ -193,4 +202,17 @@
MatcherAssert.assertThat(context.getCookies().get("Cookie"), Matchers.notNullValue());
}
}
+
+ private static class CountingInvocationBuilderListener implements InvocationBuilderListener {
+ private int counter = 0;
+
+ @Override
+ public void onNewBuilder(InvocationBuilderContext context) {
+ counter++;
+ }
+
+ public int getCount() {
+ return counter;
+ }
+ }
}
diff --git a/core-common/pom.xml b/core-common/pom.xml
index e2c8444..6229fb0 100644
--- a/core-common/pom.xml
+++ b/core-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.core</groupId>
diff --git a/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java
index a73b185..36a3712 100644
--- a/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java
+++ b/core-common/src/main/java/org/glassfish/jersey/AbstractFeatureConfigurator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 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
@@ -49,9 +49,11 @@
* @param loader specific classloader (must not be NULL)
* @return list of found classes
*/
+
protected List<Class<T>> loadImplementations(Map<String, Object> applicationProperties, ClassLoader loader) {
if (PropertiesHelper.isMetaInfServicesEnabled(applicationProperties, getRuntimeType())) {
- return Stream.of(ServiceFinder.find(getContract(), loader, true).toClassArray())
+ return Stream.of(ServiceFinder.service(getContract()).loader(loader).ignoreNotFound(true)
+ .runtimeType(getRuntimeType()).find().toClassArray())
.collect(Collectors.toList());
}
return Collections.emptyList();
diff --git a/core-common/src/main/java/org/glassfish/jersey/http/JerseyCookie.java b/core-common/src/main/java/org/glassfish/jersey/http/JerseyCookie.java
new file mode 100644
index 0000000..7598900
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/http/JerseyCookie.java
@@ -0,0 +1,106 @@
+/*
+ * 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.http;
+
+import jakarta.ws.rs.core.Cookie;
+
+import java.util.Objects;
+
+/**
+ * Jersey subclass of {@link Cookie} bearing information about optional version.
+ * Complies with RFC 6265.
+ */
+public final class JerseyCookie extends Cookie implements VersionOptional {
+ private final Integer version;
+ private JerseyCookie(Builder builder) throws IllegalArgumentException {
+ super(builder);
+ this.version = builder.version;
+ }
+
+ @Override
+ public boolean hasVersion() {
+ return version != null;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (obj.getClass() != Cookie.class && obj.getClass() != JerseyCookie.class) {
+ return false;
+ }
+ final Cookie other = (Cookie) obj;
+ if (!Objects.equals(this.getName(), other.getName())) {
+ return false;
+ }
+ if (!Objects.equals(this.getValue(), other.getValue())) {
+ return false;
+ }
+ if (!Objects.equals(this.getVersion(), other.getVersion())) {
+ return false;
+ }
+ if (!Objects.equals(this.getPath(), other.getPath())) {
+ return false;
+ }
+ if (!Objects.equals(this.getDomain(), other.getDomain())) {
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * Builder for building Cookie.
+ */
+ public static final class Builder extends AbstractCookieBuilder<JerseyCookie.Builder> {
+ private Integer version;
+ /**
+ * Create a new instance.
+ *
+ * @param name the name of the cookie.
+ */
+ public Builder(String name) {
+ super(name);
+ }
+
+ @Override
+ public Builder version(int version) {
+ super.version(version);
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Set version as nullable Integer. {@code null} refers to RFC 6265 Cookie without a version.
+ * @param version the version of the HTTP Cookie.
+ * @return updated builder.
+ */
+ public Builder version(Integer version) {
+ super.version(version == null ? VersionOptional.NETSCAPE_VERSION : version);
+ this.version = version;
+ return this;
+ }
+
+ @Override
+ public Cookie build() {
+ return new JerseyCookie(this);
+ }
+
+ }
+
+}
diff --git a/core-common/src/main/java/org/glassfish/jersey/http/JerseyNewCookie.java b/core-common/src/main/java/org/glassfish/jersey/http/JerseyNewCookie.java
new file mode 100644
index 0000000..0f75586
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/http/JerseyNewCookie.java
@@ -0,0 +1,142 @@
+/*
+ * 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.http;
+
+import jakarta.ws.rs.core.Cookie;
+import jakarta.ws.rs.core.NewCookie;
+
+import java.util.Objects;
+
+/**
+ * Jersey subclass of {@link NewCookie} bearing information about optional version.
+ * Complies with RFC 6265.
+ */
+public final class JerseyNewCookie extends NewCookie implements VersionOptional {
+ private final Integer version;
+ private JerseyNewCookie(JerseyNewCookie.Builder builder) {
+ super(builder);
+ this.version = builder.version;
+ }
+
+ @Override
+ public boolean hasVersion() {
+ return version != null;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (obj.getClass() != NewCookie.class && obj.getClass() != JerseyNewCookie.class) {
+ return false;
+ }
+ final NewCookie other = (NewCookie) obj;
+ if (!Objects.equals(this.getName(), other.getName())) {
+ return false;
+ }
+ if (!Objects.equals(this.getValue(), other.getValue())) {
+ return false;
+ }
+ if (this.getVersion() != other.getVersion()) {
+ return false;
+ }
+ if (!Objects.equals(this.getPath(), other.getPath())) {
+ return false;
+ }
+ if (!Objects.equals(this.getDomain(), other.getDomain())) {
+ return false;
+ }
+ if (!Objects.equals(this.getComment(), other.getComment())) {
+ return false;
+ }
+ if (this.getMaxAge() != other.getMaxAge()) {
+ return false;
+ }
+ if (!Objects.equals(this.getExpiry(), other.getExpiry())) {
+ return false;
+ }
+ if (this.isSecure() != other.isSecure()) {
+ return false;
+ }
+ if (this.isHttpOnly() != other.isHttpOnly()) {
+ return false;
+ }
+ if (this.getSameSite() != other.getSameSite()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), version);
+ }
+
+ /**
+ * Builder class building the Jersey NewCookie subclass.
+ */
+ public static final class Builder extends AbstractNewCookieBuilder<JerseyNewCookie.Builder> {
+ private Integer version;
+
+
+ /**
+ * Create a new instance.
+ *
+ * @param name the name of the cookie.
+ */
+ public Builder(String name) {
+ super(name);
+ }
+
+ /**
+ * Create a new instance supplementing the information in the supplied cookie.
+ *
+ * @param cookie the cookie to copy.
+ */
+ public Builder(Cookie cookie) {
+ super(cookie);
+ if (cookie instanceof VersionOptional) {
+ this.version = ((VersionOptional) cookie).hasVersion() ? cookie.getVersion() : null;
+ }
+ }
+
+ @Override
+ public Builder version(int version) {
+ super.version(version);
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Set version. Can be {@code null} if RFC 6265.
+ * @param version the cookie version.
+ * @return updated builder.
+ */
+ public Builder version(Integer version) {
+ // Version 0 should refer to NETSCAPE, but NewCookie should be for RFC 2109 & 2965 - version 1.
+ super.version(version == null ? DEFAULT_VERSION : version);
+ this.version = version;
+ return this;
+ }
+
+ @Override
+ public NewCookie build() {
+ return new JerseyNewCookie(this);
+ }
+ }
+}
diff --git a/core-common/src/main/java/org/glassfish/jersey/http/VersionOptional.java b/core-common/src/main/java/org/glassfish/jersey/http/VersionOptional.java
new file mode 100644
index 0000000..2023d0d
--- /dev/null
+++ b/core-common/src/main/java/org/glassfish/jersey/http/VersionOptional.java
@@ -0,0 +1,35 @@
+/*
+ * 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.http;
+
+/**
+ * Provides information about optionality of version in {@code Cookie} and {@code NewCookie}.
+ * The version is as follows: 0 - Netscape, 1 - RFC 2109 & 2965, not set RFC 6265.
+ */
+public interface VersionOptional {
+
+ /**
+ * The version from the original Netscape specification.
+ */
+ public static final int NETSCAPE_VERSION = 0;
+
+ /**
+ * Defines if the version is set.
+ * @return {@code true} when the version is set.
+ */
+ boolean hasVersion();
+}
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/AbstractServiceFinderConfigurator.java b/core-common/src/main/java/org/glassfish/jersey/internal/AbstractServiceFinderConfigurator.java
index ea7c62c..4a4972b 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/AbstractServiceFinderConfigurator.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/AbstractServiceFinderConfigurator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2021 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
@@ -60,8 +60,8 @@
*/
protected List<Class<T>> loadImplementations(Map<String, Object> applicationProperties) {
if (PropertiesHelper.isMetaInfServicesEnabled(applicationProperties, runtimeType)) {
- return Stream.of(ServiceFinder.find(contract, true).toClassArray())
- .collect(Collectors.toList());
+ return Stream.of(ServiceFinder.service(contract).ignoreNotFound(true).runtimeType(runtimeType)
+ .find().toClassArray()).collect(Collectors.toList());
}
return Collections.emptyList();
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/RuntimeDelegateDecorator.java b/core-common/src/main/java/org/glassfish/jersey/internal/RuntimeDelegateDecorator.java
index b21616d..db6a02e 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/RuntimeDelegateDecorator.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/RuntimeDelegateDecorator.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.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
@@ -139,7 +139,8 @@
static {
Set<HeaderDelegateProvider> hps = new HashSet<HeaderDelegateProvider>();
- for (HeaderDelegateProvider provider : ServiceFinder.find(HeaderDelegateProvider.class, true)) {
+ for (HeaderDelegateProvider provider : ServiceFinder
+ .service(HeaderDelegateProvider.class).ignoreNotFound(true).find()) {
hps.add(provider);
}
headerDelegateProviders = Collections.unmodifiableSet(hps);
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinder.java b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinder.java
index 03d15d3..bdce062 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinder.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -24,6 +24,7 @@
import java.lang.reflect.ReflectPermission;
import java.net.URL;
import java.net.URLConnection;
+import java.nio.charset.StandardCharsets;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.util.ArrayList;
@@ -40,6 +41,9 @@
import org.glassfish.jersey.internal.util.ReflectionHelper;
+import jakarta.ws.rs.ConstrainedTo;
+import jakarta.ws.rs.RuntimeType;
+
/**
* A simple service-provider lookup mechanism. A <i>service</i> is a
* well-known set of interfaces and (usually abstract) classes. A <i>service
@@ -108,7 +112,7 @@
* sun.io.StandardCodec # Standard codecs for the platform
* </pre>
* <p/>
- * To locate an codec for a given encoding name, the internal I/O code would
+ * To locate a codec for a given encoding name, the internal I/O code would
* do something like this:
* <p/>
* <pre>
@@ -135,10 +139,98 @@
private static final Logger LOGGER = Logger.getLogger(ServiceFinder.class.getName());
private static final String PREFIX = "META-INF/services/";
- private final Class<T> serviceClass;
- private final String serviceName;
- private final ClassLoader classLoader;
- private final boolean ignoreOnClassNotFound;
+
+ public static final class Builder<T> {
+ final Class<T> service;
+ String serviceName;
+ private ClassLoader loader;
+ private Boolean ignoreOnClassNotFound;
+ RuntimeType runtimeType = null;
+
+ private Builder(Class<T> serviceClass) {
+ this.service = serviceClass;
+ }
+
+ private Builder(Builder<T> builder) {
+ this.service = builder.service;
+ this.serviceName = builder.serviceName;
+ this.loader = builder.loader;
+ this.ignoreOnClassNotFound = builder.ignoreOnClassNotFound;
+ this.runtimeType = builder.runtimeType;
+ }
+
+ /**
+ * Create the service finder capable of locating the services with information specified by the builder.
+ * @return the service finder instance.
+ */
+ public ServiceFinder<T> find() {
+ if (serviceName == null) {
+ serviceName = service.getName();
+ }
+ if (loader == null) {
+ loader = _getContextClassLoader();
+ }
+ if (ignoreOnClassNotFound == null) {
+ ignoreOnClassNotFound = false;
+ }
+
+ return new ServiceFinder<T>(this);
+ }
+
+ /**
+ * Set the service name the service finder use to locate the services.
+ * @param serviceName the service name correspond to a file in
+ * META-INF/services that contains a list of fully qualified class
+ * names.
+ * @return the updated builder.
+ */
+ public Builder<T> serviceName(String serviceName) {
+ this.serviceName = serviceName;
+ return this;
+ }
+
+ /**
+ * Set the service finder to use the given {@code Classloader}. By default, the context classloader is used.
+ * @param loader the given classloader for the service finder to use when searching for the service.
+ * @return the updated builder.
+ */
+ public Builder<T> loader(ClassLoader loader) {
+ this.loader = loader;
+ return this;
+ }
+
+ /**
+ * Set the service finder to ignore the service if not found. The default is {@code false}.
+ * @param ignoreOnClassNotFound whether to ignore the service not found or not.
+ * @return the updated builder.
+ */
+ public Builder<T> ignoreNotFound(boolean ignoreOnClassNotFound) {
+ this.ignoreOnClassNotFound = ignoreOnClassNotFound;
+ return this;
+ }
+
+ /**
+ * Update the builder with a specified runtime type the searched services are constrained to it.
+ * @param runtimeType the specified runtime type.
+ * @return the updated builder.
+ */
+ public Builder<T> runtimeType(RuntimeType runtimeType) {
+ this.runtimeType = runtimeType;
+ return this;
+ }
+ }
+
+ /**
+ * Start configuring {@link Builder} with a specific service class to find.
+ * @param serviceClass the service class to find.
+ * @return a new instance of service finder builder.
+ * @param <T> type of the service class the service finder builder is created for.
+ */
+ public static <T> ServiceFinder.Builder<T> service(Class<T> serviceClass) {
+ return new Builder<>(serviceClass);
+ }
+
+ private final Builder<T> builder;
static {
final OsgiRegistry osgiRegistry = ReflectionHelper.getOsgiRegistryInstance();
@@ -203,11 +295,10 @@
* @param <T> the type of the service instance.
* @return the service finder
*/
+ @Deprecated
public static <T> ServiceFinder<T> find(final Class<T> service, final ClassLoader loader)
throws ServiceConfigurationError {
- return find(service,
- loader,
- false);
+ return service(service).loader(loader).find();
}
/**
@@ -238,12 +329,11 @@
* @param <T> the type of the service instance.
* @return the service finder
*/
+ @Deprecated
public static <T> ServiceFinder<T> find(final Class<T> service,
final ClassLoader loader,
final boolean ignoreOnClassNotFound) throws ServiceConfigurationError {
- return new ServiceFinder<T>(service,
- loader,
- ignoreOnClassNotFound);
+ return service(service).loader(loader).ignoreNotFound(ignoreOnClassNotFound).find();
}
/**
@@ -253,7 +343,7 @@
* <p/>
* <pre>
* ClassLoader cl = Thread.currentThread().getContextClassLoader();
- * return Service.providers(service, cl, false);
+ * return ServiceFinder.service(service).loader(cl).ignoreNotFound(false).find();
* </pre>
* @param service The service's abstract service class
* @throws ServiceConfigurationError If a provider-configuration file violates the specified format
@@ -264,9 +354,7 @@
*/
public static <T> ServiceFinder<T> find(final Class<T> service)
throws ServiceConfigurationError {
- return find(service,
- _getContextClassLoader(),
- false);
+ return ServiceFinder.service(service).find();
}
/**
@@ -277,7 +365,7 @@
* <pre>
* ClassLoader cl = Thread.currentThread().getContextClassLoader();
* boolean ingore = ...
- * return Service.providers(service, cl, ignore);
+ * return ServiceFinder.service(service).loader(cl).ignoreNotFound(ignore).find();
* </pre>
* @param service The service's abstract service class
* @param ignoreOnClassNotFound If a provider cannot be loaded by the class loader
@@ -288,11 +376,10 @@
* @param <T> the type of the service instance.
* @return the service finder
*/
+ @Deprecated
public static <T> ServiceFinder<T> find(final Class<T> service,
final boolean ignoreOnClassNotFound) throws ServiceConfigurationError {
- return find(service,
- _getContextClassLoader(),
- ignoreOnClassNotFound);
+ return ServiceFinder.service(service).ignoreNotFound(ignoreOnClassNotFound).find();
}
/**
@@ -307,7 +394,7 @@
* @return the service finder
*/
public static ServiceFinder<?> find(final String serviceName) throws ServiceConfigurationError {
- return new ServiceFinder<Object>(Object.class, serviceName, _getContextClassLoader(), false);
+ return service(Object.class).serviceName(serviceName).find();
}
/**
@@ -327,22 +414,8 @@
ServiceIteratorProvider.setInstance(sip);
}
- private ServiceFinder(
- final Class<T> service,
- final ClassLoader loader,
- final boolean ignoreOnClassNotFound) {
- this(service, service.getName(), loader, ignoreOnClassNotFound);
- }
-
- private ServiceFinder(
- final Class<T> service,
- final String serviceName,
- final ClassLoader loader,
- final boolean ignoreOnClassNotFound) {
- this.serviceClass = service;
- this.serviceName = serviceName;
- this.classLoader = loader;
- this.ignoreOnClassNotFound = ignoreOnClassNotFound;
+ private ServiceFinder(Builder<T> builder) {
+ this.builder = new Builder<>(builder);
}
/**
@@ -356,8 +429,7 @@
*/
@Override
public Iterator<T> iterator() {
- return ServiceIteratorProvider.getInstance()
- .createIterator(serviceClass, serviceName, classLoader, ignoreOnClassNotFound);
+ return createIterator();
}
/**
@@ -375,7 +447,7 @@
for (final T t : this) {
result.add(t);
}
- return result.toArray((T[]) Array.newInstance(serviceClass, result.size()));
+ return result.toArray((T[]) Array.newInstance(builder.service, result.size()));
}
/**
@@ -390,16 +462,68 @@
@SuppressWarnings("unchecked")
public Class<T>[] toClassArray() throws ServiceConfigurationError {
final List<Class<T>> result = new ArrayList<Class<T>>();
-
- final ServiceIteratorProvider iteratorProvider = ServiceIteratorProvider.getInstance();
- final Iterator<Class<T>> i = iteratorProvider
- .createClassIterator(serviceClass, serviceName, classLoader, ignoreOnClassNotFound);
+ final Iterator<Class<T>> i = createClassIterator();
while (i.hasNext()) {
result.add(i.next());
}
return result.toArray((Class<T>[]) Array.newInstance(Class.class, result.size()));
}
+ /**
+ * Return true iff the service class is not constrained to other runtime type.
+ * @param clazz the service class.
+ * @param runtimeType the expected constraint runtime type.
+ * @return {@code true} when the service class is constrained to configurator's runtime type or {@code false} otherwise.
+ */
+ private static boolean isConstrained(Class<?> clazz, RuntimeType runtimeType) {
+ final ConstrainedTo annotation = clazz.getAnnotation(ConstrainedTo.class);
+ return annotation == null || annotation.value() == runtimeType;
+ }
+
+ private Iterator<Class<T>> createClassIterator() {
+ final Iterator<Class<T>> it = ServiceIteratorProvider.getInstance().createClassIterator(
+ builder.service, builder.serviceName, builder.loader, builder.ignoreOnClassNotFound);
+ return builder.runtimeType == null ? it : new ConstrainedIterator<Class<T>>(it, builder.runtimeType);
+ }
+
+ private Iterator<T> createIterator() {
+ final Iterator<T> it = ServiceIteratorProvider.getInstance().createIterator(
+ builder.service, builder.serviceName, builder.loader, builder.ignoreOnClassNotFound);
+ return builder.runtimeType == null ? it : new ConstrainedIterator<T>(it, builder.runtimeType);
+ }
+
+ private static final class ConstrainedIterator<IT> implements Iterator<IT> {
+ private final Iterator<IT> i;
+ private final RuntimeType runtimeType;
+ private IT next;
+
+ private ConstrainedIterator(Iterator<IT> i, RuntimeType runtimeType) {
+ this.i = i;
+ this.runtimeType = runtimeType;
+ }
+
+ @Override
+ public boolean hasNext() {
+ while (next == null && i.hasNext()) {
+ next = i.next();
+ if (!isConstrained(next.getClass() == Class.class ? (Class<?>) next : next.getClass(), runtimeType)) {
+ next = null;
+ }
+ }
+ return next != null;
+ }
+
+ @Override
+ public IT next() {
+ if (next == null && !hasNext()) {
+ throw new NoSuchElementException();
+ }
+ final IT n = next;
+ next = null;
+ return n;
+ }
+ }
+
private static void fail(final String serviceName, final String msg, final Throwable cause)
throws ServiceConfigurationError {
final ServiceConfigurationError sce = new ServiceConfigurationError(serviceName + ": " + msg);
@@ -482,7 +606,7 @@
final URLConnection uConn = u.openConnection();
uConn.setUseCaches(false);
in = uConn.getInputStream();
- r = new BufferedReader(new InputStreamReader(in, "utf-8"));
+ r = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
int lc = 1;
while ((lc = parseLine(serviceName, u, r, lc, names, returned)) >= 0) {
// continue
@@ -871,7 +995,7 @@
* The default service iterator provider that looks up provider classes in
* META-INF/services files.
* <p>
- * This class may utilized if a {@link ServiceIteratorProvider} needs to
+ * This class may be utilized if a {@link ServiceIteratorProvider} needs to
* reuse the default implementation.
*/
public static final class DefaultServiceIteratorProvider extends ServiceIteratorProvider {
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
index 798b18f..cd79c21 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/ServiceFinderBinder.java
@@ -58,8 +58,9 @@
@Override
protected void configure() {
if (PropertiesHelper.isMetaInfServicesEnabled(applicationProperties, runtimeType)) {
- for (Class<T> t : ServiceFinder.find(contract, true).toClassArray()) {
- bind(t).to(contract).id(0);
+ for (Class<T> t : ServiceFinder.service(contract).ignoreNotFound(true).runtimeType(runtimeType).find()
+ .toClassArray()) {
+ bind(t).to(contract);
}
}
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/guava/Ordering.java b/core-common/src/main/java/org/glassfish/jersey/internal/guava/Ordering.java
index a544e36..c87d6a5 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/guava/Ordering.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/guava/Ordering.java
@@ -203,7 +203,7 @@
* @throws ClassCastException if the parameters are not <i>mutually
* comparable</i> under this ordering.
*/
- <E extends T> E min(E a, E b) {
+ public <E extends T> E min(E a, E b) {
return (compare(a, b) <= 0) ? a : b;
}
@@ -278,7 +278,7 @@
* @throws ClassCastException if the parameters are not <i>mutually
* comparable</i> under this ordering.
*/
- <E extends T> E max(E a, E b) {
+ public <E extends T> E max(E a, E b) {
return (compare(a, b) >= 0) ? a : b;
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/Injections.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/Injections.java
index ac5f012..33f4c9c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/Injections.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/Injections.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -123,16 +123,12 @@
* @param clazz type of service to look for.
* @param <T> type of service to look for.
* @param type {@link RuntimeType} the {@link InjectionManagerFactory} must be {@link ConstrainedTo} if annotated.
- * @return instance of service with highest priority or {@code null} if service of given type cannot be found.
+ * @return instance of service with the highest priority or {@code null} if service of given type cannot be found.
* @see jakarta.annotation.Priority
*/
private static <T> Optional<T> lookupService(final Class<T> clazz, RuntimeType type) {
List<RankedProvider<T>> providers = new LinkedList<>();
- for (T provider : ServiceFinder.find(clazz)) {
- ConstrainedTo constrain = provider.getClass().getAnnotation(ConstrainedTo.class);
- if (constrain != null && type != constrain.value()) {
- continue;
- }
+ for (T provider : ServiceFinder.service(clazz).runtimeType(type).find()) {
providers.add(new RankedProvider<>(provider));
}
providers.sort(new RankedComparator<>(RankedComparator.Order.DESCENDING));
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 aafb278..f2e8136 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, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -363,7 +363,8 @@
final List<ClassTypePair> ctps = ReflectionHelper.getTypeArgumentAndClass(genericType);
final ClassTypePair ctp = (ctps.size() == 1) ? ctps.get(0) : null;
final boolean empty = value.isEmpty();
- for (ParamConverterProvider provider : Providers.getProviders(manager, ParamConverterProvider.class)) {
+ for (final ParamConverterProvider provider
+ : Providers.getAllProviders(manager, ParamConverterProvider.class)) {
final ParamConverter<?> converter = provider.getConverter(ctp.rawClass(), ctp.type(), annotations);
if (converter != null) {
if (empty) {
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/inject/Providers.java b/core-common/src/main/java/org/glassfish/jersey/internal/inject/Providers.java
index f5c467a..e0aa5bf 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/inject/Providers.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/inject/Providers.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -107,7 +107,8 @@
interfaces.put(Binder.class, ProviderRuntime.BOTH);
try {
- ServiceFinder<ExternalRegistrables> registerables = ServiceFinder.find(ExternalRegistrables.class, true);
+ ServiceFinder<ExternalRegistrables> registerables =
+ ServiceFinder.service(ExternalRegistrables.class).ignoreNotFound(true).find();
registerables.forEach(regs -> regs.registrableContracts()
.forEach(pair -> interfaces.put(pair.getContract(), ProviderRuntime.fromRuntimeType(pair.getRuntimeType()))));
} catch (Throwable t) {
diff --git a/core-common/src/main/java/org/glassfish/jersey/internal/util/JdkVersion.java b/core-common/src/main/java/org/glassfish/jersey/internal/util/JdkVersion.java
index 9b8ec40..d7c478c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/internal/util/JdkVersion.java
+++ b/core-common/src/main/java/org/glassfish/jersey/internal/util/JdkVersion.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2019 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
@@ -119,6 +119,19 @@
}
/**
+ * <p>
+ * Returns <tt>true</tt> if the reflective access to JDK classes is supported. It was disabled by JDK 16+.
+ * </p>
+ * <p>
+ * This can be used to verify the property <tt>HttpUrlConnectorProvider#SET_METHOD_WORKAROUND</tt> still works,
+ * for instance.
+ * </p>
+ */
+ public boolean isReflectiveAccessToJdkSupported() {
+ return getMajor() < 16;
+ }
+
+ /**
* Returns <tt>true</tt> if {@code sun.misc.Unsafe} is present in the
* current JDK version, or <tt>false</tt> otherwise.
*
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/CookieProvider.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/CookieProvider.java
index a509120..9a4b29a 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/CookieProvider.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/CookieProvider.java
@@ -21,6 +21,7 @@
import jakarta.inject.Singleton;
import org.glassfish.jersey.internal.LocalizationMessages;
+import org.glassfish.jersey.http.VersionOptional;
import org.glassfish.jersey.spi.HeaderDelegateProvider;
import static org.glassfish.jersey.message.internal.Utils.throwIllegalArgumentExceptionIfNull;
@@ -46,7 +47,15 @@
StringBuilder b = new StringBuilder();
- b.append("$Version=").append(cookie.getVersion()).append(';');
+ boolean printVersion = false;
+ if (cookie instanceof VersionOptional) {
+ printVersion = ((VersionOptional) cookie).hasVersion();
+ } else if (cookie.getVersion() == Cookie.DEFAULT_VERSION || cookie.getVersion() == VersionOptional.NETSCAPE_VERSION) {
+ printVersion = true;
+ }
+ if (printVersion) {
+ b.append("$Version=").append(cookie.getVersion()).append(';');
+ }
b.append(cookie.getName()).append('=');
StringBuilderUtils.appendQuotedIfWhitespace(b, cookie.getValue());
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/CookiesParser.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/CookiesParser.java
index 958a1bc..d535094 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/CookiesParser.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/CookiesParser.java
@@ -28,6 +28,8 @@
import jakarta.ws.rs.core.NewCookie;
import org.glassfish.jersey.internal.LocalizationMessages;
+import org.glassfish.jersey.http.JerseyCookie;
+import org.glassfish.jersey.http.JerseyNewCookie;
/**
* Cookies parser.
@@ -43,7 +45,7 @@
String name;
String value;
- int version = Cookie.DEFAULT_VERSION;
+ Integer version = null;
String path = null;
String domain = null;
@@ -53,14 +55,14 @@
}
public Cookie getImmutableCookie() {
- return new Cookie(name, value, path, domain, version);
+ return new JerseyCookie.Builder(name).version(version).value(value).path(path).domain(domain).build();
}
}
public static Map<String, Cookie> parseCookies(String header) {
String bites[] = header.split("[;,]");
Map<String, Cookie> cookies = new LinkedHashMap<String, Cookie>();
- int version = 0;
+ Integer version = null;
MutableCookie cookie = null;
for (String bite : bites) {
String crumbs[] = bite.split("=", 2);
@@ -123,7 +125,7 @@
String value = null;
String path = null;
String domain = null;
- int version = Cookie.DEFAULT_VERSION;
+ Integer version = null;
String comment = null;
int maxAge = NewCookie.DEFAULT_MAX_AGE;
boolean secure = false;
@@ -137,7 +139,8 @@
}
public NewCookie getImmutableNewCookie() {
- return new NewCookie(name, value, path, domain, version, comment, maxAge, expiry, secure, httpOnly, sameSite);
+ return new JerseyNewCookie.Builder(name).version(version).value(value).path(path).domain(domain).comment(comment)
+ .maxAge(maxAge).expiry(expiry).secure(secure).httpOnly(httpOnly).sameSite(sameSite).build();
}
}
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/InboundMessageContext.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/InboundMessageContext.java
index 46446a4..5cb0ba7 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/InboundMessageContext.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/InboundMessageContext.java
@@ -166,8 +166,8 @@
* @param configuration the related client/server side {@link Configuration}. If {@code null},
* the default behaviour is expected.
* @param httpHeaders the http headers map.
- * @param translateNce if {@code true}, the {@link javax.ws.rs.core.NoContentException} thrown by a
- * selected message body reader will be translated into a {@link javax.ws.rs.BadRequestException}
+ * @param translateNce if {@code true}, the {@link jakarta.ws.rs.core.NoContentException} thrown by a
+ * selected message body reader will be translated into a {@link jakarta.ws.rs.BadRequestException}
* as required by JAX-RS specification on the server side.
*/
public InboundMessageContext(Configuration configuration, MultivaluedMap<String, String> httpHeaders, boolean translateNce) {
diff --git a/core-common/src/main/java/org/glassfish/jersey/message/internal/NewCookieProvider.java b/core-common/src/main/java/org/glassfish/jersey/message/internal/NewCookieProvider.java
index 2d7a2ea..4808a3c 100644
--- a/core-common/src/main/java/org/glassfish/jersey/message/internal/NewCookieProvider.java
+++ b/core-common/src/main/java/org/glassfish/jersey/message/internal/NewCookieProvider.java
@@ -16,11 +16,13 @@
package org.glassfish.jersey.message.internal;
+import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.NewCookie;
import jakarta.inject.Singleton;
import org.glassfish.jersey.internal.LocalizationMessages;
+import org.glassfish.jersey.http.VersionOptional;
import org.glassfish.jersey.spi.HeaderDelegateProvider;
import java.util.Locale;
@@ -51,7 +53,15 @@
b.append(cookie.getName()).append('=');
StringBuilderUtils.appendQuotedIfWhitespace(b, cookie.getValue());
- b.append(";").append("Version=").append(cookie.getVersion());
+ boolean printVersion = false;
+ if (cookie instanceof VersionOptional) {
+ printVersion = ((VersionOptional) cookie).hasVersion();
+ } else if (cookie.getVersion() == Cookie.DEFAULT_VERSION) {
+ printVersion = true;
+ }
+ if (printVersion) {
+ b.append(";").append("Version=").append(cookie.getVersion());
+ }
if (cookie.getComment() != null) {
b.append(";Comment=");
diff --git a/core-common/src/main/java/org/glassfish/jersey/model/internal/CommonConfig.java b/core-common/src/main/java/org/glassfish/jersey/model/internal/CommonConfig.java
index 4d963f1..d53dfc6 100644
--- a/core-common/src/main/java/org/glassfish/jersey/model/internal/CommonConfig.java
+++ b/core-common/src/main/java/org/glassfish/jersey/model/internal/CommonConfig.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -594,8 +594,8 @@
// Forced (always invoked).
final List<ForcedAutoDiscoverable> forcedAutoDiscroverables = new LinkedList<>();
- for (Class<ForcedAutoDiscoverable> forcedADType : ServiceFinder.find(ForcedAutoDiscoverable.class, true)
- .toClassArray()) {
+ for (Class<ForcedAutoDiscoverable> forcedADType : ServiceFinder.service(ForcedAutoDiscoverable.class)
+ .ignoreNotFound(true).runtimeType(getRuntimeType()).find().toClassArray()) {
forcedAutoDiscroverables.add(injectionManager.createAndInitialize(forcedADType));
}
providers.addAll(forcedAutoDiscroverables);
@@ -606,15 +606,11 @@
}
for (final AutoDiscoverable autoDiscoverable : providers) {
- final ConstrainedTo constrainedTo = autoDiscoverable.getClass().getAnnotation(ConstrainedTo.class);
-
- if (constrainedTo == null || type.equals(constrainedTo.value())) {
- try {
- autoDiscoverable.configure(this);
- } catch (final Exception e) {
- LOGGER.log(Level.FINE,
- LocalizationMessages.AUTODISCOVERABLE_CONFIGURATION_FAILED(autoDiscoverable.getClass()), e);
- }
+ try {
+ autoDiscoverable.configure(this);
+ } catch (final Exception e) {
+ LOGGER.log(Level.FINE,
+ LocalizationMessages.AUTODISCOVERABLE_CONFIGURATION_FAILED(autoDiscoverable.getClass()), e);
}
}
}
diff --git a/core-server/pom.xml b/core-server/pom.xml
index 285f3d0..2583a37 100644
--- a/core-server/pom.xml
+++ b/core-server/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.core</groupId>
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 e027bdc..8b08000 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.V25) {
+ if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V26) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
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 8a6ca40..7fc7335 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
@@ -291,6 +291,7 @@
int V23 = 0 << 16 | 67;
int V24 = 0 << 16 | 68;
int V25 = 0 << 16 | 69;
+ int V26 = 0 << 16 | 70;
/**
* Version flag indicating that the class is using 'preview' features.
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 e5e16be..3ac59a1 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
@@ -1473,7 +1473,7 @@
/**
* Another entry (and so on recursively) having the same hash code (modulo the size of {@link
- * SymbolTable#labelEntries}}) as this one.
+ * SymbolTable#labelEntries}) as this one.
*/
LabelEntry next;
diff --git a/core-server/src/main/java/module-info.java b/core-server/src/main/java/module-info.java
index 733d774..7d3e3f4 100644
--- a/core-server/src/main/java/module-info.java
+++ b/core-server/src/main/java/module-info.java
@@ -37,6 +37,7 @@
exports org.glassfish.jersey.server;
exports org.glassfish.jersey.server.filter;
exports org.glassfish.jersey.server.filter.internal to
+ org.glassfish.jersey.core.common,
org.glassfish.hk2.locator,
org.glassfish.hk2.utilities,
org.glassfish.jersey.incubator.cdi.inject.weld;
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java b/core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java
index d976cca..c0876e0 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java
@@ -1,5 +1,5 @@
/*
- * 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.
*
* This program and the accompanying materials are made available under the
@@ -385,7 +385,7 @@
if (!disableValidation()) {
ComponentModelValidator validator = new ComponentModelValidator(
- bootstrapBag.getValueParamProviders(), bootstrapBag.getMessageBodyWorkers());
+ bootstrapBag.getValueParamProviders(), bootstrapBag.getMessageBodyWorkers(), runtimeConfig);
validator.validate(bootstrapBag.getResourceModel());
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ExternalRequestScopeConfigurator.java b/core-server/src/main/java/org/glassfish/jersey/server/ExternalRequestScopeConfigurator.java
index 1175c6a..981686b 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ExternalRequestScopeConfigurator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ExternalRequestScopeConfigurator.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -43,7 +43,8 @@
public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag) {
ServerBootstrapBag serverBag = (ServerBootstrapBag) bootstrapBag;
- Class<ExternalRequestScope>[] extScopes = ServiceFinder.find(ExternalRequestScope.class, true).toClassArray();
+ Class<ExternalRequestScope>[] extScopes =
+ ServiceFinder.service(ExternalRequestScope.class).ignoreNotFound(true).find().toClassArray();
boolean extScopeBound = false;
if (extScopes.length == 1) {
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java
index 3ef8565..fa7cf93 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 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
@@ -464,6 +464,23 @@
"jersey.config.server.resource.validation.ignoreErrors";
/**
+ * If {@code true} then validation of application resource models will not log a warning when a get resource method consumes an entity.
+ *
+ * This impacts both the validation of root resources during deployment as well as validation of any sub resources
+ * returned from sub-resource locators.
+ * <p>
+ * The default value is {@code false}.
+ * </p>
+ * <p>
+ * The name of the configuration property is <tt>{@value}</tt>.
+ * </p>
+ *
+ * @see #RESOURCE_VALIDATION_DISABLE
+ */
+ public static final String RESOURCE_VALIDATION_IGNORE_GET_CONSUMES_ENTITY_WARNINGS =
+ "jersey.config.server.resource.validation.ignoreGetConsumesEntityWarnings";
+
+ /**
* If {@code true} then application monitoring will be enabled.
*
* This will enable the possibility
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java
index 531e927..1cf7e0a 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 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
@@ -762,7 +762,7 @@
// output streams writes out bytes only on close (for example GZipOutputStream).
response.close();
} catch (final Exception e) {
- LOGGER.log(Level.SEVERE, LocalizationMessages.ERROR_CLOSING_COMMIT_OUTPUT_STREAM(), e);
+ LOGGER.log(Level.FINER, LocalizationMessages.ERROR_CLOSING_COMMIT_OUTPUT_STREAM(), e);
}
}
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeLocatorModelBuilder.java b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeLocatorModelBuilder.java
index aa5c0f3..23b926f 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeLocatorModelBuilder.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/internal/routing/RuntimeLocatorModelBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020 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
@@ -228,7 +228,7 @@
Errors.process(new Runnable() {
@Override
public void run() {
- final ComponentModelValidator validator = new ComponentModelValidator(valueSuppliers, messageBodyWorkers);
+ final ComponentModelValidator validator = new ComponentModelValidator(valueSuppliers, messageBodyWorkers, config);
validator.validate(component);
if (Errors.fatalIssuesFound() && !ignoreValidationErrors) {
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 807252c..3881ba1 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.V25;
+ private static final int WARN_VERSION = Opcodes.V26;
private static final int INPUT_STREAM_DATA_CHUNK_SIZE = 4096;
private final byte[] b;
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/model/ComponentModelValidator.java b/core-server/src/main/java/org/glassfish/jersey/server/model/ComponentModelValidator.java
index b93b172..5cd6878 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/model/ComponentModelValidator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/model/ComponentModelValidator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2019 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
@@ -26,6 +26,8 @@
import org.glassfish.jersey.server.model.internal.ModelErrors;
import org.glassfish.jersey.server.spi.internal.ValueParamProvider;
+import jakarta.ws.rs.core.Configuration;
+
/**
* A resource model validator that checks the given resource model.
*
@@ -57,10 +59,16 @@
private final List<ResourceModelIssue> issueList = new LinkedList<>();
public ComponentModelValidator(Collection<ValueParamProvider> valueParamProviders, MessageBodyWorkers msgBodyWorkers) {
+ this(valueParamProviders, msgBodyWorkers, null);
+ }
+
+ public ComponentModelValidator(Collection<ValueParamProvider> valueParamProviders,
+ MessageBodyWorkers msgBodyWorkers,
+ Configuration configuration) {
validators = new ArrayList<>();
validators.add(new ResourceValidator());
validators.add(new RuntimeResourceModelValidator(msgBodyWorkers));
- validators.add(new ResourceMethodValidator(valueParamProviders));
+ validators.add(new ResourceMethodValidator(valueParamProviders, configuration));
validators.add(new InvocableValidator());
}
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
index 936b00c..39cadf4 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodInvoker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 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
@@ -21,7 +21,6 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
@@ -280,13 +279,8 @@
model.getPriority(ContainerResponseFilter.class)));
}
}
-
- _readerInterceptors.addAll(
- StreamSupport.stream(processingProviders.getGlobalReaderInterceptors().spliterator(), false)
- .collect(Collectors.toList()));
- _writerInterceptors.addAll(
- StreamSupport.stream(processingProviders.getGlobalWriterInterceptors().spliterator(), false)
- .collect(Collectors.toList()));
+ processingProviders.getGlobalReaderInterceptors().forEach(_readerInterceptors::add);
+ processingProviders.getGlobalWriterInterceptors().forEach(_writerInterceptors::add);
if (resourceMethod != null) {
addNameBoundFiltersAndInterceptors(
@@ -458,9 +452,7 @@
if (entityAnn.length == 0) {
response.setEntityAnnotations(methodAnnotations);
} else {
- final Annotation[] mergedAnn = Arrays.copyOf(methodAnnotations,
- methodAnnotations.length + entityAnn.length);
- System.arraycopy(entityAnn, 0, mergedAnn, methodAnnotations.length, entityAnn.length);
+ final Annotation[] mergedAnn = mergeDistinctAnnotations(methodAnnotations, entityAnn);
response.setEntityAnnotations(mergedAnn);
}
}
@@ -487,6 +479,22 @@
return jaxrsResponse;
}
+ private static Annotation[] mergeDistinctAnnotations(Annotation[] existing, Annotation[] newOnes) {
+ List<Annotation> merged = new ArrayList<>(existing.length + newOnes.length);
+ Collections.addAll(merged, existing);
+
+ newOnesLoop:
+ for (Annotation n : newOnes) {
+ for (Annotation ex : existing) {
+ if (ex == n) {
+ continue newOnesLoop;
+ }
+ }
+ merged.add(n);
+ }
+ return merged.toArray(new Annotation[0]);
+ }
+
private Type unwrapInvocableResponseType(ContainerRequest request, Type entityType) {
if (isCompletionStageResponseType
&& request.resolveProperty(ServerProperties.UNWRAP_COMPLETION_STAGE_IN_WRITER_ENABLE, Boolean.TRUE)) {
diff --git a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodValidator.java b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodValidator.java
index ac0c1da..2ab0707 100644
--- a/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodValidator.java
+++ b/core-server/src/main/java/org/glassfish/jersey/server/model/ResourceMethodValidator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 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
@@ -37,10 +37,11 @@
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.QueryParam;
-import jakarta.ws.rs.sse.SseEventSink;
+import jakarta.ws.rs.core.Configuration;
import org.glassfish.jersey.internal.Errors;
import org.glassfish.jersey.server.ContainerRequest;
+import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.internal.LocalizationMessages;
import org.glassfish.jersey.server.model.internal.SseTypeResolver;
import org.glassfish.jersey.server.spi.internal.ParameterValueHelper;
@@ -55,9 +56,15 @@
class ResourceMethodValidator extends AbstractResourceModelVisitor {
private final Collection<ValueParamProvider> valueParamProviders;
+ private final Configuration configuration;
ResourceMethodValidator(Collection<ValueParamProvider> valueParamProviders) {
+ this(valueParamProviders, null);
+ }
+
+ ResourceMethodValidator(Collection<ValueParamProvider> valueParamProviders, Configuration configuration) {
this.valueParamProviders = valueParamProviders;
+ this.configuration = configuration;
}
@Override
@@ -100,7 +107,7 @@
}
// ensure GET does not consume an entity parameter, if not inflector-based
- if (invocable.requiresEntity() && !invocable.isInflector()) {
+ if (invocable.requiresEntity() && !invocable.isInflector() && !shouldIgnoreGetConsumesEntityWarnings(configuration)) {
Errors.warning(method, LocalizationMessages.GET_CONSUMES_ENTITY(invocable.getHandlingMethod()));
}
// ensure GET does not consume any @FormParam annotated parameter
@@ -154,6 +161,16 @@
}
}
+ private static Boolean shouldIgnoreGetConsumesEntityWarnings(Configuration configuration) {
+ if (configuration == null) {
+ return Boolean.FALSE;
+ }
+ return ServerProperties.getValue(configuration.getProperties(),
+ ServerProperties.RESOURCE_VALIDATION_IGNORE_GET_CONSUMES_ENTITY_WARNINGS,
+ Boolean.FALSE,
+ Boolean.class);
+ }
+
private void checkUnexpectedAnnotations(ResourceMethod resourceMethod) {
Invocable invocable = resourceMethod.getInvocable();
for (Annotation annotation : invocable.getHandlingMethod().getDeclaredAnnotations()) {
diff --git a/core-server/src/main/resources/META-INF/NOTICE.markdown b/core-server/src/main/resources/META-INF/NOTICE.markdown
index ab6fea0..a1216f6 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.8
+org.objectweb.asm Version 9.9
* 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/CookieParamAsCookieTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsCookieTest.java
index e81c446..3eaa637 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsCookieTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsCookieTest.java
@@ -16,18 +16,24 @@
package org.glassfish.jersey.server.internal.inject;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import jakarta.ws.rs.CookieParam;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.HeaderParam;
+import jakarta.ws.rs.HttpMethod;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.HttpHeaders;
+import org.glassfish.jersey.http.JerseyCookie;
import org.glassfish.jersey.server.RequestContextBuilder;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -38,39 +44,63 @@
*/
public class CookieParamAsCookieTest extends AbstractTest {
+ private static final String ONE = "one";
+ private static final String TWO = "two";
+ private static final String VALUE_ONE = "value_one";
+ private static final String VALUE_TWO = "value_two";
+
@Path("/")
public static class CookieTypeResource {
@POST
public String post(
@Context HttpHeaders h,
- @CookieParam("one") Cookie one,
- @CookieParam("two") Cookie two,
+ @CookieParam(ONE) Cookie one,
+ @CookieParam(TWO) Cookie two,
@CookieParam("three") Cookie three) {
- assertEquals("one", one.getName());
- assertEquals("value_one", one.getValue());
+ assertEquals(ONE, one.getName());
+ assertEquals(VALUE_ONE, one.getValue());
- assertEquals("two", two.getName());
- assertEquals("value_two", two.getValue());
+ assertEquals(TWO, two.getName());
+ assertEquals(VALUE_TWO, two.getValue());
assertEquals(null, three);
Map<String, Cookie> cs = h.getCookies();
assertEquals(2, cs.size());
- assertEquals("value_one", cs.get("one").getValue());
- assertEquals("value_two", cs.get("two").getValue());
+ assertEquals(VALUE_ONE, cs.get(ONE).getValue());
+ assertEquals(VALUE_TWO, cs.get(TWO).getValue());
return "content";
}
+
+ @Path("list")
+ @GET
+ public String list(@CookieParam(ONE) Cookie one,
+ @CookieParam(TWO) Cookie two,
+ @HeaderParam("Cookie") List<Cookie> cookies) {
+ return cookies.get(0).toString() + ',' + cookies.get(1).toString();
+ }
+
}
@Test
public void testCookieParam() throws ExecutionException, InterruptedException {
initiateWebApplication(CookieTypeResource.class);
- Cookie one = new Cookie("one", "value_one");
- Cookie two = new Cookie("two", "value_two");
+ Cookie one = new Cookie(ONE, VALUE_ONE);
+ Cookie two = new Cookie(TWO, VALUE_TWO);
assertEquals("content", apply(RequestContextBuilder.from("/", "POST").cookie(one).cookie(two).build()).getEntity());
}
+
+ @Test
+ public void testCookieList() throws ExecutionException, InterruptedException {
+ initiateWebApplication(CookieTypeResource.class);
+
+ Cookie one = new Cookie.Builder(ONE).version(-1).value(VALUE_ONE).build();
+ Cookie two = new JerseyCookie.Builder(TWO).value(VALUE_TWO).build();
+ Object response = apply(RequestContextBuilder.from("/list", HttpMethod.GET).cookie(one).cookie(two).build()).getEntity();
+ Assertions.assertEquals(ONE + '=' + VALUE_ONE + ',' + TWO + '=' + VALUE_TWO, response);
+ }
}
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsStringTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsStringTest.java
index 0426b4b..1ba1be5 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsStringTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/CookieParamAsStringTest.java
@@ -22,11 +22,14 @@
import jakarta.ws.rs.CookieParam;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
+import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Cookie;
+import jakarta.ws.rs.core.MediaType;
+import org.glassfish.jersey.http.JerseyCookie;
import org.glassfish.jersey.server.ContainerResponse;
import org.glassfish.jersey.server.RequestContextBuilder;
@@ -102,6 +105,19 @@
assertEquals("a", args.get(0));
return "content";
}
+
+ @GET
+ @Path("headerparam/list")
+ public String list(@HeaderParam("Cookie") List<String> cookies) {
+ StringBuilder sb = new StringBuilder();
+ for (String c : cookies) {
+ if (sb.length() != 0) {
+ sb.append(',');
+ }
+ sb.append(c);
+ }
+ return sb.toString();
+ }
}
@Path("/")
@@ -266,6 +282,22 @@
}
@Test
+ public void testStringListHeaderParam() throws ExecutionException, InterruptedException {
+ String cookieName1 = "COOKIE_1";
+ String cookieValue1 = "VALUE_1";
+ String cookieName2 = "COOKIE_2";
+ String cookieValue2 = "VALUE_2";
+
+ initiateWebApplication(ResourceStringList.class);
+
+ Cookie one = new Cookie.Builder(cookieName1).version(-1).value(cookieValue1).build();
+ Cookie two = new JerseyCookie.Builder(cookieName2).value(cookieValue2).build();
+
+ assertEquals(cookieName1 + '=' + cookieValue1 + "," + cookieName2 + '=' + cookieValue2,
+ getResponseContext("/headerparam/list", MediaType.MEDIA_TYPE_WILDCARD, one, two).getEntity());
+ }
+
+ @Test
public void testStringListEmptyGet() throws ExecutionException, InterruptedException {
initiateWebApplication(ResourceStringListEmpty.class);
diff --git a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java
index 9e53639..06df1b6 100644
--- a/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java
+++ b/core-server/src/test/java/org/glassfish/jersey/server/internal/inject/ParamConverterInternalTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2025 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
@@ -29,8 +29,11 @@
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
+import jakarta.annotation.Priority;
+import jakarta.inject.Singleton;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
@@ -107,6 +110,15 @@
assertEquals(404, responseContext.getStatus());
}
+ @Test
+ public void testCustomEnumResource() throws ExecutionException, InterruptedException {
+ initiateWebApplication(BadEnumResource.class, EnumParamConverterProvider.class);
+ final ContainerResponse responseContext = getResponseContext(UriBuilder.fromPath("/")
+ .queryParam("d", "A").build().toString());
+ assertEquals(1, counter.get());
+ assertEquals(200, responseContext.getStatus());
+ }
+
public static class URIStringReaderProvider implements ParamConverterProvider {
@Override
@@ -191,6 +203,40 @@
}
}
+ static final AtomicInteger counter = new AtomicInteger(0);
+ @Singleton
+ @Priority(1)
+ public static class EnumParamConverterProvider implements ParamConverterProvider {
+
+ @Override
+ public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {
+ if (Enum.class.isAssignableFrom(rawType)) {
+ return new ParamConverter<T>() {
+ @Override
+ public T fromString(final String value) {
+ counter.addAndGet(1);
+ if (value == null) {
+ return null;
+ }
+ Class<? extends Enum> enumClass = null;
+ try {
+ enumClass = (Class<Enum>) Class.forName(genericType.getTypeName());
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ return (T) Enum.valueOf(enumClass, value.toUpperCase());
+ }
+
+ @Override
+ public String toString(final T value) {
+ return String.valueOf(value);
+ }
+ };
+ }
+ return null;
+ }
+ }
+
@Path("/")
public static class ListOfStringResource {
diff --git a/docs/pom.xml b/docs/pom.xml
index f9c3806..50230b5 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-documentation</artifactId>
<packaging>pom</packaging>
diff --git a/examples/NOTICE.md b/examples/NOTICE.md
index 6d8719e..c6361cc 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.18.0
+Jackson JAX-RS Providers Version 2.19.1
* 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.8
+org.objectweb.asm Version 9.9
* 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 5892e6e..1128e5b 100644
--- a/examples/assemblies/pom.xml
+++ b/examples/assemblies/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>assemblies</artifactId>
diff --git a/examples/bookmark-em/pom.xml b/examples/bookmark-em/pom.xml
index 0d46234..e515ba7 100644
--- a/examples/bookmark-em/pom.xml
+++ b/examples/bookmark-em/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>bookmark-em</artifactId>
diff --git a/examples/bookmark/pom.xml b/examples/bookmark/pom.xml
index e0d7ff6..366661d 100644
--- a/examples/bookmark/pom.xml
+++ b/examples/bookmark/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>bookmark</artifactId>
diff --git a/examples/bookstore-webapp/pom.xml b/examples/bookstore-webapp/pom.xml
index 2f37669..ff66ba4 100644
--- a/examples/bookstore-webapp/pom.xml
+++ b/examples/bookstore-webapp/pom.xml
@@ -35,7 +35,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>bookstore-webapp</artifactId>
diff --git a/examples/cdi-webapp/pom.xml b/examples/cdi-webapp/pom.xml
index 5561190..2fec354 100644
--- a/examples/cdi-webapp/pom.xml
+++ b/examples/cdi-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-webapp</artifactId>
diff --git a/examples/cdi-webapp/src/main/resources/META-INF/beans.xml b/examples/cdi-webapp/src/main/resources/META-INF/beans.xml
index 77e336a..ecf04c0 100644
--- a/examples/cdi-webapp/src/main/resources/META-INF/beans.xml
+++ b/examples/cdi-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2022 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/cdi-webapp/src/main/webapp/WEB-INF/beans.xml b/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml
index 77e336a..ecf04c0 100644
--- a/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/examples/cdi-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2022 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/clipboard-programmatic/pom.xml b/examples/clipboard-programmatic/pom.xml
index ea73103..27b6813 100644
--- a/examples/clipboard-programmatic/pom.xml
+++ b/examples/clipboard-programmatic/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>clipboard-programmatic</artifactId>
diff --git a/examples/clipboard/pom.xml b/examples/clipboard/pom.xml
index 06985ae..e342fe8 100644
--- a/examples/clipboard/pom.xml
+++ b/examples/clipboard/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>clipboard</artifactId>
diff --git a/examples/configured-client/pom.xml b/examples/configured-client/pom.xml
index fbf4e45..6532657 100644
--- a/examples/configured-client/pom.xml
+++ b/examples/configured-client/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>configured-client</artifactId>
diff --git a/examples/declarative-linking/pom.xml b/examples/declarative-linking/pom.xml
index 650f9ac..807eac8 100644
--- a/examples/declarative-linking/pom.xml
+++ b/examples/declarative-linking/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>declarative-linking</artifactId>
diff --git a/examples/entity-filtering-security/pom.xml b/examples/entity-filtering-security/pom.xml
index bd39e19..64eccec 100644
--- a/examples/entity-filtering-security/pom.xml
+++ b/examples/entity-filtering-security/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>entity-filtering-security</artifactId>
diff --git a/examples/entity-filtering-selectable/pom.xml b/examples/entity-filtering-selectable/pom.xml
index b8e8dfa..c4ff926 100644
--- a/examples/entity-filtering-selectable/pom.xml
+++ b/examples/entity-filtering-selectable/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>entity-filtering-selectable</artifactId>
diff --git a/examples/entity-filtering/pom.xml b/examples/entity-filtering/pom.xml
index e96d922..c6c2de9 100644
--- a/examples/entity-filtering/pom.xml
+++ b/examples/entity-filtering/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>entity-filtering</artifactId>
diff --git a/examples/exception-mapping/pom.xml b/examples/exception-mapping/pom.xml
index d164b60..2e3c2bc 100644
--- a/examples/exception-mapping/pom.xml
+++ b/examples/exception-mapping/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>exception-mapping</artifactId>
diff --git a/examples/expect-100-continue-netty-client/pom.xml b/examples/expect-100-continue-netty-client/pom.xml
index 2778eb3..7fafe92 100644
--- a/examples/expect-100-continue-netty-client/pom.xml
+++ b/examples/expect-100-continue-netty-client/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
diff --git a/examples/extended-wadl-webapp/pom.xml b/examples/extended-wadl-webapp/pom.xml
index dc19ad9..0860d67 100644
--- a/examples/extended-wadl-webapp/pom.xml
+++ b/examples/extended-wadl-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>extended-wadl-webapp</artifactId>
diff --git a/examples/freemarker-webapp/pom.xml b/examples/freemarker-webapp/pom.xml
index 6c6b82b..ae63393 100644
--- a/examples/freemarker-webapp/pom.xml
+++ b/examples/freemarker-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>freemarker-webapp</artifactId>
diff --git a/examples/groovy/pom.xml b/examples/groovy/pom.xml
index 181b6e4..edb8e60 100644
--- a/examples/groovy/pom.xml
+++ b/examples/groovy/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>groovy</artifactId>
<packaging>jar</packaging>
diff --git a/examples/helloworld-benchmark/pom.xml b/examples/helloworld-benchmark/pom.xml
index 2e8a938..baba86f 100644
--- a/examples/helloworld-benchmark/pom.xml
+++ b/examples/helloworld-benchmark/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-benchmark</artifactId>
diff --git a/examples/helloworld-cdi2-se/pom.xml b/examples/helloworld-cdi2-se/pom.xml
index e0592ca..87c9cf9 100644
--- a/examples/helloworld-cdi2-se/pom.xml
+++ b/examples/helloworld-cdi2-se/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-cdi2-se</artifactId>
diff --git a/examples/helloworld-helidon/README.MD b/examples/helloworld-helidon/README.MD
new file mode 100644
index 0000000..61a5dff
--- /dev/null
+++ b/examples/helloworld-helidon/README.MD
@@ -0,0 +1,33 @@
+[//]: # " 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 Distribution License v. 1.0, which is available at "
+[//]: # " http://www.eclipse.org/org/documents/edl-v10.php. "
+[//]: # " "
+[//]: # " SPDX-License-Identifier: BSD-3-Clause "
+
+Hello World Example
+===================
+
+This example demonstrates Hello World example running on top of Helidon container and using Helidon connector as a client
+implementation for testing. JAX-RS resource returns the usual text `Hello World!`.
+
+Contents
+--------
+
+The mapping of the URI path space is presented in the following table:
+
+URI path | Resource class | HTTP methods | Notes
+-------------------- | ------------------- | ------------ | --------------------------------------------------------
+**_/helloworld_** | HelloWorldResource | GET | Returns `Hello World!`
+
+Running the Example
+-------------------
+
+Run the example as follows:
+
+> mvn clean compile exec:java
+
+This deploys the example using [Helidon](http://helidon.io/) container.
+
+- <http://localhost:8080/helloworld>
diff --git a/examples/helloworld-helidon/pom.xml b/examples/helloworld-helidon/pom.xml
new file mode 100644
index 0000000..b9fcbe1
--- /dev/null
+++ b/examples/helloworld-helidon/pom.xml
@@ -0,0 +1,92 @@
+<?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 Distribution License v. 1.0, which is available at
+ http://www.eclipse.org/org/documents/edl-v10.php.
+
+ SPDX-License-Identifier: BSD-3-Clause
+
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.glassfish.jersey.examples</groupId>
+ <artifactId>project</artifactId>
+ <version>${revision}</version>
+ </parent>
+
+ <artifactId>helloworld-helidon</artifactId>
+ <packaging>jar</packaging>
+ <name>jersey-examples-helloworld-helidon</name>
+
+ <description>Jersey "Hello world" example on Helidon container.</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-helidon-http</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-util</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-helidon</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.connectors</groupId>
+ <artifactId>jersey-helidon-connector</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.helidon.jersey</groupId>
+ <artifactId>helidon-jersey-connector</artifactId>
+ <version>${helidon.connector.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <configuration>
+ <mainClass>org.glassfish.jersey.examples.helloworld.helidon.App</mainClass>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>pre-release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/App.java b/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/App.java
new file mode 100644
index 0000000..e735863
--- /dev/null
+++ b/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/App.java
@@ -0,0 +1,62 @@
+/*
+ * 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 Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.glassfish.jersey.examples.helloworld.helidon;
+
+import java.net.URI;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import jakarta.ws.rs.SeBootstrap;
+import org.glassfish.jersey.helidon.HelidonHttpContainerProvider;
+import org.glassfish.jersey.helidon.HelidonHttpServer;
+import org.glassfish.jersey.server.JerseySeBootstrapConfiguration;
+import org.glassfish.jersey.server.ResourceConfig;
+
+/**
+ * Hello world!
+ */
+public class App {
+
+ static final String ROOT_PATH = "helloworld";
+
+ private static final URI BASE_URI = URI.create("http://localhost:8080/");
+
+ public static void main(String[] args) {
+ try {
+ System.out.println("\"Hello World\" Jersey Example App on Helidon container.");
+
+ ResourceConfig resourceConfig = new ResourceConfig(HelloWorldResource.class);
+ final SeBootstrap.Configuration config =
+ JerseySeBootstrapConfiguration.builder().host("localhost").port(8080).build();
+ /*
+ final WebServer server = HelidonHttpContainerBuilder.builder()
+ .host("localhost").port(8080).application(resourceConfig).build();
+ */
+ final HelidonHttpServer server = new HelidonHttpContainerProvider()
+ .createServer(HelidonHttpServer.class, resourceConfig, config);
+ server.start();
+
+ Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+ @Override
+ public void run() {
+ server.stop();
+ }
+ }));
+
+ System.out.println(String.format("Application started. \nTry out %s%s\nStop the application using "
+ + "CTRL+C.", BASE_URI, ROOT_PATH));
+ Thread.currentThread().join();
+ } catch (InterruptedException ex) {
+ Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
+ }
+
+ }
+}
diff --git a/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldResource.java b/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldResource.java
new file mode 100644
index 0000000..394e18f
--- /dev/null
+++ b/examples/helloworld-helidon/src/main/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldResource.java
@@ -0,0 +1,48 @@
+/*
+ * 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 Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.glassfish.jersey.examples.helloworld.helidon;
+
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DefaultValue;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.QueryParam;
+
+@Path("helloworld")
+public class HelloWorldResource {
+ public static final String CLICHED_MESSAGE = "Hello World!";
+
+ @GET
+ @Produces("text/plain")
+ public String getHello() {
+ return CLICHED_MESSAGE;
+ }
+
+ @GET
+ @Path("query1")
+ @Produces("text/plain")
+ public String getQueryParameter(@DefaultValue("error1") @QueryParam(value = "test1") String test1,
+ @DefaultValue("error2") @QueryParam(value = "test2") String test2) {
+ return test1 + test2;
+ }
+
+ @POST
+ @Path("query2")
+ @Consumes("text/plain")
+ @Produces("text/plain")
+ public String postQueryParameter(@DefaultValue("error1") @QueryParam(value = "test1") String test1,
+ @DefaultValue("error2") @QueryParam(value = "test2") String test2, String entity) {
+ return entity + test1 + test2;
+ }
+
+}
diff --git a/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/CustomLoggingFilter.java b/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/CustomLoggingFilter.java
new file mode 100644
index 0000000..caf4575
--- /dev/null
+++ b/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/CustomLoggingFilter.java
@@ -0,0 +1,67 @@
+/*
+ * 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 Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.glassfish.jersey.examples.helloworld.helidon;
+
+import java.io.IOException;
+import java.util.logging.Logger;
+
+import jakarta.ws.rs.client.ClientRequestContext;
+import jakarta.ws.rs.client.ClientRequestFilter;
+import jakarta.ws.rs.client.ClientResponseContext;
+import jakarta.ws.rs.client.ClientResponseFilter;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * Custom logging filter.
+ *
+ */
+public class CustomLoggingFilter implements ContainerRequestFilter, ContainerResponseFilter,
+ ClientRequestFilter, ClientResponseFilter {
+
+ private static final Logger LOGGER = Logger.getLogger(CustomLoggingFilter.class.getName());
+
+ static int preFilterCalled = 0;
+ static int postFilterCalled = 0;
+
+ @Override
+ public void filter(ClientRequestContext context) throws IOException {
+ LOGGER.info("CustomLoggingFilter.preFilter called");
+ assertEquals("bar", context.getConfiguration().getProperty("foo"));
+ preFilterCalled++;
+ }
+
+ @Override
+ public void filter(ClientRequestContext context, ClientResponseContext clientResponseContext) throws IOException {
+ LOGGER.info("CustomLoggingFilter.postFilter called");
+ assertEquals("bar", context.getConfiguration().getProperty("foo"));
+ postFilterCalled++;
+ }
+
+ @Override
+ public void filter(ContainerRequestContext context) throws IOException {
+ LOGGER.info("CustomLoggingFilter.preFilter called");
+ assertEquals("bar", context.getProperty("foo"));
+ preFilterCalled++;
+ }
+
+ @Override
+ public void filter(ContainerRequestContext context, ContainerResponseContext containerResponseContext) throws IOException {
+ LOGGER.info("CustomLoggingFilter.postFilter called");
+ assertEquals("bar", context.getProperty("foo"));
+ postFilterCalled++;
+ }
+}
+
diff --git a/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldTest.java b/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldTest.java
new file mode 100644
index 0000000..ae6d0f5
--- /dev/null
+++ b/examples/helloworld-helidon/src/test/java/org/glassfish/jersey/examples/helloworld/helidon/HelloWorldTest.java
@@ -0,0 +1,263 @@
+/*
+ * 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 Distribution License v. 1.0, which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+package org.glassfish.jersey.examples.helloworld.helidon;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
+
+import jakarta.ws.rs.client.Client;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.client.InvocationCallback;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriBuilder;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.helidon.connector.HelidonConnectorProvider;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.TestProperties;
+import org.glassfish.jersey.test.helidon.HelidonTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerException;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
+import org.junit.jupiter.api.parallel.ResourceAccessMode;
+import org.junit.jupiter.api.parallel.ResourceLock;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+public class HelloWorldTest extends JerseyTest {
+
+ @Override
+ protected ResourceConfig configure() {
+ enable(TestProperties.LOG_TRAFFIC);
+ // enable(TestProperties.DUMP_ENTITY);
+ return new ResourceConfig(HelloWorldResource.class);
+ }
+
+ @Override
+ protected void configureClient(ClientConfig clientConfig) {
+ clientConfig.connectorProvider(new HelidonConnectorProvider());
+ }
+
+ @Override
+ protected TestContainerFactory getTestContainerFactory() throws TestContainerException {
+ return new HelidonTestContainerFactory();
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testHelloWorld() throws Exception {
+ URL getUrl = UriBuilder.fromUri(getBaseUri()).path(App.ROOT_PATH).build().toURL();
+ HttpURLConnection connection = (HttpURLConnection) getUrl.openConnection();
+ try {
+ connection.setDoOutput(true);
+ connection.setInstanceFollowRedirects(false);
+ connection.setRequestMethod("GET");
+ connection.setRequestProperty("Content-Type", "text/plain");
+ assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
+ } finally {
+ connection.disconnect();
+ }
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testConnection() {
+ Response response = target().path(App.ROOT_PATH).request("text/plain").get();
+ assertEquals(200, response.getStatus());
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testClientStringResponse() {
+ String s = target().path(App.ROOT_PATH).request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testAsyncClientRequests() throws InterruptedException {
+ final int REQUESTS = 10;
+ final CountDownLatch latch = new CountDownLatch(REQUESTS);
+ final long tic = System.currentTimeMillis();
+ for (int i = 0; i < REQUESTS; i++) {
+ final int id = i;
+ target().path(App.ROOT_PATH).request().async().get(new InvocationCallback<Response>() {
+ @Override
+ public void completed(Response response) {
+ try {
+ final String result = response.readEntity(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, result);
+ } finally {
+ latch.countDown();
+ }
+ }
+
+ @Override
+ public void failed(Throwable error) {
+ error.printStackTrace();
+ latch.countDown();
+ }
+ });
+ }
+ latch.await(10 * getAsyncTimeoutMultiplier(), TimeUnit.SECONDS);
+ final long toc = System.currentTimeMillis();
+ Logger.getLogger(HelloWorldTest.class.getName()).info("Executed in: " + (toc - tic));
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testHead() {
+ Response response = target().path(App.ROOT_PATH).request().head();
+ assertEquals(200, response.getStatus());
+ assertEquals(MediaType.TEXT_PLAIN_TYPE, response.getMediaType());
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testFooBarOptions() {
+ Response response = target().path(App.ROOT_PATH).request().header("Accept", "foo/bar").options();
+ assertEquals(200, response.getStatus());
+ final String allowHeader = response.getHeaderString("Allow");
+ _checkAllowContent(allowHeader);
+ assertEquals("foo/bar", response.getMediaType().toString());
+ assertEquals(0, response.getLength());
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testTextPlainOptions() {
+ Response response = target().path(App.ROOT_PATH).request().header("Accept", MediaType.TEXT_PLAIN).options();
+ assertEquals(200, response.getStatus());
+ final String allowHeader = response.getHeaderString("Allow");
+ _checkAllowContent(allowHeader);
+ assertEquals(MediaType.TEXT_PLAIN_TYPE, response.getMediaType());
+ final String responseBody = response.readEntity(String.class);
+ _checkAllowContent(responseBody);
+ }
+
+ private void _checkAllowContent(final String content) {
+ assertTrue(content.contains("GET"));
+ assertTrue(content.contains("HEAD"));
+ assertTrue(content.contains("OPTIONS"));
+ }
+
+ @Test
+ @Execution(ExecutionMode.CONCURRENT)
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ)
+ public void testMissingResourceNotFound() {
+ Response response;
+
+ response = target().path(App.ROOT_PATH + "arbitrary").request().get();
+ assertEquals(404, response.getStatus());
+
+ response = target().path(App.ROOT_PATH).path("arbitrary").request().get();
+ assertEquals(404, response.getStatus());
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testLoggingFilterClientClass() {
+ Client client = client();
+ client.register(CustomLoggingFilter.class).property("foo", "bar");
+ CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
+ String s = target().path(App.ROOT_PATH).request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ assertEquals(1, CustomLoggingFilter.preFilterCalled);
+ assertEquals(1, CustomLoggingFilter.postFilterCalled);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testLoggingFilterClientInstance() {
+ Client client = client();
+ client.register(new CustomLoggingFilter()).property("foo", "bar");
+ CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
+ String s = target().path(App.ROOT_PATH).request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ assertEquals(1, CustomLoggingFilter.preFilterCalled);
+ assertEquals(1, CustomLoggingFilter.postFilterCalled);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testLoggingFilterTargetClass() {
+ WebTarget target = target().path(App.ROOT_PATH);
+ target.register(CustomLoggingFilter.class).property("foo", "bar");
+ CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
+ String s = target.request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ assertEquals(1, CustomLoggingFilter.preFilterCalled);
+ assertEquals(1, CustomLoggingFilter.postFilterCalled);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testLoggingFilterTargetInstance() {
+ WebTarget target = target().path(App.ROOT_PATH);
+ target.register(new CustomLoggingFilter()).property("foo", "bar");
+ CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
+ String s = target.request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ assertEquals(1, CustomLoggingFilter.preFilterCalled);
+ assertEquals(1, CustomLoggingFilter.postFilterCalled);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testConfigurationUpdate() {
+ Client client1 = client();
+ client1.register(CustomLoggingFilter.class).property("foo", "bar");
+
+ Client client = ClientBuilder.newClient(client1.getConfiguration());
+ CustomLoggingFilter.preFilterCalled = CustomLoggingFilter.postFilterCalled = 0;
+ String s = target().path(App.ROOT_PATH).request().get(String.class);
+ assertEquals(HelloWorldResource.CLICHED_MESSAGE, s);
+ assertEquals(1, CustomLoggingFilter.preFilterCalled);
+ assertEquals(1, CustomLoggingFilter.postFilterCalled);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testQueryParameterGet() {
+ String result = target().path(App.ROOT_PATH + "/query1").queryParam("test1", "expected1")
+ .queryParam("test2", "expected2").request().get(String.class);
+ assertEquals("expected1expected2", result);
+ }
+
+ @Test
+ @ResourceLock(value = "dummy", mode = ResourceAccessMode.READ_WRITE)
+ public void testQueryParameterPost() {
+ String result = target().path(App.ROOT_PATH + "/query2").queryParam("test1", "expected1")
+ .queryParam("test2", "expected2").request("text/plain").post(Entity.entity("entity", "text/plain"))
+ .readEntity(String.class);
+ assertEquals("entityexpected1expected2", result);
+ }
+
+}
diff --git a/examples/helloworld-netty/pom.xml b/examples/helloworld-netty/pom.xml
index eaf8dee..be362f3 100644
--- a/examples/helloworld-netty/pom.xml
+++ b/examples/helloworld-netty/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-netty</artifactId>
diff --git a/examples/helloworld-programmatic/pom.xml b/examples/helloworld-programmatic/pom.xml
index e03478a..f9a5679 100644
--- a/examples/helloworld-programmatic/pom.xml
+++ b/examples/helloworld-programmatic/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-programmatic</artifactId>
diff --git a/examples/helloworld-pure-jax-rs/pom.xml b/examples/helloworld-pure-jax-rs/pom.xml
index 7b52712..e4b3795 100644
--- a/examples/helloworld-pure-jax-rs/pom.xml
+++ b/examples/helloworld-pure-jax-rs/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-pure-jax-rs</artifactId>
diff --git a/examples/helloworld-spring-annotations/pom.xml b/examples/helloworld-spring-annotations/pom.xml
index 42f2fd9..e43dd36 100644
--- a/examples/helloworld-spring-annotations/pom.xml
+++ b/examples/helloworld-spring-annotations/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.examples</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>helloworld-spring-annotations</artifactId>
diff --git a/examples/helloworld-spring-webapp/pom.xml b/examples/helloworld-spring-webapp/pom.xml
index c7d1eb7..5396554 100644
--- a/examples/helloworld-spring-webapp/pom.xml
+++ b/examples/helloworld-spring-webapp/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-spring-webapp</artifactId>
@@ -76,6 +76,12 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>io.micrometer</groupId>
+ <artifactId>micrometer-observation</artifactId>
+ </exclusion>
+ </exclusions>
<version>${spring6.version}</version>
</dependency>
<dependency>
diff --git a/examples/helloworld-webapp/pom.xml b/examples/helloworld-webapp/pom.xml
index a2084ec..d95af8d 100644
--- a/examples/helloworld-webapp/pom.xml
+++ b/examples/helloworld-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-webapp</artifactId>
diff --git a/examples/helloworld-weld/pom.xml b/examples/helloworld-weld/pom.xml
index 9290c8a..0445d77 100644
--- a/examples/helloworld-weld/pom.xml
+++ b/examples/helloworld-weld/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld-weld</artifactId>
diff --git a/examples/helloworld-weld/src/main/resources/META-INF/beans.xml b/examples/helloworld-weld/src/main/resources/META-INF/beans.xml
index 77e336a..ecf04c0 100644
--- a/examples/helloworld-weld/src/main/resources/META-INF/beans.xml
+++ b/examples/helloworld-weld/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2022 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/helloworld/pom.xml b/examples/helloworld/pom.xml
index bed850c..d9ab1b6 100644
--- a/examples/helloworld/pom.xml
+++ b/examples/helloworld/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>helloworld</artifactId>
diff --git a/examples/http-patch/pom.xml b/examples/http-patch/pom.xml
index da243fd..b4b04dc 100644
--- a/examples/http-patch/pom.xml
+++ b/examples/http-patch/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>http-patch</artifactId>
diff --git a/examples/http-trace/pom.xml b/examples/http-trace/pom.xml
index 4cc1f48..805556d 100644
--- a/examples/http-trace/pom.xml
+++ b/examples/http-trace/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>http-trace</artifactId>
diff --git a/examples/https-clientserver-grizzly/pom.xml b/examples/https-clientserver-grizzly/pom.xml
index 920961f..974d990 100644
--- a/examples/https-clientserver-grizzly/pom.xml
+++ b/examples/https-clientserver-grizzly/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>https-clientserver-grizzly</artifactId>
diff --git a/examples/https-server-glassfish/pom.xml b/examples/https-server-glassfish/pom.xml
index 06cdcf9..e99b234 100644
--- a/examples/https-server-glassfish/pom.xml
+++ b/examples/https-server-glassfish/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>https-server-glassfish</artifactId>
diff --git a/examples/java8-webapp/pom.xml b/examples/java8-webapp/pom.xml
index 79875d0..38c2c33 100644
--- a/examples/java8-webapp/pom.xml
+++ b/examples/java8-webapp/pom.xml
@@ -18,7 +18,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>java8-webapp</artifactId>
diff --git a/examples/jaxb/pom.xml b/examples/jaxb/pom.xml
index 64bd939..f6850b6 100644
--- a/examples/jaxb/pom.xml
+++ b/examples/jaxb/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jaxb</artifactId>
diff --git a/examples/jaxrs-types-injection/pom.xml b/examples/jaxrs-types-injection/pom.xml
index 499fc41..c0498c4 100644
--- a/examples/jaxrs-types-injection/pom.xml
+++ b/examples/jaxrs-types-injection/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jaxrs-types-injection</artifactId>
diff --git a/examples/jersey-ejb/pom.xml b/examples/jersey-ejb/pom.xml
index c09cdea..f9ad407 100644
--- a/examples/jersey-ejb/pom.xml
+++ b/examples/jersey-ejb/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-ejb</artifactId>
diff --git a/examples/json-binding-webapp/pom.xml b/examples/json-binding-webapp/pom.xml
index d75f755..52e9acb 100644
--- a/examples/json-binding-webapp/pom.xml
+++ b/examples/json-binding-webapp/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-binding-webapp</artifactId>
diff --git a/examples/json-jackson/pom.xml b/examples/json-jackson/pom.xml
index 88d6dd0..97fa625 100644
--- a/examples/json-jackson/pom.xml
+++ b/examples/json-jackson/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-jackson</artifactId>
diff --git a/examples/json-jettison/pom.xml b/examples/json-jettison/pom.xml
index f24d168..2b44c6b 100644
--- a/examples/json-jettison/pom.xml
+++ b/examples/json-jettison/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-jettison</artifactId>
diff --git a/examples/json-moxy/pom.xml b/examples/json-moxy/pom.xml
index 1b429a9..db8204c 100644
--- a/examples/json-moxy/pom.xml
+++ b/examples/json-moxy/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-moxy</artifactId>
diff --git a/examples/json-processing-webapp/pom.xml b/examples/json-processing-webapp/pom.xml
index 2a64b93..a089427 100644
--- a/examples/json-processing-webapp/pom.xml
+++ b/examples/json-processing-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-processing-webapp</artifactId>
diff --git a/examples/json-with-padding/pom.xml b/examples/json-with-padding/pom.xml
index 7158ad7..45d3871 100644
--- a/examples/json-with-padding/pom.xml
+++ b/examples/json-with-padding/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-with-padding</artifactId>
diff --git a/examples/managed-beans-webapp/pom.xml b/examples/managed-beans-webapp/pom.xml
index 7280d61..edc030c 100644
--- a/examples/managed-beans-webapp/pom.xml
+++ b/examples/managed-beans-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>managed-beans-webapp</artifactId>
diff --git a/examples/managed-client-simple-webapp/pom.xml b/examples/managed-client-simple-webapp/pom.xml
index 69e4161..f7ed71e 100644
--- a/examples/managed-client-simple-webapp/pom.xml
+++ b/examples/managed-client-simple-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>managed-client-simple-webapp</artifactId>
diff --git a/examples/managed-client-webapp/pom.xml b/examples/managed-client-webapp/pom.xml
index 9fee3fc..6c2d39f 100644
--- a/examples/managed-client-webapp/pom.xml
+++ b/examples/managed-client-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>managed-client-webapp</artifactId>
diff --git a/examples/managed-client/pom.xml b/examples/managed-client/pom.xml
index bb64ff9..480f4f8 100644
--- a/examples/managed-client/pom.xml
+++ b/examples/managed-client/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>managed-client</artifactId>
diff --git a/examples/micrometer/pom.xml b/examples/micrometer/pom.xml
index adba4e1..470ef5c 100644
--- a/examples/micrometer/pom.xml
+++ b/examples/micrometer/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-micrometer-webapp</artifactId>
diff --git a/examples/multipart-webapp/pom.xml b/examples/multipart-webapp/pom.xml
index 6490460..22f047c 100644
--- a/examples/multipart-webapp/pom.xml
+++ b/examples/multipart-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>multipart-webapp</artifactId>
diff --git a/examples/oauth-client-twitter/pom.xml b/examples/oauth-client-twitter/pom.xml
index c1eafab..14ec454 100644
--- a/examples/oauth-client-twitter/pom.xml
+++ b/examples/oauth-client-twitter/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.examples</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/examples/open-tracing/pom.xml b/examples/open-tracing/pom.xml
index 5b2e5ad..d6afe57 100644
--- a/examples/open-tracing/pom.xml
+++ b/examples/open-tracing/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>open-tracing</artifactId>
diff --git a/examples/osgi-helloworld-webapp/additional-bundle/pom.xml b/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
index b76e273..e1badb0 100644
--- a/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/additional-bundle/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>osgi-helloworld-webapp</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.examples.osgi-helloworld-webapp</groupId>
diff --git a/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml b/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
index 60611b0..c1d5abf 100644
--- a/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/alternate-version-bundle/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>osgi-helloworld-webapp</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.examples.osgi-helloworld-webapp</groupId>
diff --git a/examples/osgi-helloworld-webapp/functional-test/pom.xml b/examples/osgi-helloworld-webapp/functional-test/pom.xml
index ec2b346..350e508 100644
--- a/examples/osgi-helloworld-webapp/functional-test/pom.xml
+++ b/examples/osgi-helloworld-webapp/functional-test/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>osgi-helloworld-webapp</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.examples.osgi-helloworld-webapp</groupId>
diff --git a/examples/osgi-helloworld-webapp/functional-test/src/test/resources/felix.policy b/examples/osgi-helloworld-webapp/functional-test/src/test/resources/felix.policy
index d8348f9..51a40bb 100644
--- a/examples/osgi-helloworld-webapp/functional-test/src/test/resources/felix.policy
+++ b/examples/osgi-helloworld-webapp/functional-test/src/test/resources/felix.policy
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2014, 2020 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
@@ -33,6 +33,7 @@
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (org.osgi.framework.PackagePermission) } "packagePermissionToJerseyCommon";
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.lang.reflect.ReflectPermission "suppressAccessChecks") } "suppressAccessChecksToJerseyCommon";
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.net.SocketPermission "*" "connect,resolve") } "socketPermissionToJerseyCommon";
+allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.net.NetPermission "*" "getProxySelector") } "proxySelectorToClientProxy";
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.lang.RuntimePermission "accessDeclaredMembers") } "accessDeclaredMembersToJerseyCommon";
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.lang.RuntimePermission "accessClassInPackage.sun.misc") } "accessClassInPackageSunMisc";
allow { [org.osgi.service.condpermadmin.BundleLocationCondition "*jersey-common*"] (java.lang.RuntimePermission "getClassLoader") } "getCLToJerseyCommon";
diff --git a/examples/osgi-helloworld-webapp/lib-bundle/pom.xml b/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
index be2be09..1e08cbb 100644
--- a/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/lib-bundle/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>osgi-helloworld-webapp</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.examples.osgi-helloworld-webapp</groupId>
diff --git a/examples/osgi-helloworld-webapp/pom.xml b/examples/osgi-helloworld-webapp/pom.xml
index 8bdef3d..093b8f2 100644
--- a/examples/osgi-helloworld-webapp/pom.xml
+++ b/examples/osgi-helloworld-webapp/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>osgi-helloworld-webapp</artifactId>
diff --git a/examples/osgi-helloworld-webapp/war-bundle/pom.xml b/examples/osgi-helloworld-webapp/war-bundle/pom.xml
index cd7a8b1..93714a2 100644
--- a/examples/osgi-helloworld-webapp/war-bundle/pom.xml
+++ b/examples/osgi-helloworld-webapp/war-bundle/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>osgi-helloworld-webapp</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.examples.osgi-helloworld-webapp</groupId>
diff --git a/examples/pom.xml b/examples/pom.xml
index 68f6811..d7c05cb 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<licenses>
@@ -282,4 +282,17 @@
</resource>
</resources>
</build>
+
+ <profiles>
+ <profile>
+ <id>jdk21</id>
+ <activation>
+ <jdk>[21,)</jdk>
+ </activation>
+ <modules>
+ <module>helloworld-helidon</module>
+ </modules>
+ </profile>
+ </profiles>
+
</project>
diff --git a/examples/reload/pom.xml b/examples/reload/pom.xml
index b5efd3d..ae1ce08 100644
--- a/examples/reload/pom.xml
+++ b/examples/reload/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>reload</artifactId>
diff --git a/examples/rest31-sebootstrap-multipart/pom.xml b/examples/rest31-sebootstrap-multipart/pom.xml
index 93fa450..b57cb2d 100644
--- a/examples/rest31-sebootstrap-multipart/pom.xml
+++ b/examples/rest31-sebootstrap-multipart/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>rest31-sebootstrap-multipart</artifactId>
diff --git a/examples/rx-client-webapp/pom.xml b/examples/rx-client-webapp/pom.xml
index 9b5983f..a075d2d 100644
--- a/examples/rx-client-webapp/pom.xml
+++ b/examples/rx-client-webapp/pom.xml
@@ -18,7 +18,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>rx-client-webapp</artifactId>
diff --git a/examples/server-async-managed/pom.xml b/examples/server-async-managed/pom.xml
index c2405b1..5517eb7 100644
--- a/examples/server-async-managed/pom.xml
+++ b/examples/server-async-managed/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-async-managed</artifactId>
diff --git a/examples/server-async-standalone/client/pom.xml b/examples/server-async-standalone/client/pom.xml
index 1551e52..01c02ba 100644
--- a/examples/server-async-standalone/client/pom.xml
+++ b/examples/server-async-standalone/client/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>server-async-standalone</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-async-standalone-client</artifactId>
diff --git a/examples/server-async-standalone/pom.xml b/examples/server-async-standalone/pom.xml
index c58e539..e214f4c 100644
--- a/examples/server-async-standalone/pom.xml
+++ b/examples/server-async-standalone/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-async-standalone</artifactId>
diff --git a/examples/server-async-standalone/webapp/pom.xml b/examples/server-async-standalone/webapp/pom.xml
index 52a7a3b..efc7bbc 100644
--- a/examples/server-async-standalone/webapp/pom.xml
+++ b/examples/server-async-standalone/webapp/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>server-async-standalone</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-async-standalone-webapp</artifactId>
diff --git a/examples/server-async/pom.xml b/examples/server-async/pom.xml
index 1961b32..dee6cac 100644
--- a/examples/server-async/pom.xml
+++ b/examples/server-async/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-async</artifactId>
diff --git a/examples/server-sent-events-jaxrs/pom.xml b/examples/server-sent-events-jaxrs/pom.xml
index 686b823..610f623 100644
--- a/examples/server-sent-events-jaxrs/pom.xml
+++ b/examples/server-sent-events-jaxrs/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-sent-events-jaxrs</artifactId>
diff --git a/examples/server-sent-events-jersey/pom.xml b/examples/server-sent-events-jersey/pom.xml
index e323c72..a310d7d 100644
--- a/examples/server-sent-events-jersey/pom.xml
+++ b/examples/server-sent-events-jersey/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>server-sent-events-jersey</artifactId>
diff --git a/examples/servlet3-webapp/pom.xml b/examples/servlet3-webapp/pom.xml
index e10b374..12bd418 100644
--- a/examples/servlet3-webapp/pom.xml
+++ b/examples/servlet3-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet3-webapp</artifactId>
diff --git a/examples/simple-console/pom.xml b/examples/simple-console/pom.xml
index 1113726..6a2cb00 100644
--- a/examples/simple-console/pom.xml
+++ b/examples/simple-console/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>simple-console</artifactId>
diff --git a/examples/sse-item-store-jaxrs-webapp/pom.xml b/examples/sse-item-store-jaxrs-webapp/pom.xml
index 2b4046c..68e704b 100644
--- a/examples/sse-item-store-jaxrs-webapp/pom.xml
+++ b/examples/sse-item-store-jaxrs-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>sse-item-store-jaxrs-webapp</artifactId>
diff --git a/examples/sse-item-store-jersey-webapp/pom.xml b/examples/sse-item-store-jersey-webapp/pom.xml
index 817528a..80185f1 100644
--- a/examples/sse-item-store-jersey-webapp/pom.xml
+++ b/examples/sse-item-store-jersey-webapp/pom.xml
@@ -19,7 +19,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>webapp-example-parent</artifactId>
<relativePath>../webapp-example-parent/pom.xml</relativePath>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>sse-item-store-jersey-webapp</artifactId>
diff --git a/examples/sse-twitter-aggregator/pom.xml b/examples/sse-twitter-aggregator/pom.xml
index 092058e..4da9257 100644
--- a/examples/sse-twitter-aggregator/pom.xml
+++ b/examples/sse-twitter-aggregator/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>sse-twitter-aggregator</artifactId>
diff --git a/examples/system-properties-example/pom.xml b/examples/system-properties-example/pom.xml
index 0a9ddcb..8c6b733 100644
--- a/examples/system-properties-example/pom.xml
+++ b/examples/system-properties-example/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>system-properties-example</artifactId>
diff --git a/examples/webapp-example-parent/pom.xml b/examples/webapp-example-parent/pom.xml
index b7d709c..a3b31a9 100644
--- a/examples/webapp-example-parent/pom.xml
+++ b/examples/webapp-example-parent/pom.xml
@@ -18,7 +18,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>webapp-example-parent</artifactId>
diff --git a/examples/xml-moxy/pom.xml b/examples/xml-moxy/pom.xml
index 7cea2cf..efc54aa 100644
--- a/examples/xml-moxy/pom.xml
+++ b/examples/xml-moxy/pom.xml
@@ -16,7 +16,7 @@
<parent>
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>xml-moxy</artifactId>
diff --git a/ext/bean-validation/pom.xml b/ext/bean-validation/pom.xml
index 72e78c1..fe7790c 100644
--- a/ext/bean-validation/pom.xml
+++ b/ext/bean-validation/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-bean-validation</artifactId>
diff --git a/ext/cdi/jersey-cdi-rs-inject/pom.xml b/ext/cdi/jersey-cdi-rs-inject/pom.xml
index 5ed8b63..fd68197 100644
--- a/ext/cdi/jersey-cdi-rs-inject/pom.xml
+++ b/ext/cdi/jersey-cdi-rs-inject/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
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 5e11245..290637f 100644
--- a/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
+++ b/ext/cdi/jersey-cdi1x-ban-custom-hk2-binding/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi1x-ban-custom-hk2-binding</artifactId>
diff --git a/ext/cdi/jersey-cdi1x-servlet/pom.xml b/ext/cdi/jersey-cdi1x-servlet/pom.xml
index 0532887..fd02392 100644
--- a/ext/cdi/jersey-cdi1x-servlet/pom.xml
+++ b/ext/cdi/jersey-cdi1x-servlet/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi1x-servlet</artifactId>
diff --git a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java
index ce367f5..e19ba4b 100644
--- a/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java
+++ b/ext/cdi/jersey-cdi1x-servlet/src/main/java/org/glassfish/jersey/ext/cdi1x/servlet/internal/CdiExternalRequestScopeExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2025 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
@@ -14,6 +14,7 @@
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
+
package org.glassfish.jersey.ext.cdi1x.servlet.internal;
import java.lang.annotation.Annotation;
diff --git a/ext/cdi/jersey-cdi1x-transaction/pom.xml b/ext/cdi/jersey-cdi1x-transaction/pom.xml
index 269f023..d7b469a 100644
--- a/ext/cdi/jersey-cdi1x-transaction/pom.xml
+++ b/ext/cdi/jersey-cdi1x-transaction/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi1x-transaction</artifactId>
diff --git a/ext/cdi/jersey-cdi1x-validation/pom.xml b/ext/cdi/jersey-cdi1x-validation/pom.xml
index 0e093d7..1f44482 100644
--- a/ext/cdi/jersey-cdi1x-validation/pom.xml
+++ b/ext/cdi/jersey-cdi1x-validation/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi1x-validation</artifactId>
diff --git a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java
index 875f63c..30af36c 100644
--- a/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java
+++ b/ext/cdi/jersey-cdi1x-validation/src/main/java/org/glassfish/jersey/ext/cdi1x/validation/internal/CdiInterceptorWrapperExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022 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 acd12e6..f0a2100 100644
--- a/ext/cdi/jersey-cdi1x/pom.xml
+++ b/ext/cdi/jersey-cdi1x/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi1x</artifactId>
diff --git a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
index 4984a34..4e3627b 100644
--- a/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
+++ b/ext/cdi/jersey-cdi1x/src/main/java/org/glassfish/jersey/ext/cdi1x/internal/CdiComponentProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2024 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2022 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-weld2-se/pom.xml b/ext/cdi/jersey-weld2-se/pom.xml
index 86c9ad3..a342a87 100644
--- a/ext/cdi/jersey-weld2-se/pom.xml
+++ b/ext/cdi/jersey-weld2-se/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-weld2-se</artifactId>
diff --git a/ext/cdi/pom.xml b/ext/cdi/pom.xml
index 0b2bff6..b54b15c 100644
--- a/ext/cdi/pom.xml
+++ b/ext/cdi/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
diff --git a/ext/constants/pom.xml b/ext/constants/pom.xml
new file mode 100644
index 0000000..c5a1588
--- /dev/null
+++ b/ext/constants/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+
+ 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.ext</groupId>
+ <artifactId>project</artifactId>
+ <version>${revision}</version>
+ </parent>
+
+ <artifactId>jersey-constants</artifactId>
+ <name>jersey-ext-constants</name>
+
+ <description>
+ Jersey extension module providing well know constants.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/ext/constants/src/main/java/org/glassfish/jersey/constants/http/MediaTypes.java b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/MediaTypes.java
new file mode 100644
index 0000000..fcad02e
--- /dev/null
+++ b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/MediaTypes.java
@@ -0,0 +1,9253 @@
+/*
+ * 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.constants.http;
+
+import jakarta.ws.rs.core.MediaType;
+
+/**
+ * <p>
+ * List of well know media types representations defined by various sources.
+ * The media types are grouped by main types into {@link Application}, {@link Audio},
+ * {@link Font}, {@link Haptics}, {@link Image}, {@link Message}, {@link Model},
+ * {@link Multipart}, {@link Text}, and {@link Video} subclasses.
+ * </p>
+ * <p>
+ * Subtracted from {@code https://www.iana.org/assignments/media-types/media-types.xml}.
+ * </p>
+ */
+public final class MediaTypes {
+
+ /**
+ * Application type media subtypes.
+ */
+ public static class Application {
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final String APPLICATION_1D_INTERLEAVED_PARITYFEC =
+ "application/1d-interleaved-parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final MediaType APPLICATION_1D_INTERLEAVED_PARITYFEC_TYPE =
+ new MediaType("application", "1d-interleaved-parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ACE_GROUPCOMM_CBOR} media
+ * type defined by RFC 9594.
+ */
+ public static final String APPLICATION_ACE_GROUPCOMM_CBOR =
+ "application/ace-groupcomm+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ACE_GROUPCOMM_CBOR} media
+ * type defined by RFC 9594.
+ */
+ public static final MediaType APPLICATION_ACE_GROUPCOMM_CBOR_TYPE =
+ new MediaType("application", "ace-groupcomm+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ACE_TRL_CBOR} media
+ * type defined by RFC 9770.
+ */
+ public static final String APPLICATION_ACE_TRL_CBOR =
+ "application/ace-trl+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ACE_TRL_CBOR} media
+ * type defined by RFC 9770.
+ */
+ public static final MediaType APPLICATION_ACE_TRL_CBOR_TYPE =
+ new MediaType("application", "ace-trl+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ACE_CBOR} media
+ * type defined by RFC 9200.
+ */
+ public static final String APPLICATION_ACE_CBOR =
+ "application/ace+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ACE_CBOR} media
+ * type defined by RFC 9200.
+ */
+ public static final MediaType APPLICATION_ACE_CBOR_TYPE =
+ new MediaType("application", "ace+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ACE_JSON} media
+ * type defined by RFC 9431.
+ */
+ public static final String APPLICATION_ACE_JSON =
+ "application/ace+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ACE_JSON} media
+ * type defined by RFC 9431.
+ */
+ public static final MediaType APPLICATION_ACE_JSON_TYPE =
+ new MediaType("application", "ace+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_AIF_CBOR} media
+ * type defined by RFC 9237.
+ */
+ public static final String APPLICATION_AIF_CBOR =
+ "application/aif+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_AIF_CBOR} media
+ * type defined by RFC 9237.
+ */
+ public static final MediaType APPLICATION_AIF_CBOR_TYPE =
+ new MediaType("application", "aif+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_AIF_JSON} media
+ * type defined by RFC 9237.
+ */
+ public static final String APPLICATION_AIF_JSON =
+ "application/aif+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_AIF_JSON} media
+ * type defined by RFC 9237.
+ */
+ public static final MediaType APPLICATION_AIF_JSON_TYPE =
+ new MediaType("application", "aif+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_CDNI_JSON} media
+ * type defined by RFC 9241.
+ */
+ public static final String APPLICATION_ALTO_CDNI_JSON =
+ "application/alto-cdni+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_CDNI_JSON} media
+ * type defined by RFC 9241.
+ */
+ public static final MediaType APPLICATION_ALTO_CDNI_JSON_TYPE =
+ new MediaType("application", "alto-cdni+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_CDNIFILTER_JSON} media
+ * type defined by RFC 9241.
+ */
+ public static final String APPLICATION_ALTO_CDNIFILTER_JSON =
+ "application/alto-cdnifilter+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_CDNIFILTER_JSON} media
+ * type defined by RFC 9241.
+ */
+ public static final MediaType APPLICATION_ALTO_CDNIFILTER_JSON_TYPE =
+ new MediaType("application", "alto-cdnifilter+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_COSTMAP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_COSTMAP_JSON =
+ "application/alto-costmap+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_COSTMAP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_COSTMAP_JSON_TYPE =
+ new MediaType("application", "alto-costmap+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_COSTMAPFILTER_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_COSTMAPFILTER_JSON =
+ "application/alto-costmapfilter+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_COSTMAPFILTER_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_COSTMAPFILTER_JSON_TYPE =
+ new MediaType("application", "alto-costmapfilter+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_DIRECTORY_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_DIRECTORY_JSON =
+ "application/alto-directory+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_DIRECTORY_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_DIRECTORY_JSON_TYPE =
+ new MediaType("application", "alto-directory+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_ENDPOINTPROP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_ENDPOINTPROP_JSON =
+ "application/alto-endpointprop+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_ENDPOINTPROP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_ENDPOINTPROP_JSON_TYPE =
+ new MediaType("application", "alto-endpointprop+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON =
+ "application/alto-endpointpropparams+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_ENDPOINTPROPPARAMS_JSON_TYPE =
+ new MediaType("application", "alto-endpointpropparams+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_ENDPOINTCOST_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_ENDPOINTCOST_JSON =
+ "application/alto-endpointcost+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_ENDPOINTCOST_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_ENDPOINTCOST_JSON_TYPE =
+ new MediaType("application", "alto-endpointcost+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON =
+ "application/alto-endpointcostparams+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_ENDPOINTCOSTPARAMS_JSON_TYPE =
+ new MediaType("application", "alto-endpointcostparams+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_ERROR_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_ERROR_JSON =
+ "application/alto-error+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_ERROR_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_ERROR_JSON_TYPE =
+ new MediaType("application", "alto-error+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_NETWORKMAPFILTER_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_NETWORKMAPFILTER_JSON =
+ "application/alto-networkmapfilter+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_NETWORKMAPFILTER_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_NETWORKMAPFILTER_JSON_TYPE =
+ new MediaType("application", "alto-networkmapfilter+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_NETWORKMAP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final String APPLICATION_ALTO_NETWORKMAP_JSON =
+ "application/alto-networkmap+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_NETWORKMAP_JSON} media
+ * type defined by RFC 7285.
+ */
+ public static final MediaType APPLICATION_ALTO_NETWORKMAP_JSON_TYPE =
+ new MediaType("application", "alto-networkmap+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_PROPMAP_JSON} media
+ * type defined by RFC 9240.
+ */
+ public static final String APPLICATION_ALTO_PROPMAP_JSON =
+ "application/alto-propmap+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_PROPMAP_JSON} media
+ * type defined by RFC 9240.
+ */
+ public static final MediaType APPLICATION_ALTO_PROPMAP_JSON_TYPE =
+ new MediaType("application", "alto-propmap+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_PROPMAPPARAMS_JSON} media
+ * type defined by RFC 9240.
+ */
+ public static final String APPLICATION_ALTO_PROPMAPPARAMS_JSON =
+ "application/alto-propmapparams+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_PROPMAPPARAMS_JSON} media
+ * type defined by RFC 9240.
+ */
+ public static final MediaType APPLICATION_ALTO_PROPMAPPARAMS_JSON_TYPE =
+ new MediaType("application", "alto-propmapparams+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_TIPS_JSON} media
+ * type defined by RFC 9569.
+ */
+ public static final String APPLICATION_ALTO_TIPS_JSON =
+ "application/alto-tips+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_TIPS_JSON} media
+ * type defined by RFC 9569.
+ */
+ public static final MediaType APPLICATION_ALTO_TIPS_JSON_TYPE =
+ new MediaType("application", "alto-tips+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_TIPSPARAMS_JSON} media
+ * type defined by RFC 9569.
+ */
+ public static final String APPLICATION_ALTO_TIPSPARAMS_JSON =
+ "application/alto-tipsparams+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_TIPSPARAMS_JSON} media
+ * type defined by RFC 9569.
+ */
+ public static final MediaType APPLICATION_ALTO_TIPSPARAMS_JSON_TYPE =
+ new MediaType("application", "alto-tipsparams+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON} media
+ * type defined by RFC 8895.
+ */
+ public static final String APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON =
+ "application/alto-updatestreamcontrol+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON} media
+ * type defined by RFC 8895.
+ */
+ public static final MediaType APPLICATION_ALTO_UPDATESTREAMCONTROL_JSON_TYPE =
+ new MediaType("application", "alto-updatestreamcontrol+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON} media
+ * type defined by RFC 8895.
+ */
+ public static final String APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON =
+ "application/alto-updatestreamparams+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON} media
+ * type defined by RFC 8895.
+ */
+ public static final MediaType APPLICATION_ALTO_UPDATESTREAMPARAMS_JSON_TYPE =
+ new MediaType("application", "alto-updatestreamparams+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_AT_JWT} media
+ * type defined by RFC 9068.
+ */
+ public static final String APPLICATION_AT_JWT =
+ "application/at+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_AT_JWT} media
+ * type defined by RFC 9068.
+ */
+ public static final MediaType APPLICATION_AT_JWT_TYPE =
+ new MediaType("application", "at+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ATOM_XML} media
+ * type defined by RFC 4287, and RFC 5023.
+ */
+ public static final String APPLICATION_ATOM_XML =
+ "application/atom+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ATOM_XML} media
+ * type defined by RFC 4287, and RFC 5023.
+ */
+ public static final MediaType APPLICATION_ATOM_XML_TYPE =
+ new MediaType("application", "atom+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ATOMCAT_XML} media
+ * type defined by RFC 5023.
+ */
+ public static final String APPLICATION_ATOMCAT_XML =
+ "application/atomcat+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ATOMCAT_XML} media
+ * type defined by RFC 5023.
+ */
+ public static final MediaType APPLICATION_ATOMCAT_XML_TYPE =
+ new MediaType("application", "atomcat+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ATOMDELETED_XML} media
+ * type defined by RFC 6721.
+ */
+ public static final String APPLICATION_ATOMDELETED_XML =
+ "application/atomdeleted+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ATOMDELETED_XML} media
+ * type defined by RFC 6721.
+ */
+ public static final MediaType APPLICATION_ATOMDELETED_XML_TYPE =
+ new MediaType("application", "atomdeleted+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ATOMSVC_XML} media
+ * type defined by RFC 5023.
+ */
+ public static final String APPLICATION_ATOMSVC_XML =
+ "application/atomsvc+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ATOMSVC_XML} media
+ * type defined by RFC 5023.
+ */
+ public static final MediaType APPLICATION_ATOMSVC_XML_TYPE =
+ new MediaType("application", "atomsvc+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_AUTH_POLICY_XML} media
+ * type defined by RFC 4745.
+ */
+ public static final String APPLICATION_AUTH_POLICY_XML =
+ "application/auth-policy+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_AUTH_POLICY_XML} media
+ * type defined by RFC 4745.
+ */
+ public static final MediaType APPLICATION_AUTH_POLICY_XML_TYPE =
+ new MediaType("application", "auth-policy+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_BATCH_SMTP} media
+ * type defined by RFC 2442.
+ */
+ public static final String APPLICATION_BATCH_SMTP =
+ "application/batch-SMTP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_BATCH_SMTP} media
+ * type defined by RFC 2442.
+ */
+ public static final MediaType APPLICATION_BATCH_SMTP_TYPE =
+ new MediaType("application", "batch-SMTP");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_BEEP_XML} media
+ * type defined by RFC 3080.
+ */
+ public static final String APPLICATION_BEEP_XML =
+ "application/beep+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_BEEP_XML} media
+ * type defined by RFC 3080.
+ */
+ public static final MediaType APPLICATION_BEEP_XML_TYPE =
+ new MediaType("application", "beep+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CALENDAR_JSON} media
+ * type defined by RFC 7265.
+ */
+ public static final String APPLICATION_CALENDAR_JSON =
+ "application/calendar+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CALENDAR_JSON} media
+ * type defined by RFC 7265.
+ */
+ public static final MediaType APPLICATION_CALENDAR_JSON_TYPE =
+ new MediaType("application", "calendar+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CALENDAR_XML} media
+ * type defined by RFC 6321.
+ */
+ public static final String APPLICATION_CALENDAR_XML =
+ "application/calendar+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CALENDAR_XML} media
+ * type defined by RFC 6321.
+ */
+ public static final MediaType APPLICATION_CALENDAR_XML_TYPE =
+ new MediaType("application", "calendar+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CALL_COMPLETION} media
+ * type defined by RFC 6910.
+ */
+ public static final String APPLICATION_CALL_COMPLETION =
+ "application/call-completion";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CALL_COMPLETION} media
+ * type defined by RFC 6910.
+ */
+ public static final MediaType APPLICATION_CALL_COMPLETION_TYPE =
+ new MediaType("application", "call-completion");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CALS_1840} media
+ * type defined by RFC 1895.
+ */
+ public static final String APPLICATION_CALS_1840 =
+ "application/CALS-1840";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CALS_1840} media
+ * type defined by RFC 1895.
+ */
+ public static final MediaType APPLICATION_CALS_1840_TYPE =
+ new MediaType("application", "CALS-1840");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CAPTIVE_JSON} media
+ * type defined by RFC 8908.
+ */
+ public static final String APPLICATION_CAPTIVE_JSON =
+ "application/captive+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CAPTIVE_JSON} media
+ * type defined by RFC 8908.
+ */
+ public static final MediaType APPLICATION_CAPTIVE_JSON_TYPE =
+ new MediaType("application", "captive+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CBOR} media
+ * type defined by RFC 8949.
+ */
+ public static final String APPLICATION_CBOR =
+ "application/cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CBOR} media
+ * type defined by RFC 8949.
+ */
+ public static final MediaType APPLICATION_CBOR_TYPE =
+ new MediaType("application", "cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CBOR_SEQ} media
+ * type defined by RFC 8742.
+ */
+ public static final String APPLICATION_CBOR_SEQ =
+ "application/cbor-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CBOR_SEQ} media
+ * type defined by RFC 8742.
+ */
+ public static final MediaType APPLICATION_CBOR_SEQ_TYPE =
+ new MediaType("application", "cbor-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CCMP_XML} media
+ * type defined by RFC 6503.
+ */
+ public static final String APPLICATION_CCMP_XML =
+ "application/ccmp+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CCMP_XML} media
+ * type defined by RFC 6503.
+ */
+ public static final MediaType APPLICATION_CCMP_XML_TYPE =
+ new MediaType("application", "ccmp+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CCXML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_CCXML_XML =
+ "application/ccxml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CCXML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_CCXML_XML_TYPE =
+ new MediaType("application", "ccxml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDMI_CAPABILITY} media
+ * type defined by RFC 6208.
+ */
+ public static final String APPLICATION_CDMI_CAPABILITY =
+ "application/cdmi-capability";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDMI_CAPABILITY} media
+ * type defined by RFC 6208.
+ */
+ public static final MediaType APPLICATION_CDMI_CAPABILITY_TYPE =
+ new MediaType("application", "cdmi-capability");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDMI_CONTAINER} media
+ * type defined by RFC 6208.
+ */
+ public static final String APPLICATION_CDMI_CONTAINER =
+ "application/cdmi-container";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDMI_CONTAINER} media
+ * type defined by RFC 6208.
+ */
+ public static final MediaType APPLICATION_CDMI_CONTAINER_TYPE =
+ new MediaType("application", "cdmi-container");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDMI_DOMAIN} media
+ * type defined by RFC 6208.
+ */
+ public static final String APPLICATION_CDMI_DOMAIN =
+ "application/cdmi-domain";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDMI_DOMAIN} media
+ * type defined by RFC 6208.
+ */
+ public static final MediaType APPLICATION_CDMI_DOMAIN_TYPE =
+ new MediaType("application", "cdmi-domain");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDMI_OBJECT} media
+ * type defined by RFC 6208.
+ */
+ public static final String APPLICATION_CDMI_OBJECT =
+ "application/cdmi-object";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDMI_OBJECT} media
+ * type defined by RFC 6208.
+ */
+ public static final MediaType APPLICATION_CDMI_OBJECT_TYPE =
+ new MediaType("application", "cdmi-object");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDMI_QUEUE} media
+ * type defined by RFC 6208.
+ */
+ public static final String APPLICATION_CDMI_QUEUE =
+ "application/cdmi-queue";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDMI_QUEUE} media
+ * type defined by RFC 6208.
+ */
+ public static final MediaType APPLICATION_CDMI_QUEUE_TYPE =
+ new MediaType("application", "cdmi-queue");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CDNI} media
+ * type defined by RFC 7736.
+ */
+ public static final String APPLICATION_CDNI =
+ "application/cdni";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CDNI} media
+ * type defined by RFC 7736.
+ */
+ public static final MediaType APPLICATION_CDNI_TYPE =
+ new MediaType("application", "cdni");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CELLML_XML} media
+ * type defined by RFC 4708.
+ */
+ public static final String APPLICATION_CELLML_XML =
+ "application/cellml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CELLML_XML} media
+ * type defined by RFC 4708.
+ */
+ public static final MediaType APPLICATION_CELLML_XML_TYPE =
+ new MediaType("application", "cellml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CFW} media
+ * type defined by RFC 6230.
+ */
+ public static final String APPLICATION_CFW =
+ "application/cfw";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CFW} media
+ * type defined by RFC 6230.
+ */
+ public static final MediaType APPLICATION_CFW_TYPE =
+ new MediaType("application", "cfw");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CID_EDHOC_CBOR_SEQ} media
+ * type defined by RFC 9528.
+ */
+ public static final String APPLICATION_CID_EDHOC_CBOR_SEQ =
+ "application/cid-edhoc+cbor-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CID_EDHOC_CBOR_SEQ} media
+ * type defined by RFC 9528.
+ */
+ public static final MediaType APPLICATION_CID_EDHOC_CBOR_SEQ_TYPE =
+ new MediaType("application", "cid-edhoc+cbor-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CLUE_INFO_XML} media
+ * type defined by RFC 8846.
+ */
+ public static final String APPLICATION_CLUE_INFO_XML =
+ "application/clue_info+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CLUE_INFO_XML} media
+ * type defined by RFC 8846.
+ */
+ public static final MediaType APPLICATION_CLUE_INFO_XML_TYPE =
+ new MediaType("application", "clue_info+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CLUE_XML} media
+ * type defined by RFC 8847.
+ */
+ public static final String APPLICATION_CLUE_XML =
+ "application/clue+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CLUE_XML} media
+ * type defined by RFC 8847.
+ */
+ public static final MediaType APPLICATION_CLUE_XML_TYPE =
+ new MediaType("application", "clue+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CMS} media
+ * type defined by RFC 7193.
+ */
+ public static final String APPLICATION_CMS =
+ "application/cms";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CMS} media
+ * type defined by RFC 7193.
+ */
+ public static final MediaType APPLICATION_CMS_TYPE =
+ new MediaType("application", "cms");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CNRP_XML} media
+ * type defined by RFC 3367.
+ */
+ public static final String APPLICATION_CNRP_XML =
+ "application/cnrp+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CNRP_XML} media
+ * type defined by RFC 3367.
+ */
+ public static final MediaType APPLICATION_CNRP_XML_TYPE =
+ new MediaType("application", "cnrp+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COAP_EAP} media
+ * type defined by RFC 9820.
+ */
+ public static final String APPLICATION_COAP_EAP =
+ "application/coap-eap";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COAP_EAP} media
+ * type defined by RFC 9820.
+ */
+ public static final MediaType APPLICATION_COAP_EAP_TYPE =
+ new MediaType("application", "coap-eap");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COAP_GROUP_JSON} media
+ * type defined by RFC 7390.
+ */
+ public static final String APPLICATION_COAP_GROUP_JSON =
+ "application/coap-group+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COAP_GROUP_JSON} media
+ * type defined by RFC 7390.
+ */
+ public static final MediaType APPLICATION_COAP_GROUP_JSON_TYPE =
+ new MediaType("application", "coap-group+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COAP_PAYLOAD} media
+ * type defined by RFC 8075.
+ */
+ public static final String APPLICATION_COAP_PAYLOAD =
+ "application/coap-payload";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COAP_PAYLOAD} media
+ * type defined by RFC 8075.
+ */
+ public static final MediaType APPLICATION_COAP_PAYLOAD_TYPE =
+ new MediaType("application", "coap-payload");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR} media
+ * type defined by RFC 9290, Section 6.3.
+ */
+ public static final String APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR =
+ "application/concise-problem-details+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR} media
+ * type defined by RFC 9290, Section 6.3.
+ */
+ public static final MediaType APPLICATION_CONCISE_PROBLEM_DETAILS_CBOR_TYPE =
+ new MediaType("application", "concise-problem-details+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CONFERENCE_INFO_XML} media
+ * type defined by RFC 4575.
+ */
+ public static final String APPLICATION_CONFERENCE_INFO_XML =
+ "application/conference-info+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CONFERENCE_INFO_XML} media
+ * type defined by RFC 4575.
+ */
+ public static final MediaType APPLICATION_CONFERENCE_INFO_XML_TYPE =
+ new MediaType("application", "conference-info+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CPL_XML} media
+ * type defined by RFC 3880.
+ */
+ public static final String APPLICATION_CPL_XML =
+ "application/cpl+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CPL_XML} media
+ * type defined by RFC 3880.
+ */
+ public static final MediaType APPLICATION_CPL_XML_TYPE =
+ new MediaType("application", "cpl+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COSE} media
+ * type defined by RFC 9052.
+ */
+ public static final String APPLICATION_COSE =
+ "application/cose";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COSE} media
+ * type defined by RFC 9052.
+ */
+ public static final MediaType APPLICATION_COSE_TYPE =
+ new MediaType("application", "cose");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COSE_KEY} media
+ * type defined by RFC 9052.
+ */
+ public static final String APPLICATION_COSE_KEY =
+ "application/cose-key";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COSE_KEY} media
+ * type defined by RFC 9052.
+ */
+ public static final MediaType APPLICATION_COSE_KEY_TYPE =
+ new MediaType("application", "cose-key");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COSE_KEY_SET} media
+ * type defined by RFC 9052.
+ */
+ public static final String APPLICATION_COSE_KEY_SET =
+ "application/cose-key-set";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COSE_KEY_SET} media
+ * type defined by RFC 9052.
+ */
+ public static final MediaType APPLICATION_COSE_KEY_SET_TYPE =
+ new MediaType("application", "cose-key-set");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_COSE_X509} media
+ * type defined by RFC 9360.
+ */
+ public static final String APPLICATION_COSE_X509 =
+ "application/cose-x509";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_COSE_X509} media
+ * type defined by RFC 9360.
+ */
+ public static final MediaType APPLICATION_COSE_X509_TYPE =
+ new MediaType("application", "cose-x509");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CSRATTRS} media
+ * type defined by RFC 7030.
+ */
+ public static final String APPLICATION_CSRATTRS =
+ "application/csrattrs";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CSRATTRS} media
+ * type defined by RFC 7030.
+ */
+ public static final MediaType APPLICATION_CSRATTRS_TYPE =
+ new MediaType("application", "csrattrs");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_CWT} media
+ * type defined by RFC 8392.
+ */
+ public static final String APPLICATION_CWT =
+ "application/cwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_CWT} media
+ * type defined by RFC 8392.
+ */
+ public static final MediaType APPLICATION_CWT_TYPE =
+ new MediaType("application", "cwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DAVMOUNT_XML} media
+ * type defined by RFC 4709.
+ */
+ public static final String APPLICATION_DAVMOUNT_XML =
+ "application/davmount+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DAVMOUNT_XML} media
+ * type defined by RFC 4709.
+ */
+ public static final MediaType APPLICATION_DAVMOUNT_XML_TYPE =
+ new MediaType("application", "davmount+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DIALOG_INFO_XML} media
+ * type defined by RFC 4235.
+ */
+ public static final String APPLICATION_DIALOG_INFO_XML =
+ "application/dialog-info+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DIALOG_INFO_XML} media
+ * type defined by RFC 4235.
+ */
+ public static final MediaType APPLICATION_DIALOG_INFO_XML_TYPE =
+ new MediaType("application", "dialog-info+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DICOM} media
+ * type defined by RFC 3240.
+ */
+ public static final String APPLICATION_DICOM =
+ "application/dicom";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DICOM} media
+ * type defined by RFC 3240.
+ */
+ public static final MediaType APPLICATION_DICOM_TYPE =
+ new MediaType("application", "dicom");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DNS} media
+ * type defined by RFC 4027.
+ */
+ public static final String APPLICATION_DNS =
+ "application/dns";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DNS} media
+ * type defined by RFC 4027.
+ */
+ public static final MediaType APPLICATION_DNS_TYPE =
+ new MediaType("application", "dns");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DNS_JSON} media
+ * type defined by RFC 8427.
+ */
+ public static final String APPLICATION_DNS_JSON =
+ "application/dns+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DNS_JSON} media
+ * type defined by RFC 8427.
+ */
+ public static final MediaType APPLICATION_DNS_JSON_TYPE =
+ new MediaType("application", "dns+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DNS_MESSAGE} media
+ * type defined by RFC 8484.
+ */
+ public static final String APPLICATION_DNS_MESSAGE =
+ "application/dns-message";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DNS_MESSAGE} media
+ * type defined by RFC 8484.
+ */
+ public static final MediaType APPLICATION_DNS_MESSAGE_TYPE =
+ new MediaType("application", "dns-message");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DOTS_CBOR} media
+ * type defined by RFC 9132.
+ */
+ public static final String APPLICATION_DOTS_CBOR =
+ "application/dots+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DOTS_CBOR} media
+ * type defined by RFC 9132.
+ */
+ public static final MediaType APPLICATION_DOTS_CBOR_TYPE =
+ new MediaType("application", "dots+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DPOP_JWT} media
+ * type defined by RFC 9449.
+ */
+ public static final String APPLICATION_DPOP_JWT =
+ "application/dpop+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DPOP_JWT} media
+ * type defined by RFC 9449.
+ */
+ public static final MediaType APPLICATION_DPOP_JWT_TYPE =
+ new MediaType("application", "dpop+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DSKPP_XML} media
+ * type defined by RFC 6063.
+ */
+ public static final String APPLICATION_DSKPP_XML =
+ "application/dskpp+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DSKPP_XML} media
+ * type defined by RFC 6063.
+ */
+ public static final MediaType APPLICATION_DSKPP_XML_TYPE =
+ new MediaType("application", "dskpp+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DSSC_DER} media
+ * type defined by RFC 5698.
+ */
+ public static final String APPLICATION_DSSC_DER =
+ "application/dssc+der";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DSSC_DER} media
+ * type defined by RFC 5698.
+ */
+ public static final MediaType APPLICATION_DSSC_DER_TYPE =
+ new MediaType("application", "dssc+der");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DSSC_XML} media
+ * type defined by RFC 5698.
+ */
+ public static final String APPLICATION_DSSC_XML =
+ "application/dssc+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DSSC_XML} media
+ * type defined by RFC 5698.
+ */
+ public static final MediaType APPLICATION_DSSC_XML_TYPE =
+ new MediaType("application", "dssc+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_DVCS} media
+ * type defined by RFC 3029.
+ */
+ public static final String APPLICATION_DVCS =
+ "application/dvcs";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_DVCS} media
+ * type defined by RFC 3029.
+ */
+ public static final MediaType APPLICATION_DVCS_TYPE =
+ new MediaType("application", "dvcs");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_CWT} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_CWT =
+ "application/eat+cwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_CWT} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_CWT_TYPE =
+ new MediaType("application", "eat+cwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_JWT} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_JWT =
+ "application/eat+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_JWT} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_JWT_TYPE =
+ new MediaType("application", "eat+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_BUN_CBOR} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_BUN_CBOR =
+ "application/eat-bun+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_BUN_CBOR} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_BUN_CBOR_TYPE =
+ new MediaType("application", "eat-bun+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_BUN_JSON} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_BUN_JSON =
+ "application/eat-bun+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_BUN_JSON} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_BUN_JSON_TYPE =
+ new MediaType("application", "eat-bun+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_UCS_CBOR} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_UCS_CBOR =
+ "application/eat-ucs+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_UCS_CBOR} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_UCS_CBOR_TYPE =
+ new MediaType("application", "eat-ucs+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EAT_UCS_JSON} media
+ * type defined by RFC 9782.
+ */
+ public static final String APPLICATION_EAT_UCS_JSON =
+ "application/eat-ucs+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EAT_UCS_JSON} media
+ * type defined by RFC 9782.
+ */
+ public static final MediaType APPLICATION_EAT_UCS_JSON_TYPE =
+ new MediaType("application", "eat-ucs+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ECMASCRIPT} media
+ * type defined by RFC 4329, and RFC 9239.
+ */
+ public static final String APPLICATION_ECMASCRIPT =
+ "application/ecmascript";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ECMASCRIPT} media
+ * type defined by RFC 4329, and RFC 9239.
+ */
+ public static final MediaType APPLICATION_ECMASCRIPT_TYPE =
+ new MediaType("application", "ecmascript");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EDHOC_CBOR_SEQ} media
+ * type defined by RFC 9528.
+ */
+ public static final String APPLICATION_EDHOC_CBOR_SEQ =
+ "application/edhoc+cbor-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EDHOC_CBOR_SEQ} media
+ * type defined by RFC 9528.
+ */
+ public static final MediaType APPLICATION_EDHOC_CBOR_SEQ_TYPE =
+ new MediaType("application", "edhoc+cbor-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EDI_CONSENT} media
+ * type defined by RFC 1767.
+ */
+ public static final String APPLICATION_EDI_CONSENT =
+ "application/EDI-consent";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EDI_CONSENT} media
+ * type defined by RFC 1767.
+ */
+ public static final MediaType APPLICATION_EDI_CONSENT_TYPE =
+ new MediaType("application", "EDI-consent");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EDIFACT} media
+ * type defined by RFC 1767.
+ */
+ public static final String APPLICATION_EDIFACT =
+ "application/EDIFACT";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EDIFACT} media
+ * type defined by RFC 1767.
+ */
+ public static final MediaType APPLICATION_EDIFACT_TYPE =
+ new MediaType("application", "EDIFACT");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EDI_X12} media
+ * type defined by RFC 1767.
+ */
+ public static final String APPLICATION_EDI_X12 =
+ "application/EDI-X12";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EDI_X12} media
+ * type defined by RFC 1767.
+ */
+ public static final MediaType APPLICATION_EDI_X12_TYPE =
+ new MediaType("application", "EDI-X12");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_CAP_XML} media
+ * type defined by RFC 8876.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_CAP_XML =
+ "application/EmergencyCallData.cap+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_CAP_XML} media
+ * type defined by RFC 8876.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_CAP_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.cap+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_COMMENT_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_COMMENT_XML =
+ "application/EmergencyCallData.Comment+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_COMMENT_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_COMMENT_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.Comment+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_CONTROL_XML} media
+ * type defined by RFC 8147.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_CONTROL_XML =
+ "application/EmergencyCallData.Control+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_CONTROL_XML} media
+ * type defined by RFC 8147.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_CONTROL_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.Control+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML =
+ "application/EmergencyCallData.DeviceInfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_DEVICEINFO_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.DeviceInfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_ECALL_MSD} media
+ * type defined by RFC 8147.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_ECALL_MSD =
+ "application/EmergencyCallData.eCall.MSD";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_ECALL_MSD} media
+ * type defined by RFC 8147.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_ECALL_MSD_TYPE =
+ new MediaType("application", "EmergencyCallData.eCall.MSD");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML =
+ "application/EmergencyCallData.ProviderInfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_PROVIDERINFO_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.ProviderInfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML =
+ "application/EmergencyCallData.ServiceInfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_SERVICEINFO_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.ServiceInfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML =
+ "application/EmergencyCallData.SubscriberInfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML} media
+ * type defined by RFC 7852.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_SUBSCRIBERINFO_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.SubscriberInfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_VEDS_XML} media
+ * type defined by RFC 8148, and RFC Errata 6500.
+ */
+ public static final String APPLICATION_EMERGENCYCALLDATA_VEDS_XML =
+ "application/EmergencyCallData.VEDS+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMERGENCYCALLDATA_VEDS_XML} media
+ * type defined by RFC 8148, and RFC Errata 6500.
+ */
+ public static final MediaType APPLICATION_EMERGENCYCALLDATA_VEDS_XML_TYPE =
+ new MediaType("application", "EmergencyCallData.VEDS+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EMMA_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-emma-20071211/#media-type-registration}.
+ */
+ public static final String APPLICATION_EMMA_XML =
+ "application/emma+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EMMA_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-emma-20071211/#media-type-registration}.
+ */
+ public static final MediaType APPLICATION_EMMA_XML_TYPE =
+ new MediaType("application", "emma+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final String APPLICATION_ENCAPRTP =
+ "application/encaprtp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType APPLICATION_ENCAPRTP_TYPE =
+ new MediaType("application", "encaprtp");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EPP_XML} media
+ * type defined by RFC 5730.
+ */
+ public static final String APPLICATION_EPP_XML =
+ "application/epp+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EPP_XML} media
+ * type defined by RFC 5730.
+ */
+ public static final MediaType APPLICATION_EPP_XML_TYPE =
+ new MediaType("application", "epp+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String APPLICATION_EXAMPLE =
+ "application/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType APPLICATION_EXAMPLE_TYPE =
+ new MediaType("application", "example");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EXI} media
+ * type defined by {@code http://www.w3.org/TR/2009/CR-exi-20091208/#mediaTypeRegistration}.
+ */
+ public static final String APPLICATION_EXI =
+ "application/exi";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EXI} media
+ * type defined by {@code http://www.w3.org/TR/2009/CR-exi-20091208/#mediaTypeRegistration}.
+ */
+ public static final MediaType APPLICATION_EXI_TYPE =
+ new MediaType("application", "exi");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_EXPECT_CT_REPORT_JSON} media
+ * type defined by RFC 9163.
+ */
+ public static final String APPLICATION_EXPECT_CT_REPORT_JSON =
+ "application/expect-ct-report+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_EXPECT_CT_REPORT_JSON} media
+ * type defined by RFC 9163.
+ */
+ public static final MediaType APPLICATION_EXPECT_CT_REPORT_JSON_TYPE =
+ new MediaType("application", "expect-ct-report+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FDT_XML} media
+ * type defined by RFC 6726.
+ */
+ public static final String APPLICATION_FDT_XML =
+ "application/fdt+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FDT_XML} media
+ * type defined by RFC 6726.
+ */
+ public static final MediaType APPLICATION_FDT_XML_TYPE =
+ new MediaType("application", "fdt+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FITS} media
+ * type defined by RFC 4047.
+ */
+ public static final String APPLICATION_FITS =
+ "application/fits";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FITS} media
+ * type defined by RFC 4047.
+ */
+ public static final MediaType APPLICATION_FITS_TYPE =
+ new MediaType("application", "fits");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final String APPLICATION_FLEXFEC =
+ "application/flexfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final MediaType APPLICATION_FLEXFEC_TYPE =
+ new MediaType("application", "flexfec");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FONT_SFNT} media
+ * type defined by RFC 8081.
+ */
+ public static final String APPLICATION_FONT_SFNT =
+ "application/font-sfnt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FONT_SFNT} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType APPLICATION_FONT_SFNT_TYPE =
+ new MediaType("application", "font-sfnt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FONT_TDPFR} media
+ * type defined by RFC 3073.
+ */
+ public static final String APPLICATION_FONT_TDPFR =
+ "application/font-tdpfr";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FONT_TDPFR} media
+ * type defined by RFC 3073.
+ */
+ public static final MediaType APPLICATION_FONT_TDPFR_TYPE =
+ new MediaType("application", "font-tdpfr");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FONT_WOFF} media
+ * type defined by RFC 8081.
+ */
+ public static final String APPLICATION_FONT_WOFF =
+ "application/font-woff";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FONT_WOFF} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType APPLICATION_FONT_WOFF_TYPE =
+ new MediaType("application", "font-woff");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_FRAMEWORK_ATTRIBUTES_XML} media
+ * type defined by RFC 6230.
+ */
+ public static final String APPLICATION_FRAMEWORK_ATTRIBUTES_XML =
+ "application/framework-attributes+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_FRAMEWORK_ATTRIBUTES_XML} media
+ * type defined by RFC 6230.
+ */
+ public static final MediaType APPLICATION_FRAMEWORK_ATTRIBUTES_XML_TYPE =
+ new MediaType("application", "framework-attributes+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GEO_JSON} media
+ * type defined by RFC 7946.
+ */
+ public static final String APPLICATION_GEO_JSON =
+ "application/geo+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GEO_JSON} media
+ * type defined by RFC 7946.
+ */
+ public static final MediaType APPLICATION_GEO_JSON_TYPE =
+ new MediaType("application", "geo+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GEO_JSON_SEQ} media
+ * type defined by RFC 8142.
+ */
+ public static final String APPLICATION_GEO_JSON_SEQ =
+ "application/geo+json-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GEO_JSON_SEQ} media
+ * type defined by RFC 8142.
+ */
+ public static final MediaType APPLICATION_GEO_JSON_SEQ_TYPE =
+ new MediaType("application", "geo+json-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GEOFEED_CSV} media
+ * type defined by RFC-ietf-regext-rdap-geofeed-14.
+ */
+ public static final String APPLICATION_GEOFEED_CSV =
+ "application/geofeed+csv";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GEOFEED_CSV} media
+ * type defined by RFC-ietf-regext-rdap-geofeed-14.
+ */
+ public static final MediaType APPLICATION_GEOFEED_CSV_TYPE =
+ new MediaType("application", "geofeed+csv");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GNAP_BINDING_JWS} media
+ * type defined by RFC 9635.
+ */
+ public static final String APPLICATION_GNAP_BINDING_JWS =
+ "application/gnap-binding-jws";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GNAP_BINDING_JWS} media
+ * type defined by RFC 9635.
+ */
+ public static final MediaType APPLICATION_GNAP_BINDING_JWS_TYPE =
+ new MediaType("application", "gnap-binding-jws");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GNAP_BINDING_JWSD} media
+ * type defined by RFC 9635.
+ */
+ public static final String APPLICATION_GNAP_BINDING_JWSD =
+ "application/gnap-binding-jwsd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GNAP_BINDING_JWSD} media
+ * type defined by RFC 9635.
+ */
+ public static final MediaType APPLICATION_GNAP_BINDING_JWSD_TYPE =
+ new MediaType("application", "gnap-binding-jwsd");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GNAP_BINDING_ROTATION_JWS} media
+ * type defined by RFC 9635.
+ */
+ public static final String APPLICATION_GNAP_BINDING_ROTATION_JWS =
+ "application/gnap-binding-rotation-jws";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GNAP_BINDING_ROTATION_JWS} media
+ * type defined by RFC 9635.
+ */
+ public static final MediaType APPLICATION_GNAP_BINDING_ROTATION_JWS_TYPE =
+ new MediaType("application", "gnap-binding-rotation-jws");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GNAP_BINDING_ROTATION_JWSD} media
+ * type defined by RFC 9635.
+ */
+ public static final String APPLICATION_GNAP_BINDING_ROTATION_JWSD =
+ "application/gnap-binding-rotation-jwsd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GNAP_BINDING_ROTATION_JWSD} media
+ * type defined by RFC 9635.
+ */
+ public static final MediaType APPLICATION_GNAP_BINDING_ROTATION_JWSD_TYPE =
+ new MediaType("application", "gnap-binding-rotation-jwsd");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_GZIP} media
+ * type defined by RFC 6713.
+ */
+ public static final String APPLICATION_GZIP =
+ "application/gzip";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_GZIP} media
+ * type defined by RFC 6713.
+ */
+ public static final MediaType APPLICATION_GZIP_TYPE =
+ new MediaType("application", "gzip");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_H224} media
+ * type defined by RFC 4573.
+ */
+ public static final String APPLICATION_H224 =
+ "application/H224";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_H224} media
+ * type defined by RFC 4573.
+ */
+ public static final MediaType APPLICATION_H224_TYPE =
+ new MediaType("application", "H224");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_HELD_XML} media
+ * type defined by RFC 5985.
+ */
+ public static final String APPLICATION_HELD_XML =
+ "application/held+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_HELD_XML} media
+ * type defined by RFC 5985.
+ */
+ public static final MediaType APPLICATION_HELD_XML_TYPE =
+ new MediaType("application", "held+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_HTTP} media
+ * type defined by RFC 9112.
+ */
+ public static final String APPLICATION_HTTP =
+ "application/http";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_HTTP} media
+ * type defined by RFC 9112.
+ */
+ public static final MediaType APPLICATION_HTTP_TYPE =
+ new MediaType("application", "http");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IBE_KEY_REQUEST_XML} media
+ * type defined by RFC 5408.
+ */
+ public static final String APPLICATION_IBE_KEY_REQUEST_XML =
+ "application/ibe-key-request+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IBE_KEY_REQUEST_XML} media
+ * type defined by RFC 5408.
+ */
+ public static final MediaType APPLICATION_IBE_KEY_REQUEST_XML_TYPE =
+ new MediaType("application", "ibe-key-request+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IBE_PKG_REPLY_XML} media
+ * type defined by RFC 5408.
+ */
+ public static final String APPLICATION_IBE_PKG_REPLY_XML =
+ "application/ibe-pkg-reply+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IBE_PKG_REPLY_XML} media
+ * type defined by RFC 5408.
+ */
+ public static final MediaType APPLICATION_IBE_PKG_REPLY_XML_TYPE =
+ new MediaType("application", "ibe-pkg-reply+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IBE_PP_DATA} media
+ * type defined by RFC 5408.
+ */
+ public static final String APPLICATION_IBE_PP_DATA =
+ "application/ibe-pp-data";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IBE_PP_DATA} media
+ * type defined by RFC 5408.
+ */
+ public static final MediaType APPLICATION_IBE_PP_DATA_TYPE =
+ new MediaType("application", "ibe-pp-data");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IM_ISCOMPOSING_XML} media
+ * type defined by RFC 3994.
+ */
+ public static final String APPLICATION_IM_ISCOMPOSING_XML =
+ "application/im-iscomposing+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IM_ISCOMPOSING_XML} media
+ * type defined by RFC 3994.
+ */
+ public static final MediaType APPLICATION_IM_ISCOMPOSING_XML_TYPE =
+ new MediaType("application", "im-iscomposing+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_INDEX} media
+ * type defined by RFC 2652.
+ */
+ public static final String APPLICATION_INDEX =
+ "application/index";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_INDEX} media
+ * type defined by RFC 2652.
+ */
+ public static final MediaType APPLICATION_INDEX_TYPE =
+ new MediaType("application", "index");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_INDEX_CMD} media
+ * type defined by RFC 2652.
+ */
+ public static final String APPLICATION_INDEX_CMD =
+ "application/index.cmd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_INDEX_CMD} media
+ * type defined by RFC 2652.
+ */
+ public static final MediaType APPLICATION_INDEX_CMD_TYPE =
+ new MediaType("application", "index.cmd");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_INDEX_OBJ} media
+ * type defined by RFC 2652.
+ */
+ public static final String APPLICATION_INDEX_OBJ =
+ "application/index.obj";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_INDEX_OBJ} media
+ * type defined by RFC 2652.
+ */
+ public static final MediaType APPLICATION_INDEX_OBJ_TYPE =
+ new MediaType("application", "index.obj");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_INDEX_RESPONSE} media
+ * type defined by RFC 2652.
+ */
+ public static final String APPLICATION_INDEX_RESPONSE =
+ "application/index.response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_INDEX_RESPONSE} media
+ * type defined by RFC 2652.
+ */
+ public static final MediaType APPLICATION_INDEX_RESPONSE_TYPE =
+ new MediaType("application", "index.response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_INDEX_VND} media
+ * type defined by RFC 2652.
+ */
+ public static final String APPLICATION_INDEX_VND =
+ "application/index.vnd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_INDEX_VND} media
+ * type defined by RFC 2652.
+ */
+ public static final MediaType APPLICATION_INDEX_VND_TYPE =
+ new MediaType("application", "index.vnd");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IOTP} media
+ * type defined by RFC 2935.
+ */
+ public static final String APPLICATION_IOTP =
+ "application/IOTP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IOTP} media
+ * type defined by RFC 2935.
+ */
+ public static final MediaType APPLICATION_IOTP_TYPE =
+ new MediaType("application", "IOTP");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IPFIX} media
+ * type defined by RFC 5655.
+ */
+ public static final String APPLICATION_IPFIX =
+ "application/ipfix";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IPFIX} media
+ * type defined by RFC 5655.
+ */
+ public static final MediaType APPLICATION_IPFIX_TYPE =
+ new MediaType("application", "ipfix");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_IPP} media
+ * type defined by RFC 8010.
+ */
+ public static final String APPLICATION_IPP =
+ "application/ipp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_IPP} media
+ * type defined by RFC 8010.
+ */
+ public static final MediaType APPLICATION_IPP_TYPE =
+ new MediaType("application", "ipp");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ISUP} media
+ * type defined by RFC 3204.
+ */
+ public static final String APPLICATION_ISUP =
+ "application/ISUP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ISUP} media
+ * type defined by RFC 3204.
+ */
+ public static final MediaType APPLICATION_ISUP_TYPE =
+ new MediaType("application", "ISUP");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JAVASCRIPT} media
+ * type defined by RFC 4329, and RFC 9239.
+ */
+ public static final String APPLICATION_JAVASCRIPT =
+ "application/javascript";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JAVASCRIPT} media
+ * type defined by RFC 4329, and RFC 9239.
+ */
+ public static final MediaType APPLICATION_JAVASCRIPT_TYPE =
+ new MediaType("application", "javascript");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JOSE} media
+ * type defined by RFC 7515.
+ */
+ public static final String APPLICATION_JOSE =
+ "application/jose";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JOSE} media
+ * type defined by RFC 7515.
+ */
+ public static final MediaType APPLICATION_JOSE_TYPE =
+ new MediaType("application", "jose");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JOSE_JSON} media
+ * type defined by RFC 7515.
+ */
+ public static final String APPLICATION_JOSE_JSON =
+ "application/jose+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JOSE_JSON} media
+ * type defined by RFC 7515.
+ */
+ public static final MediaType APPLICATION_JOSE_JSON_TYPE =
+ new MediaType("application", "jose+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JRD_JSON} media
+ * type defined by RFC 7033.
+ */
+ public static final String APPLICATION_JRD_JSON =
+ "application/jrd+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JRD_JSON} media
+ * type defined by RFC 7033.
+ */
+ public static final MediaType APPLICATION_JRD_JSON_TYPE =
+ new MediaType("application", "jrd+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSCALENDAR_JSON} media
+ * type defined by RFC 8984.
+ */
+ public static final String APPLICATION_JSCALENDAR_JSON =
+ "application/jscalendar+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSCALENDAR_JSON} media
+ * type defined by RFC 8984.
+ */
+ public static final MediaType APPLICATION_JSCALENDAR_JSON_TYPE =
+ new MediaType("application", "jscalendar+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSCONTACT_JSON} media
+ * type defined by RFC 9553.
+ */
+ public static final String APPLICATION_JSCONTACT_JSON =
+ "application/jscontact+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSCONTACT_JSON} media
+ * type defined by RFC 9553.
+ */
+ public static final MediaType APPLICATION_JSCONTACT_JSON_TYPE =
+ new MediaType("application", "jscontact+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSON} media
+ * type defined by RFC 8259.
+ */
+ public static final String APPLICATION_JSON =
+ "application/json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSON} media
+ * type defined by RFC 8259.
+ */
+ public static final MediaType APPLICATION_JSON_TYPE =
+ new MediaType("application", "json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSON_PATCH_JSON} media
+ * type defined by RFC 6902.
+ */
+ public static final String APPLICATION_JSON_PATCH_JSON =
+ "application/json-patch+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSON_PATCH_JSON} media
+ * type defined by RFC 6902.
+ */
+ public static final MediaType APPLICATION_JSON_PATCH_JSON_TYPE =
+ new MediaType("application", "json-patch+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSON_SEQ} media
+ * type defined by RFC 7464.
+ */
+ public static final String APPLICATION_JSON_SEQ =
+ "application/json-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSON_SEQ} media
+ * type defined by RFC 7464.
+ */
+ public static final MediaType APPLICATION_JSON_SEQ_TYPE =
+ new MediaType("application", "json-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JSONPATH} media
+ * type defined by RFC 9535.
+ */
+ public static final String APPLICATION_JSONPATH =
+ "application/jsonpath";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JSONPATH} media
+ * type defined by RFC 9535.
+ */
+ public static final MediaType APPLICATION_JSONPATH_TYPE =
+ new MediaType("application", "jsonpath");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JWK_JSON} media
+ * type defined by RFC 7517.
+ */
+ public static final String APPLICATION_JWK_JSON =
+ "application/jwk+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JWK_JSON} media
+ * type defined by RFC 7517.
+ */
+ public static final MediaType APPLICATION_JWK_JSON_TYPE =
+ new MediaType("application", "jwk+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JWK_SET_JSON} media
+ * type defined by RFC 7517.
+ */
+ public static final String APPLICATION_JWK_SET_JSON =
+ "application/jwk-set+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JWK_SET_JSON} media
+ * type defined by RFC 7517.
+ */
+ public static final MediaType APPLICATION_JWK_SET_JSON_TYPE =
+ new MediaType("application", "jwk-set+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_JWT} media
+ * type defined by RFC 7519.
+ */
+ public static final String APPLICATION_JWT =
+ "application/jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_JWT} media
+ * type defined by RFC 7519.
+ */
+ public static final MediaType APPLICATION_JWT_TYPE =
+ new MediaType("application", "jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_KB_JWT} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final String APPLICATION_KB_JWT =
+ "application/kb+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_KB_JWT} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final MediaType APPLICATION_KB_JWT_TYPE =
+ new MediaType("application", "kb+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_KPML_REQUEST_XML} media
+ * type defined by RFC 4730.
+ */
+ public static final String APPLICATION_KPML_REQUEST_XML =
+ "application/kpml-request+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_KPML_REQUEST_XML} media
+ * type defined by RFC 4730.
+ */
+ public static final MediaType APPLICATION_KPML_REQUEST_XML_TYPE =
+ new MediaType("application", "kpml-request+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_KPML_RESPONSE_XML} media
+ * type defined by RFC 4730.
+ */
+ public static final String APPLICATION_KPML_RESPONSE_XML =
+ "application/kpml-response+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_KPML_RESPONSE_XML} media
+ * type defined by RFC 4730.
+ */
+ public static final MediaType APPLICATION_KPML_RESPONSE_XML_TYPE =
+ new MediaType("application", "kpml-response+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LGR_XML} media
+ * type defined by RFC 7940.
+ */
+ public static final String APPLICATION_LGR_XML =
+ "application/lgr+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LGR_XML} media
+ * type defined by RFC 7940.
+ */
+ public static final MediaType APPLICATION_LGR_XML_TYPE =
+ new MediaType("application", "lgr+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LINK_FORMAT} media
+ * type defined by RFC 6690.
+ */
+ public static final String APPLICATION_LINK_FORMAT =
+ "application/link-format";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LINK_FORMAT} media
+ * type defined by RFC 6690.
+ */
+ public static final MediaType APPLICATION_LINK_FORMAT_TYPE =
+ new MediaType("application", "link-format");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LINKSET} media
+ * type defined by RFC 9264.
+ */
+ public static final String APPLICATION_LINKSET =
+ "application/linkset";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LINKSET} media
+ * type defined by RFC 9264.
+ */
+ public static final MediaType APPLICATION_LINKSET_TYPE =
+ new MediaType("application", "linkset");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LINKSET_JSON} media
+ * type defined by RFC 9264.
+ */
+ public static final String APPLICATION_LINKSET_JSON =
+ "application/linkset+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LINKSET_JSON} media
+ * type defined by RFC 9264.
+ */
+ public static final MediaType APPLICATION_LINKSET_JSON_TYPE =
+ new MediaType("application", "linkset+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LOAD_CONTROL_XML} media
+ * type defined by RFC 7200.
+ */
+ public static final String APPLICATION_LOAD_CONTROL_XML =
+ "application/load-control+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LOAD_CONTROL_XML} media
+ * type defined by RFC 7200.
+ */
+ public static final MediaType APPLICATION_LOAD_CONTROL_XML_TYPE =
+ new MediaType("application", "load-control+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LOST_XML} media
+ * type defined by RFC 5222.
+ */
+ public static final String APPLICATION_LOST_XML =
+ "application/lost+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LOST_XML} media
+ * type defined by RFC 5222.
+ */
+ public static final MediaType APPLICATION_LOST_XML_TYPE =
+ new MediaType("application", "lost+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_LOSTSYNC_XML} media
+ * type defined by RFC 6739.
+ */
+ public static final String APPLICATION_LOSTSYNC_XML =
+ "application/lostsync+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_LOSTSYNC_XML} media
+ * type defined by RFC 6739.
+ */
+ public static final MediaType APPLICATION_LOSTSYNC_XML_TYPE =
+ new MediaType("application", "lostsync+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MADS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final String APPLICATION_MADS_XML =
+ "application/mads+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MADS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final MediaType APPLICATION_MADS_XML_TYPE =
+ new MediaType("application", "mads+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MARC} media
+ * type defined by RFC 2220.
+ */
+ public static final String APPLICATION_MARC =
+ "application/marc";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MARC} media
+ * type defined by RFC 2220.
+ */
+ public static final MediaType APPLICATION_MARC_TYPE =
+ new MediaType("application", "marc");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MARCXML_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final String APPLICATION_MARCXML_XML =
+ "application/marcxml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MARCXML_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final MediaType APPLICATION_MARCXML_XML_TYPE =
+ new MediaType("application", "marcxml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MATHML_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final String APPLICATION_MATHML_XML =
+ "application/mathml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MATHML_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final MediaType APPLICATION_MATHML_XML_TYPE =
+ new MediaType("application", "mathml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MATHML_CONTENT_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final String APPLICATION_MATHML_CONTENT_XML =
+ "application/mathml-content+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MATHML_CONTENT_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final MediaType APPLICATION_MATHML_CONTENT_XML_TYPE =
+ new MediaType("application", "mathml-content+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MATHML_PRESENTATION_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final String APPLICATION_MATHML_PRESENTATION_XML =
+ "application/mathml-presentation+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MATHML_PRESENTATION_XML} media
+ * type defined by {@code http://www.w3.org/TR/MathML3/appendixb.html}.
+ */
+ public static final MediaType APPLICATION_MATHML_PRESENTATION_XML_TYPE =
+ new MediaType("application", "mathml-presentation+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MBOX} media
+ * type defined by RFC 4155.
+ */
+ public static final String APPLICATION_MBOX =
+ "application/mbox";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MBOX} media
+ * type defined by RFC 4155.
+ */
+ public static final MediaType APPLICATION_MBOX_TYPE =
+ new MediaType("application", "mbox");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MEDIA_CONTROL_XML} media
+ * type defined by RFC 5168.
+ */
+ public static final String APPLICATION_MEDIA_CONTROL_XML =
+ "application/media_control+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MEDIA_CONTROL_XML} media
+ * type defined by RFC 5168.
+ */
+ public static final MediaType APPLICATION_MEDIA_CONTROL_XML_TYPE =
+ new MediaType("application", "media_control+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MEDIA_POLICY_DATASET_XML} media
+ * type defined by RFC 6796.
+ */
+ public static final String APPLICATION_MEDIA_POLICY_DATASET_XML =
+ "application/media-policy-dataset+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MEDIA_POLICY_DATASET_XML} media
+ * type defined by RFC 6796.
+ */
+ public static final MediaType APPLICATION_MEDIA_POLICY_DATASET_XML_TYPE =
+ new MediaType("application", "media-policy-dataset+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MEDIASERVERCONTROL_XML} media
+ * type defined by RFC 5022.
+ */
+ public static final String APPLICATION_MEDIASERVERCONTROL_XML =
+ "application/mediaservercontrol+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MEDIASERVERCONTROL_XML} media
+ * type defined by RFC 5022.
+ */
+ public static final MediaType APPLICATION_MEDIASERVERCONTROL_XML_TYPE =
+ new MediaType("application", "mediaservercontrol+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MERGE_PATCH_JSON} media
+ * type defined by RFC 7396.
+ */
+ public static final String APPLICATION_MERGE_PATCH_JSON =
+ "application/merge-patch+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MERGE_PATCH_JSON} media
+ * type defined by RFC 7396.
+ */
+ public static final MediaType APPLICATION_MERGE_PATCH_JSON_TYPE =
+ new MediaType("application", "merge-patch+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_METALINK4_XML} media
+ * type defined by RFC 5854.
+ */
+ public static final String APPLICATION_METALINK4_XML =
+ "application/metalink4+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_METALINK4_XML} media
+ * type defined by RFC 5854.
+ */
+ public static final MediaType APPLICATION_METALINK4_XML_TYPE =
+ new MediaType("application", "metalink4+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_METS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final String APPLICATION_METS_XML =
+ "application/mets+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_METS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final MediaType APPLICATION_METS_XML_TYPE =
+ new MediaType("application", "mets+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MIKEY} media
+ * type defined by RFC 3830.
+ */
+ public static final String APPLICATION_MIKEY =
+ "application/mikey";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MIKEY} media
+ * type defined by RFC 3830.
+ */
+ public static final MediaType APPLICATION_MIKEY_TYPE =
+ new MediaType("application", "mikey");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MISSING_BLOCKS_CBOR_SEQ} media
+ * type defined by RFC 9177.
+ */
+ public static final String APPLICATION_MISSING_BLOCKS_CBOR_SEQ =
+ "application/missing-blocks+cbor-seq";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MISSING_BLOCKS_CBOR_SEQ} media
+ * type defined by RFC 9177.
+ */
+ public static final MediaType APPLICATION_MISSING_BLOCKS_CBOR_SEQ_TYPE =
+ new MediaType("application", "missing-blocks+cbor-seq");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MODS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final String APPLICATION_MODS_XML =
+ "application/mods+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MODS_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final MediaType APPLICATION_MODS_XML_TYPE =
+ new MediaType("application", "mods+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MOSS_KEYS} media
+ * type defined by RFC 1848.
+ */
+ public static final String APPLICATION_MOSS_KEYS =
+ "application/moss-keys";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MOSS_KEYS} media
+ * type defined by RFC 1848.
+ */
+ public static final MediaType APPLICATION_MOSS_KEYS_TYPE =
+ new MediaType("application", "moss-keys");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MOSS_SIGNATURE} media
+ * type defined by RFC 1848.
+ */
+ public static final String APPLICATION_MOSS_SIGNATURE =
+ "application/moss-signature";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MOSS_SIGNATURE} media
+ * type defined by RFC 1848.
+ */
+ public static final MediaType APPLICATION_MOSS_SIGNATURE_TYPE =
+ new MediaType("application", "moss-signature");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MOSSKEY_DATA} media
+ * type defined by RFC 1848.
+ */
+ public static final String APPLICATION_MOSSKEY_DATA =
+ "application/mosskey-data";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MOSSKEY_DATA} media
+ * type defined by RFC 1848.
+ */
+ public static final MediaType APPLICATION_MOSSKEY_DATA_TYPE =
+ new MediaType("application", "mosskey-data");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MOSSKEY_REQUEST} media
+ * type defined by RFC 1848.
+ */
+ public static final String APPLICATION_MOSSKEY_REQUEST =
+ "application/mosskey-request";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MOSSKEY_REQUEST} media
+ * type defined by RFC 1848.
+ */
+ public static final MediaType APPLICATION_MOSSKEY_REQUEST_TYPE =
+ new MediaType("application", "mosskey-request");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MP21} media
+ * type defined by RFC 6381.
+ */
+ public static final String APPLICATION_MP21 =
+ "application/mp21";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MP21} media
+ * type defined by RFC 6381.
+ */
+ public static final MediaType APPLICATION_MP21_TYPE =
+ new MediaType("application", "mp21");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final String APPLICATION_MP4 =
+ "application/mp4";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final MediaType APPLICATION_MP4_TYPE =
+ new MediaType("application", "mp4");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MPEG4_GENERIC} media
+ * type defined by RFC 3640.
+ */
+ public static final String APPLICATION_MPEG4_GENERIC =
+ "application/mpeg4-generic";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MPEG4_GENERIC} media
+ * type defined by RFC 3640.
+ */
+ public static final MediaType APPLICATION_MPEG4_GENERIC_TYPE =
+ new MediaType("application", "mpeg4-generic");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MPEG4_IOD} media
+ * type defined by RFC 4337.
+ */
+ public static final String APPLICATION_MPEG4_IOD =
+ "application/mpeg4-iod";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MPEG4_IOD} media
+ * type defined by RFC 4337.
+ */
+ public static final MediaType APPLICATION_MPEG4_IOD_TYPE =
+ new MediaType("application", "mpeg4-iod");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MPEG4_IOD_XMT} media
+ * type defined by RFC 4337.
+ */
+ public static final String APPLICATION_MPEG4_IOD_XMT =
+ "application/mpeg4-iod-xmt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MPEG4_IOD_XMT} media
+ * type defined by RFC 4337.
+ */
+ public static final MediaType APPLICATION_MPEG4_IOD_XMT_TYPE =
+ new MediaType("application", "mpeg4-iod-xmt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MRB_CONSUMER_XML} media
+ * type defined by RFC 6917.
+ */
+ public static final String APPLICATION_MRB_CONSUMER_XML =
+ "application/mrb-consumer+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MRB_CONSUMER_XML} media
+ * type defined by RFC 6917.
+ */
+ public static final MediaType APPLICATION_MRB_CONSUMER_XML_TYPE =
+ new MediaType("application", "mrb-consumer+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MRB_PUBLISH_XML} media
+ * type defined by RFC 6917.
+ */
+ public static final String APPLICATION_MRB_PUBLISH_XML =
+ "application/mrb-publish+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MRB_PUBLISH_XML} media
+ * type defined by RFC 6917.
+ */
+ public static final MediaType APPLICATION_MRB_PUBLISH_XML_TYPE =
+ new MediaType("application", "mrb-publish+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MSC_IVR_XML} media
+ * type defined by RFC 6231.
+ */
+ public static final String APPLICATION_MSC_IVR_XML =
+ "application/msc-ivr+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MSC_IVR_XML} media
+ * type defined by RFC 6231.
+ */
+ public static final MediaType APPLICATION_MSC_IVR_XML_TYPE =
+ new MediaType("application", "msc-ivr+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MSC_MIXER_XML} media
+ * type defined by RFC 6505.
+ */
+ public static final String APPLICATION_MSC_MIXER_XML =
+ "application/msc-mixer+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MSC_MIXER_XML} media
+ * type defined by RFC 6505.
+ */
+ public static final MediaType APPLICATION_MSC_MIXER_XML_TYPE =
+ new MediaType("application", "msc-mixer+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MUD_JSON} media
+ * type defined by RFC 8520.
+ */
+ public static final String APPLICATION_MUD_JSON =
+ "application/mud+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MUD_JSON} media
+ * type defined by RFC 8520.
+ */
+ public static final MediaType APPLICATION_MUD_JSON_TYPE =
+ new MediaType("application", "mud+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MULTIPART_CORE} media
+ * type defined by RFC 8710.
+ */
+ public static final String APPLICATION_MULTIPART_CORE =
+ "application/multipart-core";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MULTIPART_CORE} media
+ * type defined by RFC 8710.
+ */
+ public static final MediaType APPLICATION_MULTIPART_CORE_TYPE =
+ new MediaType("application", "multipart-core");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_MXF} media
+ * type defined by RFC 4539.
+ */
+ public static final String APPLICATION_MXF =
+ "application/mxf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_MXF} media
+ * type defined by RFC 4539.
+ */
+ public static final MediaType APPLICATION_MXF_TYPE =
+ new MediaType("application", "mxf");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_NASDATA} media
+ * type defined by RFC 4707.
+ */
+ public static final String APPLICATION_NASDATA =
+ "application/nasdata";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_NASDATA} media
+ * type defined by RFC 4707.
+ */
+ public static final MediaType APPLICATION_NASDATA_TYPE =
+ new MediaType("application", "nasdata");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_NEWS_CHECKGROUPS} media
+ * type defined by RFC 5537.
+ */
+ public static final String APPLICATION_NEWS_CHECKGROUPS =
+ "application/news-checkgroups";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_NEWS_CHECKGROUPS} media
+ * type defined by RFC 5537.
+ */
+ public static final MediaType APPLICATION_NEWS_CHECKGROUPS_TYPE =
+ new MediaType("application", "news-checkgroups");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_NEWS_GROUPINFO} media
+ * type defined by RFC 5537.
+ */
+ public static final String APPLICATION_NEWS_GROUPINFO =
+ "application/news-groupinfo";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_NEWS_GROUPINFO} media
+ * type defined by RFC 5537.
+ */
+ public static final MediaType APPLICATION_NEWS_GROUPINFO_TYPE =
+ new MediaType("application", "news-groupinfo");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_NEWS_TRANSMISSION} media
+ * type defined by RFC 5537.
+ */
+ public static final String APPLICATION_NEWS_TRANSMISSION =
+ "application/news-transmission";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_NEWS_TRANSMISSION} media
+ * type defined by RFC 5537.
+ */
+ public static final MediaType APPLICATION_NEWS_TRANSMISSION_TYPE =
+ new MediaType("application", "news-transmission");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_NLSML_XML} media
+ * type defined by RFC 6787.
+ */
+ public static final String APPLICATION_NLSML_XML =
+ "application/nlsml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_NLSML_XML} media
+ * type defined by RFC 6787.
+ */
+ public static final MediaType APPLICATION_NLSML_XML_TYPE =
+ new MediaType("application", "nlsml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OAUTH_AUTHZ_REQ_JWT} media
+ * type defined by RFC 9101.
+ */
+ public static final String APPLICATION_OAUTH_AUTHZ_REQ_JWT =
+ "application/oauth-authz-req+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OAUTH_AUTHZ_REQ_JWT} media
+ * type defined by RFC 9101.
+ */
+ public static final MediaType APPLICATION_OAUTH_AUTHZ_REQ_JWT_TYPE =
+ new MediaType("application", "oauth-authz-req+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OBLIVIOUS_DNS_MESSAGE} media
+ * type defined by RFC 9230.
+ */
+ public static final String APPLICATION_OBLIVIOUS_DNS_MESSAGE =
+ "application/oblivious-dns-message";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OBLIVIOUS_DNS_MESSAGE} media
+ * type defined by RFC 9230.
+ */
+ public static final MediaType APPLICATION_OBLIVIOUS_DNS_MESSAGE_TYPE =
+ new MediaType("application", "oblivious-dns-message");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OCSP_REQUEST} media
+ * type defined by RFC 6960.
+ */
+ public static final String APPLICATION_OCSP_REQUEST =
+ "application/ocsp-request";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OCSP_REQUEST} media
+ * type defined by RFC 6960.
+ */
+ public static final MediaType APPLICATION_OCSP_REQUEST_TYPE =
+ new MediaType("application", "ocsp-request");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OCSP_RESPONSE} media
+ * type defined by RFC 6960.
+ */
+ public static final String APPLICATION_OCSP_RESPONSE =
+ "application/ocsp-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OCSP_RESPONSE} media
+ * type defined by RFC 6960.
+ */
+ public static final MediaType APPLICATION_OCSP_RESPONSE_TYPE =
+ new MediaType("application", "ocsp-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OCTET_STREAM} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String APPLICATION_OCTET_STREAM =
+ "application/octet-stream";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OCTET_STREAM} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType APPLICATION_OCTET_STREAM_TYPE =
+ new MediaType("application", "octet-stream");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ODA} media
+ * type defined by RFC 1494.
+ */
+ public static final String APPLICATION_ODA =
+ "application/ODA";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ODA} media
+ * type defined by RFC 1494.
+ */
+ public static final MediaType APPLICATION_ODA_TYPE =
+ new MediaType("application", "ODA");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final String APPLICATION_OGG =
+ "application/ogg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final MediaType APPLICATION_OGG_TYPE =
+ new MediaType("application", "ogg");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OHTTP_KEYS} media
+ * type defined by RFC 9458.
+ */
+ public static final String APPLICATION_OHTTP_KEYS =
+ "application/ohttp-keys";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OHTTP_KEYS} media
+ * type defined by RFC 9458.
+ */
+ public static final MediaType APPLICATION_OHTTP_KEYS_TYPE =
+ new MediaType("application", "ohttp-keys");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_OSCORE} media
+ * type defined by RFC 8613.
+ */
+ public static final String APPLICATION_OSCORE =
+ "application/oscore";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_OSCORE} media
+ * type defined by RFC 8613.
+ */
+ public static final MediaType APPLICATION_OSCORE_TYPE =
+ new MediaType("application", "oscore");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_P2P_OVERLAY_XML} media
+ * type defined by RFC 6940.
+ */
+ public static final String APPLICATION_P2P_OVERLAY_XML =
+ "application/p2p-overlay+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_P2P_OVERLAY_XML} media
+ * type defined by RFC 6940.
+ */
+ public static final MediaType APPLICATION_P2P_OVERLAY_XML_TYPE =
+ new MediaType("application", "p2p-overlay+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final String APPLICATION_PARITYFEC =
+ "application/parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final MediaType APPLICATION_PARITYFEC_TYPE =
+ new MediaType("application", "parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PASSPORT} media
+ * type defined by RFC 8225.
+ */
+ public static final String APPLICATION_PASSPORT =
+ "application/passport";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PASSPORT} media
+ * type defined by RFC 8225.
+ */
+ public static final MediaType APPLICATION_PASSPORT_TYPE =
+ new MediaType("application", "passport");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PATCH_OPS_ERROR_XML} media
+ * type defined by RFC 5261.
+ */
+ public static final String APPLICATION_PATCH_OPS_ERROR_XML =
+ "application/patch-ops-error+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PATCH_OPS_ERROR_XML} media
+ * type defined by RFC 5261.
+ */
+ public static final MediaType APPLICATION_PATCH_OPS_ERROR_XML_TYPE =
+ new MediaType("application", "patch-ops-error+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PDF} media
+ * type defined by RFC 8118.
+ */
+ public static final String APPLICATION_PDF =
+ "application/pdf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PDF} media
+ * type defined by RFC 8118.
+ */
+ public static final MediaType APPLICATION_PDF_TYPE =
+ new MediaType("application", "pdf");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PEM_CERTIFICATE_CHAIN} media
+ * type defined by RFC 8555.
+ */
+ public static final String APPLICATION_PEM_CERTIFICATE_CHAIN =
+ "application/pem-certificate-chain";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PEM_CERTIFICATE_CHAIN} media
+ * type defined by RFC 8555.
+ */
+ public static final MediaType APPLICATION_PEM_CERTIFICATE_CHAIN_TYPE =
+ new MediaType("application", "pem-certificate-chain");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PGP_ENCRYPTED} media
+ * type defined by RFC 3156.
+ */
+ public static final String APPLICATION_PGP_ENCRYPTED =
+ "application/pgp-encrypted";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PGP_ENCRYPTED} media
+ * type defined by RFC 3156.
+ */
+ public static final MediaType APPLICATION_PGP_ENCRYPTED_TYPE =
+ new MediaType("application", "pgp-encrypted");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PGP_KEYS} media
+ * type defined by RFC 3156.
+ */
+ public static final String APPLICATION_PGP_KEYS =
+ "application/pgp-keys";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PGP_KEYS} media
+ * type defined by RFC 3156.
+ */
+ public static final MediaType APPLICATION_PGP_KEYS_TYPE =
+ new MediaType("application", "pgp-keys");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PGP_SIGNATURE} media
+ * type defined by RFC 3156.
+ */
+ public static final String APPLICATION_PGP_SIGNATURE =
+ "application/pgp-signature";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PGP_SIGNATURE} media
+ * type defined by RFC 3156.
+ */
+ public static final MediaType APPLICATION_PGP_SIGNATURE_TYPE =
+ new MediaType("application", "pgp-signature");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PIDF_DIFF_XML} media
+ * type defined by RFC 5262.
+ */
+ public static final String APPLICATION_PIDF_DIFF_XML =
+ "application/pidf-diff+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PIDF_DIFF_XML} media
+ * type defined by RFC 5262.
+ */
+ public static final MediaType APPLICATION_PIDF_DIFF_XML_TYPE =
+ new MediaType("application", "pidf-diff+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PIDF_XML} media
+ * type defined by RFC 3863.
+ */
+ public static final String APPLICATION_PIDF_XML =
+ "application/pidf+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PIDF_XML} media
+ * type defined by RFC 3863.
+ */
+ public static final MediaType APPLICATION_PIDF_XML_TYPE =
+ new MediaType("application", "pidf+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKCS10} media
+ * type defined by RFC 5967.
+ */
+ public static final String APPLICATION_PKCS10 =
+ "application/pkcs10";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKCS10} media
+ * type defined by RFC 5967.
+ */
+ public static final MediaType APPLICATION_PKCS10_TYPE =
+ new MediaType("application", "pkcs10");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKCS7_MIME} media
+ * type defined by RFC 8551, and RFC 7114.
+ */
+ public static final String APPLICATION_PKCS7_MIME =
+ "application/pkcs7-mime";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKCS7_MIME} media
+ * type defined by RFC 8551, and RFC 7114.
+ */
+ public static final MediaType APPLICATION_PKCS7_MIME_TYPE =
+ new MediaType("application", "pkcs7-mime");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKCS7_SIGNATURE} media
+ * type defined by RFC 8551.
+ */
+ public static final String APPLICATION_PKCS7_SIGNATURE =
+ "application/pkcs7-signature";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKCS7_SIGNATURE} media
+ * type defined by RFC 8551.
+ */
+ public static final MediaType APPLICATION_PKCS7_SIGNATURE_TYPE =
+ new MediaType("application", "pkcs7-signature");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKCS8} media
+ * type defined by RFC 5958.
+ */
+ public static final String APPLICATION_PKCS8 =
+ "application/pkcs8";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKCS8} media
+ * type defined by RFC 5958.
+ */
+ public static final MediaType APPLICATION_PKCS8_TYPE =
+ new MediaType("application", "pkcs8");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKCS8_ENCRYPTED} media
+ * type defined by RFC 8351.
+ */
+ public static final String APPLICATION_PKCS8_ENCRYPTED =
+ "application/pkcs8-encrypted";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKCS8_ENCRYPTED} media
+ * type defined by RFC 8351.
+ */
+ public static final MediaType APPLICATION_PKCS8_ENCRYPTED_TYPE =
+ new MediaType("application", "pkcs8-encrypted");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKIX_ATTR_CERT} media
+ * type defined by RFC 5877.
+ */
+ public static final String APPLICATION_PKIX_ATTR_CERT =
+ "application/pkix-attr-cert";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKIX_ATTR_CERT} media
+ * type defined by RFC 5877.
+ */
+ public static final MediaType APPLICATION_PKIX_ATTR_CERT_TYPE =
+ new MediaType("application", "pkix-attr-cert");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKIX_CERT} media
+ * type defined by RFC 2585.
+ */
+ public static final String APPLICATION_PKIX_CERT =
+ "application/pkix-cert";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKIX_CERT} media
+ * type defined by RFC 2585.
+ */
+ public static final MediaType APPLICATION_PKIX_CERT_TYPE =
+ new MediaType("application", "pkix-cert");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKIX_CRL} media
+ * type defined by RFC 2585.
+ */
+ public static final String APPLICATION_PKIX_CRL =
+ "application/pkix-crl";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKIX_CRL} media
+ * type defined by RFC 2585.
+ */
+ public static final MediaType APPLICATION_PKIX_CRL_TYPE =
+ new MediaType("application", "pkix-crl");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKIX_PKIPATH} media
+ * type defined by RFC 6066.
+ */
+ public static final String APPLICATION_PKIX_PKIPATH =
+ "application/pkix-pkipath";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKIX_PKIPATH} media
+ * type defined by RFC 6066.
+ */
+ public static final MediaType APPLICATION_PKIX_PKIPATH_TYPE =
+ new MediaType("application", "pkix-pkipath");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PKIXCMP} media
+ * type defined by RFC 9811.
+ */
+ public static final String APPLICATION_PKIXCMP =
+ "application/pkixcmp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PKIXCMP} media
+ * type defined by RFC 9811.
+ */
+ public static final MediaType APPLICATION_PKIXCMP_TYPE =
+ new MediaType("application", "pkixcmp");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PLS_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_PLS_XML =
+ "application/pls+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PLS_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_PLS_XML_TYPE =
+ new MediaType("application", "pls+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_POC_SETTINGS_XML} media
+ * type defined by RFC 4354.
+ */
+ public static final String APPLICATION_POC_SETTINGS_XML =
+ "application/poc-settings+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_POC_SETTINGS_XML} media
+ * type defined by RFC 4354.
+ */
+ public static final MediaType APPLICATION_POC_SETTINGS_XML_TYPE =
+ new MediaType("application", "poc-settings+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_POSTSCRIPT} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String APPLICATION_POSTSCRIPT =
+ "application/postscript";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_POSTSCRIPT} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType APPLICATION_POSTSCRIPT_TYPE =
+ new MediaType("application", "postscript");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PPSP_TRACKER_JSON} media
+ * type defined by RFC 7846.
+ */
+ public static final String APPLICATION_PPSP_TRACKER_JSON =
+ "application/ppsp-tracker+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PPSP_TRACKER_JSON} media
+ * type defined by RFC 7846.
+ */
+ public static final MediaType APPLICATION_PPSP_TRACKER_JSON_TYPE =
+ new MediaType("application", "ppsp-tracker+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY} media
+ * type defined by RFC 9578.
+ */
+ public static final String APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY =
+ "application/private-token-issuer-directory";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY} media
+ * type defined by RFC 9578.
+ */
+ public static final MediaType APPLICATION_PRIVATE_TOKEN_ISSUER_DIRECTORY_TYPE =
+ new MediaType("application", "private-token-issuer-directory");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PRIVATE_TOKEN_REQUEST} media
+ * type defined by RFC 9578.
+ */
+ public static final String APPLICATION_PRIVATE_TOKEN_REQUEST =
+ "application/private-token-request";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PRIVATE_TOKEN_REQUEST} media
+ * type defined by RFC 9578.
+ */
+ public static final MediaType APPLICATION_PRIVATE_TOKEN_REQUEST_TYPE =
+ new MediaType("application", "private-token-request");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PRIVATE_TOKEN_RESPONSE} media
+ * type defined by RFC 9578.
+ */
+ public static final String APPLICATION_PRIVATE_TOKEN_RESPONSE =
+ "application/private-token-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PRIVATE_TOKEN_RESPONSE} media
+ * type defined by RFC 9578.
+ */
+ public static final MediaType APPLICATION_PRIVATE_TOKEN_RESPONSE_TYPE =
+ new MediaType("application", "private-token-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PROBLEM_JSON} media
+ * type defined by RFC 9457.
+ */
+ public static final String APPLICATION_PROBLEM_JSON =
+ "application/problem+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PROBLEM_JSON} media
+ * type defined by RFC 9457.
+ */
+ public static final MediaType APPLICATION_PROBLEM_JSON_TYPE =
+ new MediaType("application", "problem+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PROBLEM_XML} media
+ * type defined by RFC 9457.
+ */
+ public static final String APPLICATION_PROBLEM_XML =
+ "application/problem+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PROBLEM_XML} media
+ * type defined by RFC 9457.
+ */
+ public static final MediaType APPLICATION_PROBLEM_XML_TYPE =
+ new MediaType("application", "problem+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PSKC_XML} media
+ * type defined by RFC 6030.
+ */
+ public static final String APPLICATION_PSKC_XML =
+ "application/pskc+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PSKC_XML} media
+ * type defined by RFC 6030.
+ */
+ public static final MediaType APPLICATION_PSKC_XML_TYPE =
+ new MediaType("application", "pskc+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_PVD_JSON} media
+ * type defined by RFC 8801.
+ */
+ public static final String APPLICATION_PVD_JSON =
+ "application/pvd+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_PVD_JSON} media
+ * type defined by RFC 8801.
+ */
+ public static final MediaType APPLICATION_PVD_JSON_TYPE =
+ new MediaType("application", "pvd+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RDF_XML} media
+ * type defined by RFC 3870.
+ */
+ public static final String APPLICATION_RDF_XML =
+ "application/rdf+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RDF_XML} media
+ * type defined by RFC 3870.
+ */
+ public static final MediaType APPLICATION_RDF_XML_TYPE =
+ new MediaType("application", "rdf+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_QSIG} media
+ * type defined by RFC 3204.
+ */
+ public static final String APPLICATION_QSIG =
+ "application/QSIG";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_QSIG} media
+ * type defined by RFC 3204.
+ */
+ public static final MediaType APPLICATION_QSIG_TYPE =
+ new MediaType("application", "QSIG");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final String APPLICATION_RAPTORFEC =
+ "application/raptorfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final MediaType APPLICATION_RAPTORFEC_TYPE =
+ new MediaType("application", "raptorfec");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RDAP_JSON} media
+ * type defined by RFC 9083.
+ */
+ public static final String APPLICATION_RDAP_JSON =
+ "application/rdap+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RDAP_JSON} media
+ * type defined by RFC 9083.
+ */
+ public static final MediaType APPLICATION_RDAP_JSON_TYPE =
+ new MediaType("application", "rdap+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_REGINFO_XML} media
+ * type defined by RFC 3680.
+ */
+ public static final String APPLICATION_REGINFO_XML =
+ "application/reginfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_REGINFO_XML} media
+ * type defined by RFC 3680.
+ */
+ public static final MediaType APPLICATION_REGINFO_XML_TYPE =
+ new MediaType("application", "reginfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RELAX_NG_COMPACT_SYNTAX} media
+ * type defined by {@code http://www.JTC_1sc34.org/repository/0661.pdf}.
+ */
+ public static final String APPLICATION_RELAX_NG_COMPACT_SYNTAX =
+ "application/relax-ng-compact-syntax";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RELAX_NG_COMPACT_SYNTAX} media
+ * type defined by {@code http://www.JTC_1sc34.org/repository/0661.pdf}.
+ */
+ public static final MediaType APPLICATION_RELAX_NG_COMPACT_SYNTAX_TYPE =
+ new MediaType("application", "relax-ng-compact-syntax");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_REMOTE_PRINTING} media
+ * type defined by RFC 1486.
+ */
+ public static final String APPLICATION_REMOTE_PRINTING =
+ "application/remote-printing";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_REMOTE_PRINTING} media
+ * type defined by RFC 1486.
+ */
+ public static final MediaType APPLICATION_REMOTE_PRINTING_TYPE =
+ new MediaType("application", "remote-printing");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_REPUTON_JSON} media
+ * type defined by RFC 7071.
+ */
+ public static final String APPLICATION_REPUTON_JSON =
+ "application/reputon+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_REPUTON_JSON} media
+ * type defined by RFC 7071.
+ */
+ public static final MediaType APPLICATION_REPUTON_JSON_TYPE =
+ new MediaType("application", "reputon+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RESOURCE_LISTS_DIFF_XML} media
+ * type defined by RFC 5362.
+ */
+ public static final String APPLICATION_RESOURCE_LISTS_DIFF_XML =
+ "application/resource-lists-diff+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RESOURCE_LISTS_DIFF_XML} media
+ * type defined by RFC 5362.
+ */
+ public static final MediaType APPLICATION_RESOURCE_LISTS_DIFF_XML_TYPE =
+ new MediaType("application", "resource-lists-diff+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RESOURCE_LISTS_XML} media
+ * type defined by RFC 4826.
+ */
+ public static final String APPLICATION_RESOURCE_LISTS_XML =
+ "application/resource-lists+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RESOURCE_LISTS_XML} media
+ * type defined by RFC 4826.
+ */
+ public static final MediaType APPLICATION_RESOURCE_LISTS_XML_TYPE =
+ new MediaType("application", "resource-lists+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RFC_XML} media
+ * type defined by RFC 7991.
+ */
+ public static final String APPLICATION_RFC_XML =
+ "application/rfc+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RFC_XML} media
+ * type defined by RFC 7991.
+ */
+ public static final MediaType APPLICATION_RFC_XML_TYPE =
+ new MediaType("application", "rfc+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RLMI_XML} media
+ * type defined by RFC 4662.
+ */
+ public static final String APPLICATION_RLMI_XML =
+ "application/rlmi+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RLMI_XML} media
+ * type defined by RFC 4662.
+ */
+ public static final MediaType APPLICATION_RLMI_XML_TYPE =
+ new MediaType("application", "rlmi+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RLS_SERVICES_XML} media
+ * type defined by RFC 4826.
+ */
+ public static final String APPLICATION_RLS_SERVICES_XML =
+ "application/rls-services+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RLS_SERVICES_XML} media
+ * type defined by RFC 4826.
+ */
+ public static final MediaType APPLICATION_RLS_SERVICES_XML_TYPE =
+ new MediaType("application", "rls-services+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_CHECKLIST} media
+ * type defined by RFC 9323.
+ */
+ public static final String APPLICATION_RPKI_CHECKLIST =
+ "application/rpki-checklist";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_CHECKLIST} media
+ * type defined by RFC 9323.
+ */
+ public static final MediaType APPLICATION_RPKI_CHECKLIST_TYPE =
+ new MediaType("application", "rpki-checklist");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_GHOSTBUSTERS} media
+ * type defined by RFC 6493.
+ */
+ public static final String APPLICATION_RPKI_GHOSTBUSTERS =
+ "application/rpki-ghostbusters";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_GHOSTBUSTERS} media
+ * type defined by RFC 6493.
+ */
+ public static final MediaType APPLICATION_RPKI_GHOSTBUSTERS_TYPE =
+ new MediaType("application", "rpki-ghostbusters");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_MANIFEST} media
+ * type defined by RFC 6481.
+ */
+ public static final String APPLICATION_RPKI_MANIFEST =
+ "application/rpki-manifest";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_MANIFEST} media
+ * type defined by RFC 6481.
+ */
+ public static final MediaType APPLICATION_RPKI_MANIFEST_TYPE =
+ new MediaType("application", "rpki-manifest");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_PUBLICATION} media
+ * type defined by RFC 8181.
+ */
+ public static final String APPLICATION_RPKI_PUBLICATION =
+ "application/rpki-publication";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_PUBLICATION} media
+ * type defined by RFC 8181.
+ */
+ public static final MediaType APPLICATION_RPKI_PUBLICATION_TYPE =
+ new MediaType("application", "rpki-publication");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_ROA} media
+ * type defined by RFC 9582.
+ */
+ public static final String APPLICATION_RPKI_ROA =
+ "application/rpki-roa";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_ROA} media
+ * type defined by RFC 9582.
+ */
+ public static final MediaType APPLICATION_RPKI_ROA_TYPE =
+ new MediaType("application", "rpki-roa");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_SIGNED_TAL} media
+ * type defined by RFC 9691.
+ */
+ public static final String APPLICATION_RPKI_SIGNED_TAL =
+ "application/rpki-signed-tal";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_SIGNED_TAL} media
+ * type defined by RFC 9691.
+ */
+ public static final MediaType APPLICATION_RPKI_SIGNED_TAL_TYPE =
+ new MediaType("application", "rpki-signed-tal");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RPKI_UPDOWN} media
+ * type defined by RFC 6492.
+ */
+ public static final String APPLICATION_RPKI_UPDOWN =
+ "application/rpki-updown";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RPKI_UPDOWN} media
+ * type defined by RFC 6492.
+ */
+ public static final MediaType APPLICATION_RPKI_UPDOWN_TYPE =
+ new MediaType("application", "rpki-updown");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RS_METADATA_XML} media
+ * type defined by RFC 7865, and RFC 9806.
+ */
+ public static final String APPLICATION_RS_METADATA_XML =
+ "application/rs-metadata+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RS_METADATA_XML} media
+ * type defined by RFC 7865, and RFC 9806.
+ */
+ public static final MediaType APPLICATION_RS_METADATA_XML_TYPE =
+ new MediaType("application", "rs-metadata+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final String APPLICATION_RTPLOOPBACK =
+ "application/rtploopback";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType APPLICATION_RTPLOOPBACK_TYPE =
+ new MediaType("application", "rtploopback");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final String APPLICATION_RTX =
+ "application/rtx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final MediaType APPLICATION_RTX_TYPE =
+ new MediaType("application", "rtx");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SBML_XML} media
+ * type defined by RFC 3823.
+ */
+ public static final String APPLICATION_SBML_XML =
+ "application/sbml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SBML_XML} media
+ * type defined by RFC 3823.
+ */
+ public static final MediaType APPLICATION_SBML_XML_TYPE =
+ new MediaType("application", "sbml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SCIM_JSON} media
+ * type defined by RFC 7644.
+ */
+ public static final String APPLICATION_SCIM_JSON =
+ "application/scim+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SCIM_JSON} media
+ * type defined by RFC 7644.
+ */
+ public static final MediaType APPLICATION_SCIM_JSON_TYPE =
+ new MediaType("application", "scim+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SCVP_CV_REQUEST} media
+ * type defined by RFC 5055.
+ */
+ public static final String APPLICATION_SCVP_CV_REQUEST =
+ "application/scvp-cv-request";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SCVP_CV_REQUEST} media
+ * type defined by RFC 5055.
+ */
+ public static final MediaType APPLICATION_SCVP_CV_REQUEST_TYPE =
+ new MediaType("application", "scvp-cv-request");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SCVP_CV_RESPONSE} media
+ * type defined by RFC 5055.
+ */
+ public static final String APPLICATION_SCVP_CV_RESPONSE =
+ "application/scvp-cv-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SCVP_CV_RESPONSE} media
+ * type defined by RFC 5055.
+ */
+ public static final MediaType APPLICATION_SCVP_CV_RESPONSE_TYPE =
+ new MediaType("application", "scvp-cv-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SCVP_VP_REQUEST} media
+ * type defined by RFC 5055.
+ */
+ public static final String APPLICATION_SCVP_VP_REQUEST =
+ "application/scvp-vp-request";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SCVP_VP_REQUEST} media
+ * type defined by RFC 5055.
+ */
+ public static final MediaType APPLICATION_SCVP_VP_REQUEST_TYPE =
+ new MediaType("application", "scvp-vp-request");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SCVP_VP_RESPONSE} media
+ * type defined by RFC 5055.
+ */
+ public static final String APPLICATION_SCVP_VP_RESPONSE =
+ "application/scvp-vp-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SCVP_VP_RESPONSE} media
+ * type defined by RFC 5055.
+ */
+ public static final MediaType APPLICATION_SCVP_VP_RESPONSE_TYPE =
+ new MediaType("application", "scvp-vp-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SD_JWT} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final String APPLICATION_SD_JWT =
+ "application/sd-jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SD_JWT} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final MediaType APPLICATION_SD_JWT_TYPE =
+ new MediaType("application", "sd-jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SD_JWT_JSON} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final String APPLICATION_SD_JWT_JSON =
+ "application/sd-jwt+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SD_JWT_JSON} media
+ * type defined by RFC-ietf-oauth-selective-disclosure-jwt-22.
+ */
+ public static final MediaType APPLICATION_SD_JWT_JSON_TYPE =
+ new MediaType("application", "sd-jwt+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SDF_JSON} media
+ * type defined by RFC-ietf-asdf-sdf-23.
+ */
+ public static final String APPLICATION_SDF_JSON =
+ "application/sdf+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SDF_JSON} media
+ * type defined by RFC-ietf-asdf-sdf-23.
+ */
+ public static final MediaType APPLICATION_SDF_JSON_TYPE =
+ new MediaType("application", "sdf+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SDP} media
+ * type defined by RFC 8866.
+ */
+ public static final String APPLICATION_SDP =
+ "application/sdp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SDP} media
+ * type defined by RFC 8866.
+ */
+ public static final MediaType APPLICATION_SDP_TYPE =
+ new MediaType("application", "sdp");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SECEVENT_JWT} media
+ * type defined by RFC 8417.
+ */
+ public static final String APPLICATION_SECEVENT_JWT =
+ "application/secevent+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SECEVENT_JWT} media
+ * type defined by RFC 8417.
+ */
+ public static final MediaType APPLICATION_SECEVENT_JWT_TYPE =
+ new MediaType("application", "secevent+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_ETCH_CBOR} media
+ * type defined by RFC 8790.
+ */
+ public static final String APPLICATION_SENML_ETCH_CBOR =
+ "application/senml-etch+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_ETCH_CBOR} media
+ * type defined by RFC 8790.
+ */
+ public static final MediaType APPLICATION_SENML_ETCH_CBOR_TYPE =
+ new MediaType("application", "senml-etch+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_ETCH_JSON} media
+ * type defined by RFC 8790.
+ */
+ public static final String APPLICATION_SENML_ETCH_JSON =
+ "application/senml-etch+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_ETCH_JSON} media
+ * type defined by RFC 8790.
+ */
+ public static final MediaType APPLICATION_SENML_ETCH_JSON_TYPE =
+ new MediaType("application", "senml-etch+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_EXI} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENML_EXI =
+ "application/senml-exi";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_EXI} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENML_EXI_TYPE =
+ new MediaType("application", "senml-exi");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_CBOR} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENML_CBOR =
+ "application/senml+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_CBOR} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENML_CBOR_TYPE =
+ new MediaType("application", "senml+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_JSON} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENML_JSON =
+ "application/senml+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_JSON} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENML_JSON_TYPE =
+ new MediaType("application", "senml+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENML_XML} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENML_XML =
+ "application/senml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENML_XML} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENML_XML_TYPE =
+ new MediaType("application", "senml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENSML_EXI} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENSML_EXI =
+ "application/sensml-exi";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENSML_EXI} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENSML_EXI_TYPE =
+ new MediaType("application", "sensml-exi");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENSML_CBOR} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENSML_CBOR =
+ "application/sensml+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENSML_CBOR} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENSML_CBOR_TYPE =
+ new MediaType("application", "sensml+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENSML_JSON} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENSML_JSON =
+ "application/sensml+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENSML_JSON} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENSML_JSON_TYPE =
+ new MediaType("application", "sensml+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SENSML_XML} media
+ * type defined by RFC 8428.
+ */
+ public static final String APPLICATION_SENSML_XML =
+ "application/sensml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SENSML_XML} media
+ * type defined by RFC 8428.
+ */
+ public static final MediaType APPLICATION_SENSML_XML_TYPE =
+ new MediaType("application", "sensml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SGML} media
+ * type defined by RFC 1874.
+ */
+ public static final String APPLICATION_SGML =
+ "application/SGML";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SGML} media
+ * type defined by RFC 1874.
+ */
+ public static final MediaType APPLICATION_SGML_TYPE =
+ new MediaType("application", "SGML");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SHF_XML} media
+ * type defined by RFC 4194.
+ */
+ public static final String APPLICATION_SHF_XML =
+ "application/shf+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SHF_XML} media
+ * type defined by RFC 4194.
+ */
+ public static final MediaType APPLICATION_SHF_XML_TYPE =
+ new MediaType("application", "shf+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SIEVE} media
+ * type defined by RFC 5228.
+ */
+ public static final String APPLICATION_SIEVE =
+ "application/sieve";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SIEVE} media
+ * type defined by RFC 5228.
+ */
+ public static final MediaType APPLICATION_SIEVE_TYPE =
+ new MediaType("application", "sieve");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SIMPLE_FILTER_XML} media
+ * type defined by RFC 4661.
+ */
+ public static final String APPLICATION_SIMPLE_FILTER_XML =
+ "application/simple-filter+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SIMPLE_FILTER_XML} media
+ * type defined by RFC 4661.
+ */
+ public static final MediaType APPLICATION_SIMPLE_FILTER_XML_TYPE =
+ new MediaType("application", "simple-filter+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SIMPLE_MESSAGE_SUMMARY} media
+ * type defined by RFC 3842.
+ */
+ public static final String APPLICATION_SIMPLE_MESSAGE_SUMMARY =
+ "application/simple-message-summary";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SIMPLE_MESSAGE_SUMMARY} media
+ * type defined by RFC 3842.
+ */
+ public static final MediaType APPLICATION_SIMPLE_MESSAGE_SUMMARY_TYPE =
+ new MediaType("application", "simple-message-summary");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SMIL} media
+ * type defined by RFC 4536.
+ */
+ public static final String APPLICATION_SMIL =
+ "application/smil";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SMIL} media
+ * type defined by RFC 4536.
+ */
+ public static final MediaType APPLICATION_SMIL_TYPE =
+ new MediaType("application", "smil");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SMIL_XML} media
+ * type defined by RFC 4536.
+ */
+ public static final String APPLICATION_SMIL_XML =
+ "application/smil+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SMIL_XML} media
+ * type defined by RFC 4536.
+ */
+ public static final MediaType APPLICATION_SMIL_XML_TYPE =
+ new MediaType("application", "smil+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SMPTE336M} media
+ * type defined by RFC 6597.
+ */
+ public static final String APPLICATION_SMPTE336M =
+ "application/smpte336m";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SMPTE336M} media
+ * type defined by RFC 6597.
+ */
+ public static final MediaType APPLICATION_SMPTE336M_TYPE =
+ new MediaType("application", "smpte336m");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SOAP_XML} media
+ * type defined by RFC 3902.
+ */
+ public static final String APPLICATION_SOAP_XML =
+ "application/soap+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SOAP_XML} media
+ * type defined by RFC 3902.
+ */
+ public static final MediaType APPLICATION_SOAP_XML_TYPE =
+ new MediaType("application", "soap+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SPARQL_QUERY} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-rdf-sparql-query-20070614/#mediaType}.
+ */
+ public static final String APPLICATION_SPARQL_QUERY =
+ "application/sparql-query";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SPARQL_QUERY} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-rdf-sparql-query-20070614/#mediaType}.
+ */
+ public static final MediaType APPLICATION_SPARQL_QUERY_TYPE =
+ new MediaType("application", "sparql-query");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SPARQL_RESULTS_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-rdf-sparql-XMLres-20070925/#mime}.
+ */
+ public static final String APPLICATION_SPARQL_RESULTS_XML =
+ "application/sparql-results+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SPARQL_RESULTS_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/CR-rdf-sparql-XMLres-20070925/#mime}.
+ */
+ public static final MediaType APPLICATION_SPARQL_RESULTS_XML_TYPE =
+ new MediaType("application", "sparql-results+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SPIRITS_EVENT_XML} media
+ * type defined by RFC 3910.
+ */
+ public static final String APPLICATION_SPIRITS_EVENT_XML =
+ "application/spirits-event+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SPIRITS_EVENT_XML} media
+ * type defined by RFC 3910.
+ */
+ public static final MediaType APPLICATION_SPIRITS_EVENT_XML_TYPE =
+ new MediaType("application", "spirits-event+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SQL} media
+ * type defined by RFC 6922.
+ */
+ public static final String APPLICATION_SQL =
+ "application/sql";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SQL} media
+ * type defined by RFC 6922.
+ */
+ public static final MediaType APPLICATION_SQL_TYPE =
+ new MediaType("application", "sql");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SRGS} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_SRGS =
+ "application/srgs";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SRGS} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_SRGS_TYPE =
+ new MediaType("application", "srgs");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SRGS_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_SRGS_XML =
+ "application/srgs+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SRGS_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_SRGS_XML_TYPE =
+ new MediaType("application", "srgs+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SRU_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final String APPLICATION_SRU_XML =
+ "application/sru+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SRU_XML} media
+ * type defined by RFC 6207.
+ */
+ public static final MediaType APPLICATION_SRU_XML_TYPE =
+ new MediaType("application", "sru+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SSLKEYLOGFILE} media
+ * type defined by RFC-ietf-tls-keylogfile-05.
+ */
+ public static final String APPLICATION_SSLKEYLOGFILE =
+ "application/sslkeylogfile";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SSLKEYLOGFILE} media
+ * type defined by RFC-ietf-tls-keylogfile-05.
+ */
+ public static final MediaType APPLICATION_SSLKEYLOGFILE_TYPE =
+ new MediaType("application", "sslkeylogfile");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SSML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_SSML_XML =
+ "application/ssml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SSML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_SSML_XML_TYPE =
+ new MediaType("application", "ssml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SUIT_ENVELOPE_COSE} media
+ * type defined by RFC-ietf-suit-manifest-34.
+ */
+ public static final String APPLICATION_SUIT_ENVELOPE_COSE =
+ "application/suit-envelope+cose";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SUIT_ENVELOPE_COSE} media
+ * type defined by RFC-ietf-suit-manifest-34.
+ */
+ public static final MediaType APPLICATION_SUIT_ENVELOPE_COSE_TYPE =
+ new MediaType("application", "suit-envelope+cose");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_SWID_CBOR} media
+ * type defined by RFC 9393.
+ */
+ public static final String APPLICATION_SWID_CBOR =
+ "application/swid+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_SWID_CBOR} media
+ * type defined by RFC 9393.
+ */
+ public static final MediaType APPLICATION_SWID_CBOR_TYPE =
+ new MediaType("application", "swid+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_APEX_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_APEX_UPDATE =
+ "application/tamp-apex-update";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_APEX_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_APEX_UPDATE_TYPE =
+ new MediaType("application", "tamp-apex-update");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_APEX_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_APEX_UPDATE_CONFIRM =
+ "application/tamp-apex-update-confirm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_APEX_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_APEX_UPDATE_CONFIRM_TYPE =
+ new MediaType("application", "tamp-apex-update-confirm");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_COMMUNITY_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_COMMUNITY_UPDATE =
+ "application/tamp-community-update";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_COMMUNITY_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_COMMUNITY_UPDATE_TYPE =
+ new MediaType("application", "tamp-community-update");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM =
+ "application/tamp-community-update-confirm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_COMMUNITY_UPDATE_CONFIRM_TYPE =
+ new MediaType("application", "tamp-community-update-confirm");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_ERROR} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_ERROR =
+ "application/tamp-error";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_ERROR} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_ERROR_TYPE =
+ new MediaType("application", "tamp-error");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_SEQUENCE_ADJUST} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_SEQUENCE_ADJUST =
+ "application/tamp-sequence-adjust";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_SEQUENCE_ADJUST} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_SEQUENCE_ADJUST_TYPE =
+ new MediaType("application", "tamp-sequence-adjust");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM =
+ "application/tamp-sequence-adjust-confirm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_SEQUENCE_ADJUST_CONFIRM_TYPE =
+ new MediaType("application", "tamp-sequence-adjust-confirm");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_STATUS_QUERY} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_STATUS_QUERY =
+ "application/tamp-status-query";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_STATUS_QUERY} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_STATUS_QUERY_TYPE =
+ new MediaType("application", "tamp-status-query");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_STATUS_RESPONSE} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_STATUS_RESPONSE =
+ "application/tamp-status-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_STATUS_RESPONSE} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_STATUS_RESPONSE_TYPE =
+ new MediaType("application", "tamp-status-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_UPDATE =
+ "application/tamp-update";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_UPDATE} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_UPDATE_TYPE =
+ new MediaType("application", "tamp-update");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TAMP_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final String APPLICATION_TAMP_UPDATE_CONFIRM =
+ "application/tamp-update-confirm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TAMP_UPDATE_CONFIRM} media
+ * type defined by RFC 5934.
+ */
+ public static final MediaType APPLICATION_TAMP_UPDATE_CONFIRM_TYPE =
+ new MediaType("application", "tamp-update-confirm");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TEI_XML} media
+ * type defined by RFC 6129.
+ */
+ public static final String APPLICATION_TEI_XML =
+ "application/tei+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TEI_XML} media
+ * type defined by RFC 6129.
+ */
+ public static final MediaType APPLICATION_TEI_XML_TYPE =
+ new MediaType("application", "tei+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_THRAUD_XML} media
+ * type defined by RFC 5941.
+ */
+ public static final String APPLICATION_THRAUD_XML =
+ "application/thraud+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_THRAUD_XML} media
+ * type defined by RFC 5941.
+ */
+ public static final MediaType APPLICATION_THRAUD_XML_TYPE =
+ new MediaType("application", "thraud+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TIMESTAMP_QUERY} media
+ * type defined by RFC 3161.
+ */
+ public static final String APPLICATION_TIMESTAMP_QUERY =
+ "application/timestamp-query";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TIMESTAMP_QUERY} media
+ * type defined by RFC 3161.
+ */
+ public static final MediaType APPLICATION_TIMESTAMP_QUERY_TYPE =
+ new MediaType("application", "timestamp-query");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TIMESTAMP_REPLY} media
+ * type defined by RFC 3161.
+ */
+ public static final String APPLICATION_TIMESTAMP_REPLY =
+ "application/timestamp-reply";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TIMESTAMP_REPLY} media
+ * type defined by RFC 3161.
+ */
+ public static final MediaType APPLICATION_TIMESTAMP_REPLY_TYPE =
+ new MediaType("application", "timestamp-reply");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TIMESTAMPED_DATA} media
+ * type defined by RFC 5955.
+ */
+ public static final String APPLICATION_TIMESTAMPED_DATA =
+ "application/timestamped-data";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TIMESTAMPED_DATA} media
+ * type defined by RFC 5955.
+ */
+ public static final MediaType APPLICATION_TIMESTAMPED_DATA_TYPE =
+ new MediaType("application", "timestamped-data");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TLSRPT_GZIP} media
+ * type defined by RFC 8460.
+ */
+ public static final String APPLICATION_TLSRPT_GZIP =
+ "application/tlsrpt+gzip";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TLSRPT_GZIP} media
+ * type defined by RFC 8460.
+ */
+ public static final MediaType APPLICATION_TLSRPT_GZIP_TYPE =
+ new MediaType("application", "tlsrpt+gzip");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TLSRPT_JSON} media
+ * type defined by RFC 8460.
+ */
+ public static final String APPLICATION_TLSRPT_JSON =
+ "application/tlsrpt+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TLSRPT_JSON} media
+ * type defined by RFC 8460.
+ */
+ public static final MediaType APPLICATION_TLSRPT_JSON_TYPE =
+ new MediaType("application", "tlsrpt+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TNAUTHLIST} media
+ * type defined by RFC 8226.
+ */
+ public static final String APPLICATION_TNAUTHLIST =
+ "application/tnauthlist";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TNAUTHLIST} media
+ * type defined by RFC 8226.
+ */
+ public static final MediaType APPLICATION_TNAUTHLIST_TYPE =
+ new MediaType("application", "tnauthlist");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TOKEN_INTROSPECTION_JWT} media
+ * type defined by RFC 9701.
+ */
+ public static final String APPLICATION_TOKEN_INTROSPECTION_JWT =
+ "application/token-introspection+jwt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TOKEN_INTROSPECTION_JWT} media
+ * type defined by RFC 9701.
+ */
+ public static final MediaType APPLICATION_TOKEN_INTROSPECTION_JWT_TYPE =
+ new MediaType("application", "token-introspection+jwt");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TOML} media
+ * type defined by {@code https://github.com/toml-lang/toml/issues/870}.
+ */
+ public static final String APPLICATION_TOML =
+ "application/toml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TOML} media
+ * type defined by {@code https://github.com/toml-lang/toml/issues/870}.
+ */
+ public static final MediaType APPLICATION_TOML_TYPE =
+ new MediaType("application", "toml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TRICKLE_ICE_SDPFRAG} media
+ * type defined by RFC 8840.
+ */
+ public static final String APPLICATION_TRICKLE_ICE_SDPFRAG =
+ "application/trickle-ice-sdpfrag";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TRICKLE_ICE_SDPFRAG} media
+ * type defined by RFC 8840.
+ */
+ public static final MediaType APPLICATION_TRICKLE_ICE_SDPFRAG_TYPE =
+ new MediaType("application", "trickle-ice-sdpfrag");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TZIF} media
+ * type defined by RFC 9636.
+ */
+ public static final String APPLICATION_TZIF =
+ "application/tzif";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TZIF} media
+ * type defined by RFC 9636.
+ */
+ public static final MediaType APPLICATION_TZIF_TYPE =
+ new MediaType("application", "tzif");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_TZIF_LEAP} media
+ * type defined by RFC 9636.
+ */
+ public static final String APPLICATION_TZIF_LEAP =
+ "application/tzif-leap";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_TZIF_LEAP} media
+ * type defined by RFC 9636.
+ */
+ public static final MediaType APPLICATION_TZIF_LEAP_TYPE =
+ new MediaType("application", "tzif-leap");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_UCCS_CBOR} media
+ * type defined by RFC 9781.
+ */
+ public static final String APPLICATION_UCCS_CBOR =
+ "application/uccs+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_UCCS_CBOR} media
+ * type defined by RFC 9781.
+ */
+ public static final MediaType APPLICATION_UCCS_CBOR_TYPE =
+ new MediaType("application", "uccs+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_UJCS_JSON} media
+ * type defined by RFC 9781.
+ */
+ public static final String APPLICATION_UJCS_JSON =
+ "application/ujcs+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_UJCS_JSON} media
+ * type defined by RFC 9781.
+ */
+ public static final MediaType APPLICATION_UJCS_JSON_TYPE =
+ new MediaType("application", "ujcs+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final String APPLICATION_ULPFEC =
+ "application/ulpfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final MediaType APPLICATION_ULPFEC_TYPE =
+ new MediaType("application", "ulpfec");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VCARD_JSON} media
+ * type defined by RFC 7095.
+ */
+ public static final String APPLICATION_VCARD_JSON =
+ "application/vcard+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VCARD_JSON} media
+ * type defined by RFC 7095.
+ */
+ public static final MediaType APPLICATION_VCARD_JSON_TYPE =
+ new MediaType("application", "vcard+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VCARD_XML} media
+ * type defined by RFC 6351.
+ */
+ public static final String APPLICATION_VCARD_XML =
+ "application/vcard+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VCARD_XML} media
+ * type defined by RFC 6351.
+ */
+ public static final MediaType APPLICATION_VCARD_XML_TYPE =
+ new MediaType("application", "vcard+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VEMMI} media
+ * type defined by RFC 2122.
+ */
+ public static final String APPLICATION_VEMMI =
+ "application/vemmi";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VEMMI} media
+ * type defined by RFC 2122.
+ */
+ public static final MediaType APPLICATION_VEMMI_TYPE =
+ new MediaType("application", "vemmi");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_APPLE_MPEGURL} media
+ * type defined by RFC 8216.
+ */
+ public static final String APPLICATION_VND_APPLE_MPEGURL =
+ "application/vnd.apple.mpegurl";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_APPLE_MPEGURL} media
+ * type defined by RFC 8216.
+ */
+ public static final MediaType APPLICATION_VND_APPLE_MPEGURL_TYPE =
+ new MediaType("application", "vnd.apple.mpegurl");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_GEO_JSON} media
+ * type defined by .
+ */
+ public static final String APPLICATION_VND_GEO_JSON =
+ "application/vnd.geo+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_GEO_JSON} media
+ * type defined by .
+ */
+ public static final MediaType APPLICATION_VND_GEO_JSON_TYPE =
+ new MediaType("application", "vnd.geo+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_PWG_MULTIPLEXED} media
+ * type defined by RFC 3391.
+ */
+ public static final String APPLICATION_VND_PWG_MULTIPLEXED =
+ "application/vnd.pwg-multiplexed";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_PWG_MULTIPLEXED} media
+ * type defined by RFC 3391.
+ */
+ public static final MediaType APPLICATION_VND_PWG_MULTIPLEXED_TYPE =
+ new MediaType("application", "vnd.pwg-multiplexed");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MOML_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MOML_XML =
+ "application/vnd.radisys.moml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MOML_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MOML_XML_TYPE =
+ new MediaType("application", "vnd.radisys.moml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML =
+ "application/vnd.radisys.msml-audit-conf+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_AUDIT_CONF_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-audit-conf+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML =
+ "application/vnd.radisys.msml-audit-conn+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_AUDIT_CONN_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-audit-conn+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML =
+ "application/vnd.radisys.msml-audit-dialog+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_AUDIT_DIALOG_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-audit-dialog+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML =
+ "application/vnd.radisys.msml-audit-stream+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_AUDIT_STREAM_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-audit-stream+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_AUDIT_XML =
+ "application/vnd.radisys.msml-audit+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_AUDIT_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_AUDIT_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-audit+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_CONF_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_CONF_XML =
+ "application/vnd.radisys.msml-conf+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_CONF_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_CONF_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-conf+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML =
+ "application/vnd.radisys.msml-dialog-base+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_BASE_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-base+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML =
+ "application/vnd.radisys.msml-dialog-fax-detect+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_DETECT_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-fax-detect+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML =
+ "application/vnd.radisys.msml-dialog-fax-sendrecv+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_FAX_SENDRECV_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-fax-sendrecv+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML =
+ "application/vnd.radisys.msml-dialog-group+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_GROUP_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-group+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML =
+ "application/vnd.radisys.msml-dialog-speech+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_SPEECH_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-speech+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML =
+ "application/vnd.radisys.msml-dialog-transform+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_TRANSFORM_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog-transform+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_DIALOG_XML =
+ "application/vnd.radisys.msml-dialog+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_DIALOG_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_DIALOG_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml-dialog+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VND_RADISYS_MSML_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final String APPLICATION_VND_RADISYS_MSML_XML =
+ "application/vnd.radisys.msml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VND_RADISYS_MSML_XML} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType APPLICATION_VND_RADISYS_MSML_XML_TYPE =
+ new MediaType("application", "vnd.radisys.msml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VOICEXML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final String APPLICATION_VOICEXML_XML =
+ "application/voicexml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VOICEXML_XML} media
+ * type defined by RFC 4267.
+ */
+ public static final MediaType APPLICATION_VOICEXML_XML_TYPE =
+ new MediaType("application", "voicexml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VOUCHER_CMS_JSON} media
+ * type defined by RFC 8366.
+ */
+ public static final String APPLICATION_VOUCHER_CMS_JSON =
+ "application/voucher-cms+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VOUCHER_CMS_JSON} media
+ * type defined by RFC 8366.
+ */
+ public static final MediaType APPLICATION_VOUCHER_CMS_JSON_TYPE =
+ new MediaType("application", "voucher-cms+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VOUCHER_JWS_JSON} media
+ * type defined by RFC-ietf-anima-jws-voucher-16.
+ */
+ public static final String APPLICATION_VOUCHER_JWS_JSON =
+ "application/voucher-jws+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VOUCHER_JWS_JSON} media
+ * type defined by RFC-ietf-anima-jws-voucher-16.
+ */
+ public static final MediaType APPLICATION_VOUCHER_JWS_JSON_TYPE =
+ new MediaType("application", "voucher-jws+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_VQ_RTCPXR} media
+ * type defined by RFC 6035.
+ */
+ public static final String APPLICATION_VQ_RTCPXR =
+ "application/vq-rtcpxr";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_VQ_RTCPXR} media
+ * type defined by RFC 6035.
+ */
+ public static final MediaType APPLICATION_VQ_RTCPXR_TYPE =
+ new MediaType("application", "vq-rtcpxr");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_WATCHERINFO_XML} media
+ * type defined by RFC 3858.
+ */
+ public static final String APPLICATION_WATCHERINFO_XML =
+ "application/watcherinfo+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_WATCHERINFO_XML} media
+ * type defined by RFC 3858.
+ */
+ public static final MediaType APPLICATION_WATCHERINFO_XML_TYPE =
+ new MediaType("application", "watcherinfo+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_WEBPUSH_OPTIONS_JSON} media
+ * type defined by RFC 8292.
+ */
+ public static final String APPLICATION_WEBPUSH_OPTIONS_JSON =
+ "application/webpush-options+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_WEBPUSH_OPTIONS_JSON} media
+ * type defined by RFC 8292.
+ */
+ public static final MediaType APPLICATION_WEBPUSH_OPTIONS_JSON_TYPE =
+ new MediaType("application", "webpush-options+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_WHOISPP_QUERY} media
+ * type defined by RFC 2957.
+ */
+ public static final String APPLICATION_WHOISPP_QUERY =
+ "application/whoispp-query";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_WHOISPP_QUERY} media
+ * type defined by RFC 2957.
+ */
+ public static final MediaType APPLICATION_WHOISPP_QUERY_TYPE =
+ new MediaType("application", "whoispp-query");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_WHOISPP_RESPONSE} media
+ * type defined by RFC 2958.
+ */
+ public static final String APPLICATION_WHOISPP_RESPONSE =
+ "application/whoispp-response";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_WHOISPP_RESPONSE} media
+ * type defined by RFC 2958.
+ */
+ public static final MediaType APPLICATION_WHOISPP_RESPONSE_TYPE =
+ new MediaType("application", "whoispp-response");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_X_PKI_MESSAGE} media
+ * type defined by RFC 8894.
+ */
+ public static final String APPLICATION_X_PKI_MESSAGE =
+ "application/x-pki-message";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_X_PKI_MESSAGE} media
+ * type defined by RFC 8894.
+ */
+ public static final MediaType APPLICATION_X_PKI_MESSAGE_TYPE =
+ new MediaType("application", "x-pki-message");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_X_X509_CA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final String APPLICATION_X_X509_CA_CERT =
+ "application/x-x509-ca-cert";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_X_X509_CA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final MediaType APPLICATION_X_X509_CA_CERT_TYPE =
+ new MediaType("application", "x-x509-ca-cert");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_X_X509_CA_RA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final String APPLICATION_X_X509_CA_RA_CERT =
+ "application/x-x509-ca-ra-cert";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_X_X509_CA_RA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final MediaType APPLICATION_X_X509_CA_RA_CERT_TYPE =
+ new MediaType("application", "x-x509-ca-ra-cert");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_X_X509_NEXT_CA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final String APPLICATION_X_X509_NEXT_CA_CERT =
+ "application/x-x509-next-ca-cert";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_X_X509_NEXT_CA_CERT} media
+ * type defined by RFC 8894.
+ */
+ public static final MediaType APPLICATION_X_X509_NEXT_CA_CERT_TYPE =
+ new MediaType("application", "x-x509-next-ca-cert");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_X400_BP} media
+ * type defined by RFC 1494.
+ */
+ public static final String APPLICATION_X400_BP =
+ "application/x400-bp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_X400_BP} media
+ * type defined by RFC 1494.
+ */
+ public static final MediaType APPLICATION_X400_BP_TYPE =
+ new MediaType("application", "x400-bp");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XACML_XML} media
+ * type defined by RFC 7061.
+ */
+ public static final String APPLICATION_XACML_XML =
+ "application/xacml+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XACML_XML} media
+ * type defined by RFC 7061.
+ */
+ public static final MediaType APPLICATION_XACML_XML_TYPE =
+ new MediaType("application", "xacml+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_ATT_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final String APPLICATION_XCAP_ATT_XML =
+ "application/xcap-att+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_ATT_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final MediaType APPLICATION_XCAP_ATT_XML_TYPE =
+ new MediaType("application", "xcap-att+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_CAPS_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final String APPLICATION_XCAP_CAPS_XML =
+ "application/xcap-caps+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_CAPS_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final MediaType APPLICATION_XCAP_CAPS_XML_TYPE =
+ new MediaType("application", "xcap-caps+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_DIFF_XML} media
+ * type defined by RFC 5874.
+ */
+ public static final String APPLICATION_XCAP_DIFF_XML =
+ "application/xcap-diff+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_DIFF_XML} media
+ * type defined by RFC 5874.
+ */
+ public static final MediaType APPLICATION_XCAP_DIFF_XML_TYPE =
+ new MediaType("application", "xcap-diff+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_EL_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final String APPLICATION_XCAP_EL_XML =
+ "application/xcap-el+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_EL_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final MediaType APPLICATION_XCAP_EL_XML_TYPE =
+ new MediaType("application", "xcap-el+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_ERROR_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final String APPLICATION_XCAP_ERROR_XML =
+ "application/xcap-error+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_ERROR_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final MediaType APPLICATION_XCAP_ERROR_XML_TYPE =
+ new MediaType("application", "xcap-error+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCAP_NS_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final String APPLICATION_XCAP_NS_XML =
+ "application/xcap-ns+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCAP_NS_XML} media
+ * type defined by RFC 4825.
+ */
+ public static final MediaType APPLICATION_XCAP_NS_XML_TYPE =
+ new MediaType("application", "xcap-ns+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML} media
+ * type defined by RFC 6502.
+ */
+ public static final String APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML =
+ "application/xcon-conference-info-diff+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML} media
+ * type defined by RFC 6502.
+ */
+ public static final MediaType APPLICATION_XCON_CONFERENCE_INFO_DIFF_XML_TYPE =
+ new MediaType("application", "xcon-conference-info-diff+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XCON_CONFERENCE_INFO_XML} media
+ * type defined by RFC 6502.
+ */
+ public static final String APPLICATION_XCON_CONFERENCE_INFO_XML =
+ "application/xcon-conference-info+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XCON_CONFERENCE_INFO_XML} media
+ * type defined by RFC 6502.
+ */
+ public static final MediaType APPLICATION_XCON_CONFERENCE_INFO_XML_TYPE =
+ new MediaType("application", "xcon-conference-info+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XML} media
+ * type defined by RFC 7303.
+ */
+ public static final String APPLICATION_XML =
+ "application/xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XML} media
+ * type defined by RFC 7303.
+ */
+ public static final MediaType APPLICATION_XML_TYPE =
+ new MediaType("application", "xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XML_DTD} media
+ * type defined by RFC 7303.
+ */
+ public static final String APPLICATION_XML_DTD =
+ "application/xml-dtd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XML_DTD} media
+ * type defined by RFC 7303.
+ */
+ public static final MediaType APPLICATION_XML_DTD_TYPE =
+ new MediaType("application", "xml-dtd");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XML_EXTERNAL_PARSED_ENTITY} media
+ * type defined by RFC 7303.
+ */
+ public static final String APPLICATION_XML_EXTERNAL_PARSED_ENTITY =
+ "application/xml-external-parsed-entity";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XML_EXTERNAL_PARSED_ENTITY} media
+ * type defined by RFC 7303.
+ */
+ public static final MediaType APPLICATION_XML_EXTERNAL_PARSED_ENTITY_TYPE =
+ new MediaType("application", "xml-external-parsed-entity");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XML_PATCH_XML} media
+ * type defined by RFC 7351.
+ */
+ public static final String APPLICATION_XML_PATCH_XML =
+ "application/xml-patch+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XML_PATCH_XML} media
+ * type defined by RFC 7351.
+ */
+ public static final MediaType APPLICATION_XML_PATCH_XML_TYPE =
+ new MediaType("application", "xml-patch+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XMPP_XML} media
+ * type defined by RFC 3923.
+ */
+ public static final String APPLICATION_XMPP_XML =
+ "application/xmpp+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XMPP_XML} media
+ * type defined by RFC 3923.
+ */
+ public static final MediaType APPLICATION_XMPP_XML_TYPE =
+ new MediaType("application", "xmpp+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XSLT_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/REC-xslt20-20070123/#media-type-registration}.
+ */
+ public static final String APPLICATION_XSLT_XML =
+ "application/xslt+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XSLT_XML} media
+ * type defined by {@code http://www.w3.org/TR/2007/REC-xslt20-20070123/#media-type-registration}.
+ */
+ public static final MediaType APPLICATION_XSLT_XML_TYPE =
+ new MediaType("application", "xslt+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_XV_XML} media
+ * type defined by RFC 4374.
+ */
+ public static final String APPLICATION_XV_XML =
+ "application/xv+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_XV_XML} media
+ * type defined by RFC 4374.
+ */
+ public static final MediaType APPLICATION_XV_XML_TYPE =
+ new MediaType("application", "xv+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YAML} media
+ * type defined by RFC 9512.
+ */
+ public static final String APPLICATION_YAML =
+ "application/yaml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YAML} media
+ * type defined by RFC 9512.
+ */
+ public static final MediaType APPLICATION_YAML_TYPE =
+ new MediaType("application", "yaml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG} media
+ * type defined by RFC 6020.
+ */
+ public static final String APPLICATION_YANG =
+ "application/yang";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG} media
+ * type defined by RFC 6020.
+ */
+ public static final MediaType APPLICATION_YANG_TYPE =
+ new MediaType("application", "yang");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_DATA_CBOR} media
+ * type defined by RFC 9254.
+ */
+ public static final String APPLICATION_YANG_DATA_CBOR =
+ "application/yang-data+cbor";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_DATA_CBOR} media
+ * type defined by RFC 9254.
+ */
+ public static final MediaType APPLICATION_YANG_DATA_CBOR_TYPE =
+ new MediaType("application", "yang-data+cbor");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_DATA_JSON} media
+ * type defined by RFC 8040.
+ */
+ public static final String APPLICATION_YANG_DATA_JSON =
+ "application/yang-data+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_DATA_JSON} media
+ * type defined by RFC 8040.
+ */
+ public static final MediaType APPLICATION_YANG_DATA_JSON_TYPE =
+ new MediaType("application", "yang-data+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_DATA_XML} media
+ * type defined by RFC 8040.
+ */
+ public static final String APPLICATION_YANG_DATA_XML =
+ "application/yang-data+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_DATA_XML} media
+ * type defined by RFC 8040.
+ */
+ public static final MediaType APPLICATION_YANG_DATA_XML_TYPE =
+ new MediaType("application", "yang-data+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_PATCH_JSON} media
+ * type defined by RFC 8072.
+ */
+ public static final String APPLICATION_YANG_PATCH_JSON =
+ "application/yang-patch+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_PATCH_JSON} media
+ * type defined by RFC 8072.
+ */
+ public static final MediaType APPLICATION_YANG_PATCH_JSON_TYPE =
+ new MediaType("application", "yang-patch+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_PATCH_XML} media
+ * type defined by RFC 8072.
+ */
+ public static final String APPLICATION_YANG_PATCH_XML =
+ "application/yang-patch+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_PATCH_XML} media
+ * type defined by RFC 8072.
+ */
+ public static final MediaType APPLICATION_YANG_PATCH_XML_TYPE =
+ new MediaType("application", "yang-patch+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YANG_SID_JSON} media
+ * type defined by RFC 9595.
+ */
+ public static final String APPLICATION_YANG_SID_JSON =
+ "application/yang-sid+json";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YANG_SID_JSON} media
+ * type defined by RFC 9595.
+ */
+ public static final MediaType APPLICATION_YANG_SID_JSON_TYPE =
+ new MediaType("application", "yang-sid+json");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_YIN_XML} media
+ * type defined by RFC 6020.
+ */
+ public static final String APPLICATION_YIN_XML =
+ "application/yin+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_YIN_XML} media
+ * type defined by RFC 6020.
+ */
+ public static final MediaType APPLICATION_YIN_XML_TYPE =
+ new MediaType("application", "yin+xml");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ZLIB} media
+ * type defined by RFC 6713.
+ */
+ public static final String APPLICATION_ZLIB =
+ "application/zlib";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ZLIB} media
+ * type defined by RFC 6713.
+ */
+ public static final MediaType APPLICATION_ZLIB_TYPE =
+ new MediaType("application", "zlib");
+
+ /**
+ * A {@code String} constant representing {@value #APPLICATION_ZSTD} media
+ * type defined by RFC 8878.
+ */
+ public static final String APPLICATION_ZSTD =
+ "application/zstd";
+
+ /**
+ * A {@link MediaType} constant representing {@value #APPLICATION_ZSTD} media
+ * type defined by RFC 8878.
+ */
+ public static final MediaType APPLICATION_ZSTD_TYPE =
+ new MediaType("application", "zstd");
+ }
+
+ /**
+ * Audio type media subtypes.
+ */
+ public static class Audio {
+ /**
+ * A {@code String} constant representing {@value #AUDIO_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final String AUDIO_1D_INTERLEAVED_PARITYFEC =
+ "audio/1d-interleaved-parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final MediaType AUDIO_1D_INTERLEAVED_PARITYFEC_TYPE =
+ new MediaType("audio", "1d-interleaved-parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_32KADPCM} media
+ * type defined by RFC 3802, and RFC 2421.
+ */
+ public static final String AUDIO_32KADPCM =
+ "audio/32kadpcm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_32KADPCM} media
+ * type defined by RFC 3802, and RFC 2421.
+ */
+ public static final MediaType AUDIO_32KADPCM_TYPE =
+ new MediaType("audio", "32kadpcm");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_3GPP} media
+ * type defined by RFC 3839, and RFC 6381.
+ */
+ public static final String AUDIO_3GPP =
+ "audio/3gpp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_3GPP} media
+ * type defined by RFC 3839, and RFC 6381.
+ */
+ public static final MediaType AUDIO_3GPP_TYPE =
+ new MediaType("audio", "3gpp");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_3GPP2} media
+ * type defined by RFC 4393, and RFC 6381.
+ */
+ public static final String AUDIO_3GPP2 =
+ "audio/3gpp2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_3GPP2} media
+ * type defined by RFC 4393, and RFC 6381.
+ */
+ public static final MediaType AUDIO_3GPP2_TYPE =
+ new MediaType("audio", "3gpp2");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_AC3} media
+ * type defined by RFC 4184.
+ */
+ public static final String AUDIO_AC3 =
+ "audio/ac3";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_AC3} media
+ * type defined by RFC 4184.
+ */
+ public static final MediaType AUDIO_AC3_TYPE =
+ new MediaType("audio", "ac3");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_AMR} media
+ * type defined by RFC 4867.
+ */
+ public static final String AUDIO_AMR =
+ "audio/AMR";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_AMR} media
+ * type defined by RFC 4867.
+ */
+ public static final MediaType AUDIO_AMR_TYPE =
+ new MediaType("audio", "AMR");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_AMR_WB} media
+ * type defined by RFC 4867.
+ */
+ public static final String AUDIO_AMR_WB =
+ "audio/AMR-WB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_AMR_WB} media
+ * type defined by RFC 4867.
+ */
+ public static final MediaType AUDIO_AMR_WB_TYPE =
+ new MediaType("audio", "AMR-WB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_AMR_WB_} media
+ * type defined by RFC 4352.
+ */
+ public static final String AUDIO_AMR_WB_ =
+ "audio/amr-wb+";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_AMR_WB_} media
+ * type defined by RFC 4352.
+ */
+ public static final MediaType AUDIO_AMR_WB__TYPE =
+ new MediaType("audio", "amr-wb+");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_APTX} media
+ * type defined by RFC 7310.
+ */
+ public static final String AUDIO_APTX =
+ "audio/aptx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_APTX} media
+ * type defined by RFC 7310.
+ */
+ public static final MediaType AUDIO_APTX_TYPE =
+ new MediaType("audio", "aptx");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ASC} media
+ * type defined by RFC 6295.
+ */
+ public static final String AUDIO_ASC =
+ "audio/asc";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ASC} media
+ * type defined by RFC 6295.
+ */
+ public static final MediaType AUDIO_ASC_TYPE =
+ new MediaType("audio", "asc");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ATRAC_ADVANCED_LOSSLESS} media
+ * type defined by RFC 5584.
+ */
+ public static final String AUDIO_ATRAC_ADVANCED_LOSSLESS =
+ "audio/ATRAC-ADVANCED-LOSSLESS";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ATRAC_ADVANCED_LOSSLESS} media
+ * type defined by RFC 5584.
+ */
+ public static final MediaType AUDIO_ATRAC_ADVANCED_LOSSLESS_TYPE =
+ new MediaType("audio", "ATRAC-ADVANCED-LOSSLESS");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ATRAC_X} media
+ * type defined by RFC 5584.
+ */
+ public static final String AUDIO_ATRAC_X =
+ "audio/ATRAC-X";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ATRAC_X} media
+ * type defined by RFC 5584.
+ */
+ public static final MediaType AUDIO_ATRAC_X_TYPE =
+ new MediaType("audio", "ATRAC-X");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ATRAC3} media
+ * type defined by RFC 5584.
+ */
+ public static final String AUDIO_ATRAC3 =
+ "audio/ATRAC3";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ATRAC3} media
+ * type defined by RFC 5584.
+ */
+ public static final MediaType AUDIO_ATRAC3_TYPE =
+ new MediaType("audio", "ATRAC3");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_BASIC} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String AUDIO_BASIC =
+ "audio/basic";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_BASIC} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType AUDIO_BASIC_TYPE =
+ new MediaType("audio", "basic");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_BV16} media
+ * type defined by RFC 4298.
+ */
+ public static final String AUDIO_BV16 =
+ "audio/BV16";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_BV16} media
+ * type defined by RFC 4298.
+ */
+ public static final MediaType AUDIO_BV16_TYPE =
+ new MediaType("audio", "BV16");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_BV32} media
+ * type defined by RFC 4298.
+ */
+ public static final String AUDIO_BV32 =
+ "audio/BV32";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_BV32} media
+ * type defined by RFC 4298.
+ */
+ public static final MediaType AUDIO_BV32_TYPE =
+ new MediaType("audio", "BV32");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_CLEARMODE} media
+ * type defined by RFC 4040.
+ */
+ public static final String AUDIO_CLEARMODE =
+ "audio/clearmode";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_CLEARMODE} media
+ * type defined by RFC 4040.
+ */
+ public static final MediaType AUDIO_CLEARMODE_TYPE =
+ new MediaType("audio", "clearmode");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_CN} media
+ * type defined by RFC 3389.
+ */
+ public static final String AUDIO_CN =
+ "audio/CN";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_CN} media
+ * type defined by RFC 3389.
+ */
+ public static final MediaType AUDIO_CN_TYPE =
+ new MediaType("audio", "CN");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DAT12} media
+ * type defined by RFC 3190.
+ */
+ public static final String AUDIO_DAT12 =
+ "audio/DAT12";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DAT12} media
+ * type defined by RFC 3190.
+ */
+ public static final MediaType AUDIO_DAT12_TYPE =
+ new MediaType("audio", "DAT12");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DLS} media
+ * type defined by RFC 4613.
+ */
+ public static final String AUDIO_DLS =
+ "audio/dls";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DLS} media
+ * type defined by RFC 4613.
+ */
+ public static final MediaType AUDIO_DLS_TYPE =
+ new MediaType("audio", "dls");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DSR_ES201108} media
+ * type defined by RFC 3557.
+ */
+ public static final String AUDIO_DSR_ES201108 =
+ "audio/dsr-es201108";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DSR_ES201108} media
+ * type defined by RFC 3557.
+ */
+ public static final MediaType AUDIO_DSR_ES201108_TYPE =
+ new MediaType("audio", "dsr-es201108");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DSR_ES202050} media
+ * type defined by RFC 4060.
+ */
+ public static final String AUDIO_DSR_ES202050 =
+ "audio/dsr-es202050";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DSR_ES202050} media
+ * type defined by RFC 4060.
+ */
+ public static final MediaType AUDIO_DSR_ES202050_TYPE =
+ new MediaType("audio", "dsr-es202050");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DSR_ES202211} media
+ * type defined by RFC 4060.
+ */
+ public static final String AUDIO_DSR_ES202211 =
+ "audio/dsr-es202211";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DSR_ES202211} media
+ * type defined by RFC 4060.
+ */
+ public static final MediaType AUDIO_DSR_ES202211_TYPE =
+ new MediaType("audio", "dsr-es202211");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DSR_ES202212} media
+ * type defined by RFC 4060.
+ */
+ public static final String AUDIO_DSR_ES202212 =
+ "audio/dsr-es202212";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DSR_ES202212} media
+ * type defined by RFC 4060.
+ */
+ public static final MediaType AUDIO_DSR_ES202212_TYPE =
+ new MediaType("audio", "dsr-es202212");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DV} media
+ * type defined by RFC 6469.
+ */
+ public static final String AUDIO_DV =
+ "audio/DV";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DV} media
+ * type defined by RFC 6469.
+ */
+ public static final MediaType AUDIO_DV_TYPE =
+ new MediaType("audio", "DV");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_DVI4} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_DVI4 =
+ "audio/DVI4";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_DVI4} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_DVI4_TYPE =
+ new MediaType("audio", "DVI4");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EAC3} media
+ * type defined by RFC 4598.
+ */
+ public static final String AUDIO_EAC3 =
+ "audio/eac3";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EAC3} media
+ * type defined by RFC 4598.
+ */
+ public static final MediaType AUDIO_EAC3_TYPE =
+ new MediaType("audio", "eac3");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final String AUDIO_ENCAPRTP =
+ "audio/encaprtp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType AUDIO_ENCAPRTP_TYPE =
+ new MediaType("audio", "encaprtp");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRC} media
+ * type defined by RFC 4788.
+ */
+ public static final String AUDIO_EVRC =
+ "audio/EVRC";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRC} media
+ * type defined by RFC 4788.
+ */
+ public static final MediaType AUDIO_EVRC_TYPE =
+ new MediaType("audio", "EVRC");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRC_QCP} media
+ * type defined by RFC 3625.
+ */
+ public static final String AUDIO_EVRC_QCP =
+ "audio/EVRC-QCP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRC_QCP} media
+ * type defined by RFC 3625.
+ */
+ public static final MediaType AUDIO_EVRC_QCP_TYPE =
+ new MediaType("audio", "EVRC-QCP");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRC0} media
+ * type defined by RFC 4788.
+ */
+ public static final String AUDIO_EVRC0 =
+ "audio/EVRC0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRC0} media
+ * type defined by RFC 4788.
+ */
+ public static final MediaType AUDIO_EVRC0_TYPE =
+ new MediaType("audio", "EVRC0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRC1} media
+ * type defined by RFC 4788.
+ */
+ public static final String AUDIO_EVRC1 =
+ "audio/EVRC1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRC1} media
+ * type defined by RFC 4788.
+ */
+ public static final MediaType AUDIO_EVRC1_TYPE =
+ new MediaType("audio", "EVRC1");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCB} media
+ * type defined by RFC 5188.
+ */
+ public static final String AUDIO_EVRCB =
+ "audio/EVRCB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCB} media
+ * type defined by RFC 5188.
+ */
+ public static final MediaType AUDIO_EVRCB_TYPE =
+ new MediaType("audio", "EVRCB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCB0} media
+ * type defined by RFC 5188.
+ */
+ public static final String AUDIO_EVRCB0 =
+ "audio/EVRCB0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCB0} media
+ * type defined by RFC 5188.
+ */
+ public static final MediaType AUDIO_EVRCB0_TYPE =
+ new MediaType("audio", "EVRCB0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCB1} media
+ * type defined by RFC 4788.
+ */
+ public static final String AUDIO_EVRCB1 =
+ "audio/EVRCB1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCB1} media
+ * type defined by RFC 4788.
+ */
+ public static final MediaType AUDIO_EVRCB1_TYPE =
+ new MediaType("audio", "EVRCB1");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCNW} media
+ * type defined by RFC 6884.
+ */
+ public static final String AUDIO_EVRCNW =
+ "audio/EVRCNW";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCNW} media
+ * type defined by RFC 6884.
+ */
+ public static final MediaType AUDIO_EVRCNW_TYPE =
+ new MediaType("audio", "EVRCNW");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCNW0} media
+ * type defined by RFC 6884.
+ */
+ public static final String AUDIO_EVRCNW0 =
+ "audio/EVRCNW0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCNW0} media
+ * type defined by RFC 6884.
+ */
+ public static final MediaType AUDIO_EVRCNW0_TYPE =
+ new MediaType("audio", "EVRCNW0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCNW1} media
+ * type defined by RFC 6884.
+ */
+ public static final String AUDIO_EVRCNW1 =
+ "audio/EVRCNW1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCNW1} media
+ * type defined by RFC 6884.
+ */
+ public static final MediaType AUDIO_EVRCNW1_TYPE =
+ new MediaType("audio", "EVRCNW1");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCWB} media
+ * type defined by RFC 5188.
+ */
+ public static final String AUDIO_EVRCWB =
+ "audio/EVRCWB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCWB} media
+ * type defined by RFC 5188.
+ */
+ public static final MediaType AUDIO_EVRCWB_TYPE =
+ new MediaType("audio", "EVRCWB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCWB0} media
+ * type defined by RFC 5188.
+ */
+ public static final String AUDIO_EVRCWB0 =
+ "audio/EVRCWB0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCWB0} media
+ * type defined by RFC 5188.
+ */
+ public static final MediaType AUDIO_EVRCWB0_TYPE =
+ new MediaType("audio", "EVRCWB0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EVRCWB1} media
+ * type defined by RFC 5188.
+ */
+ public static final String AUDIO_EVRCWB1 =
+ "audio/EVRCWB1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EVRCWB1} media
+ * type defined by RFC 5188.
+ */
+ public static final MediaType AUDIO_EVRCWB1_TYPE =
+ new MediaType("audio", "EVRCWB1");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String AUDIO_EXAMPLE =
+ "audio/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType AUDIO_EXAMPLE_TYPE =
+ new MediaType("audio", "example");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_FLAC} media
+ * type defined by RFC 9639.
+ */
+ public static final String AUDIO_FLAC =
+ "audio/flac";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_FLAC} media
+ * type defined by RFC 9639.
+ */
+ public static final MediaType AUDIO_FLAC_TYPE =
+ new MediaType("audio", "flac");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final String AUDIO_FLEXFEC =
+ "audio/flexfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final MediaType AUDIO_FLEXFEC_TYPE =
+ new MediaType("audio", "flexfec");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_FWDRED} media
+ * type defined by RFC 6354.
+ */
+ public static final String AUDIO_FWDRED =
+ "audio/fwdred";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_FWDRED} media
+ * type defined by RFC 6354.
+ */
+ public static final MediaType AUDIO_FWDRED_TYPE =
+ new MediaType("audio", "fwdred");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G711_0} media
+ * type defined by RFC 7655.
+ */
+ public static final String AUDIO_G711_0 =
+ "audio/G711-0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G711_0} media
+ * type defined by RFC 7655.
+ */
+ public static final MediaType AUDIO_G711_0_TYPE =
+ new MediaType("audio", "G711-0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G719} media
+ * type defined by RFC 5404, and RFC Errata 3245.
+ */
+ public static final String AUDIO_G719 =
+ "audio/G719";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G719} media
+ * type defined by RFC 5404, and RFC Errata 3245.
+ */
+ public static final MediaType AUDIO_G719_TYPE =
+ new MediaType("audio", "G719");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G7221} media
+ * type defined by RFC 5577.
+ */
+ public static final String AUDIO_G7221 =
+ "audio/G7221";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G7221} media
+ * type defined by RFC 5577.
+ */
+ public static final MediaType AUDIO_G7221_TYPE =
+ new MediaType("audio", "G7221");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G722} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G722 =
+ "audio/G722";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G722} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G722_TYPE =
+ new MediaType("audio", "G722");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G723} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G723 =
+ "audio/G723";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G723} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G723_TYPE =
+ new MediaType("audio", "G723");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G726_16} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G726_16 =
+ "audio/G726-16";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G726_16} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G726_16_TYPE =
+ new MediaType("audio", "G726-16");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G726_24} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G726_24 =
+ "audio/G726-24";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G726_24} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G726_24_TYPE =
+ new MediaType("audio", "G726-24");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G726_32} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G726_32 =
+ "audio/G726-32";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G726_32} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G726_32_TYPE =
+ new MediaType("audio", "G726-32");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G726_40} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G726_40 =
+ "audio/G726-40";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G726_40} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G726_40_TYPE =
+ new MediaType("audio", "G726-40");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G728} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G728 =
+ "audio/G728";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G728} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G728_TYPE =
+ new MediaType("audio", "G728");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G729} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G729 =
+ "audio/G729";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G729} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G729_TYPE =
+ new MediaType("audio", "G729");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G7291} media
+ * type defined by RFC 4749, and RFC 5459.
+ */
+ public static final String AUDIO_G7291 =
+ "audio/G7291";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G7291} media
+ * type defined by RFC 4749, and RFC 5459.
+ */
+ public static final MediaType AUDIO_G7291_TYPE =
+ new MediaType("audio", "G7291");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G729D} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G729D =
+ "audio/G729D";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G729D} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G729D_TYPE =
+ new MediaType("audio", "G729D");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_G729E} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_G729E =
+ "audio/G729E";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_G729E} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_G729E_TYPE =
+ new MediaType("audio", "G729E");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_GSM} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_GSM =
+ "audio/GSM";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_GSM} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_GSM_TYPE =
+ new MediaType("audio", "GSM");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_GSM_EFR} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_GSM_EFR =
+ "audio/GSM-EFR";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_GSM_EFR} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_GSM_EFR_TYPE =
+ new MediaType("audio", "GSM-EFR");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_GSM_HR_08} media
+ * type defined by RFC 5993.
+ */
+ public static final String AUDIO_GSM_HR_08 =
+ "audio/GSM-HR-08";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_GSM_HR_08} media
+ * type defined by RFC 5993.
+ */
+ public static final MediaType AUDIO_GSM_HR_08_TYPE =
+ new MediaType("audio", "GSM-HR-08");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ILBC} media
+ * type defined by RFC 3952.
+ */
+ public static final String AUDIO_ILBC =
+ "audio/iLBC";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ILBC} media
+ * type defined by RFC 3952.
+ */
+ public static final MediaType AUDIO_ILBC_TYPE =
+ new MediaType("audio", "iLBC");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_IP_MR_V2_5} media
+ * type defined by RFC 6262.
+ */
+ public static final String AUDIO_IP_MR_V2_5 =
+ "audio/ip-mr_v2.5";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_IP_MR_V2_5} media
+ * type defined by RFC 6262.
+ */
+ public static final MediaType AUDIO_IP_MR_V2_5_TYPE =
+ new MediaType("audio", "ip-mr_v2.5");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_L8} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_L8 =
+ "audio/L8";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_L8} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_L8_TYPE =
+ new MediaType("audio", "L8");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_L16} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_L16 =
+ "audio/L16";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_L16} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_L16_TYPE =
+ new MediaType("audio", "L16");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_L20} media
+ * type defined by RFC 3190.
+ */
+ public static final String AUDIO_L20 =
+ "audio/L20";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_L20} media
+ * type defined by RFC 3190.
+ */
+ public static final MediaType AUDIO_L20_TYPE =
+ new MediaType("audio", "L20");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_L24} media
+ * type defined by RFC 3190.
+ */
+ public static final String AUDIO_L24 =
+ "audio/L24";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_L24} media
+ * type defined by RFC 3190.
+ */
+ public static final MediaType AUDIO_L24_TYPE =
+ new MediaType("audio", "L24");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_LPC} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_LPC =
+ "audio/LPC";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_LPC} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_LPC_TYPE =
+ new MediaType("audio", "LPC");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MATROSKA} media
+ * type defined by RFC 9559.
+ */
+ public static final String AUDIO_MATROSKA =
+ "audio/matroska";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MATROSKA} media
+ * type defined by RFC 9559.
+ */
+ public static final MediaType AUDIO_MATROSKA_TYPE =
+ new MediaType("audio", "matroska");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MELP} media
+ * type defined by RFC 8130.
+ */
+ public static final String AUDIO_MELP =
+ "audio/MELP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MELP} media
+ * type defined by RFC 8130.
+ */
+ public static final MediaType AUDIO_MELP_TYPE =
+ new MediaType("audio", "MELP");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MELP600} media
+ * type defined by RFC 8130.
+ */
+ public static final String AUDIO_MELP600 =
+ "audio/MELP600";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MELP600} media
+ * type defined by RFC 8130.
+ */
+ public static final MediaType AUDIO_MELP600_TYPE =
+ new MediaType("audio", "MELP600");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MELP1200} media
+ * type defined by RFC 8130.
+ */
+ public static final String AUDIO_MELP1200 =
+ "audio/MELP1200";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MELP1200} media
+ * type defined by RFC 8130.
+ */
+ public static final MediaType AUDIO_MELP1200_TYPE =
+ new MediaType("audio", "MELP1200");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MELP2400} media
+ * type defined by RFC 8130.
+ */
+ public static final String AUDIO_MELP2400 =
+ "audio/MELP2400";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MELP2400} media
+ * type defined by RFC 8130.
+ */
+ public static final MediaType AUDIO_MELP2400_TYPE =
+ new MediaType("audio", "MELP2400");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MOBILE_XMF} media
+ * type defined by RFC 4723.
+ */
+ public static final String AUDIO_MOBILE_XMF =
+ "audio/mobile-xmf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MOBILE_XMF} media
+ * type defined by RFC 4723.
+ */
+ public static final MediaType AUDIO_MOBILE_XMF_TYPE =
+ new MediaType("audio", "mobile-xmf");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MPA} media
+ * type defined by RFC 3555.
+ */
+ public static final String AUDIO_MPA =
+ "audio/MPA";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MPA} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType AUDIO_MPA_TYPE =
+ new MediaType("audio", "MPA");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final String AUDIO_MP4 =
+ "audio/mp4";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final MediaType AUDIO_MP4_TYPE =
+ new MediaType("audio", "mp4");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MP4A_LATM} media
+ * type defined by RFC 6416.
+ */
+ public static final String AUDIO_MP4A_LATM =
+ "audio/MP4A-LATM";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MP4A_LATM} media
+ * type defined by RFC 6416.
+ */
+ public static final MediaType AUDIO_MP4A_LATM_TYPE =
+ new MediaType("audio", "MP4A-LATM");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MPA_ROBUST} media
+ * type defined by RFC 5219.
+ */
+ public static final String AUDIO_MPA_ROBUST =
+ "audio/mpa-robust";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MPA_ROBUST} media
+ * type defined by RFC 5219.
+ */
+ public static final MediaType AUDIO_MPA_ROBUST_TYPE =
+ new MediaType("audio", "mpa-robust");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MPEG} media
+ * type defined by RFC 3003.
+ */
+ public static final String AUDIO_MPEG =
+ "audio/mpeg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MPEG} media
+ * type defined by RFC 3003.
+ */
+ public static final MediaType AUDIO_MPEG_TYPE =
+ new MediaType("audio", "mpeg");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_MPEG4_GENERIC} media
+ * type defined by RFC 3640, and RFC 5691, and RFC 6295.
+ */
+ public static final String AUDIO_MPEG4_GENERIC =
+ "audio/mpeg4-generic";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_MPEG4_GENERIC} media
+ * type defined by RFC 3640, and RFC 5691, and RFC 6295.
+ */
+ public static final MediaType AUDIO_MPEG4_GENERIC_TYPE =
+ new MediaType("audio", "mpeg4-generic");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final String AUDIO_OGG =
+ "audio/ogg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final MediaType AUDIO_OGG_TYPE =
+ new MediaType("audio", "ogg");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_OPUS} media
+ * type defined by RFC 7587.
+ */
+ public static final String AUDIO_OPUS =
+ "audio/opus";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_OPUS} media
+ * type defined by RFC 7587.
+ */
+ public static final MediaType AUDIO_OPUS_TYPE =
+ new MediaType("audio", "opus");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final String AUDIO_PARITYFEC =
+ "audio/parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final MediaType AUDIO_PARITYFEC_TYPE =
+ new MediaType("audio", "parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_PCMA} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_PCMA =
+ "audio/PCMA";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_PCMA} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_PCMA_TYPE =
+ new MediaType("audio", "PCMA");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_PCMA_WB} media
+ * type defined by RFC 5391.
+ */
+ public static final String AUDIO_PCMA_WB =
+ "audio/PCMA-WB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_PCMA_WB} media
+ * type defined by RFC 5391.
+ */
+ public static final MediaType AUDIO_PCMA_WB_TYPE =
+ new MediaType("audio", "PCMA-WB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_PCMU} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_PCMU =
+ "audio/PCMU";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_PCMU} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_PCMU_TYPE =
+ new MediaType("audio", "PCMU");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_PCMU_WB} media
+ * type defined by RFC 5391.
+ */
+ public static final String AUDIO_PCMU_WB =
+ "audio/PCMU-WB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_PCMU_WB} media
+ * type defined by RFC 5391.
+ */
+ public static final MediaType AUDIO_PCMU_WB_TYPE =
+ new MediaType("audio", "PCMU-WB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_QCELP} media
+ * type defined by RFC 3555, and RFC 3625.
+ */
+ public static final String AUDIO_QCELP =
+ "audio/QCELP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_QCELP} media
+ * type defined by RFC 3555, and RFC 3625.
+ */
+ public static final MediaType AUDIO_QCELP_TYPE =
+ new MediaType("audio", "QCELP");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final String AUDIO_RAPTORFEC =
+ "audio/raptorfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final MediaType AUDIO_RAPTORFEC_TYPE =
+ new MediaType("audio", "raptorfec");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_RED} media
+ * type defined by RFC 3555.
+ */
+ public static final String AUDIO_RED =
+ "audio/RED";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_RED} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType AUDIO_RED_TYPE =
+ new MediaType("audio", "RED");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final String AUDIO_RTPLOOPBACK =
+ "audio/rtploopback";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType AUDIO_RTPLOOPBACK_TYPE =
+ new MediaType("audio", "rtploopback");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_RTP_MIDI} media
+ * type defined by RFC 6295.
+ */
+ public static final String AUDIO_RTP_MIDI =
+ "audio/rtp-midi";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_RTP_MIDI} media
+ * type defined by RFC 6295.
+ */
+ public static final MediaType AUDIO_RTP_MIDI_TYPE =
+ new MediaType("audio", "rtp-midi");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final String AUDIO_RTX =
+ "audio/rtx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final MediaType AUDIO_RTX_TYPE =
+ new MediaType("audio", "rtx");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_SCIP} media
+ * type defined by RFC 9607.
+ */
+ public static final String AUDIO_SCIP =
+ "audio/scip";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_SCIP} media
+ * type defined by RFC 9607.
+ */
+ public static final MediaType AUDIO_SCIP_TYPE =
+ new MediaType("audio", "scip");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_SMV} media
+ * type defined by RFC 3558.
+ */
+ public static final String AUDIO_SMV =
+ "audio/SMV";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_SMV} media
+ * type defined by RFC 3558.
+ */
+ public static final MediaType AUDIO_SMV_TYPE =
+ new MediaType("audio", "SMV");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_SMV0} media
+ * type defined by RFC 3558.
+ */
+ public static final String AUDIO_SMV0 =
+ "audio/SMV0";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_SMV0} media
+ * type defined by RFC 3558.
+ */
+ public static final MediaType AUDIO_SMV0_TYPE =
+ new MediaType("audio", "SMV0");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_SMV_QCP} media
+ * type defined by RFC 3625.
+ */
+ public static final String AUDIO_SMV_QCP =
+ "audio/SMV-QCP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_SMV_QCP} media
+ * type defined by RFC 3625.
+ */
+ public static final MediaType AUDIO_SMV_QCP_TYPE =
+ new MediaType("audio", "SMV-QCP");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_SPEEX} media
+ * type defined by RFC 5574.
+ */
+ public static final String AUDIO_SPEEX =
+ "audio/speex";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_SPEEX} media
+ * type defined by RFC 5574.
+ */
+ public static final MediaType AUDIO_SPEEX_TYPE =
+ new MediaType("audio", "speex");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_T140C} media
+ * type defined by RFC 4351.
+ */
+ public static final String AUDIO_T140C =
+ "audio/t140c";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_T140C} media
+ * type defined by RFC 4351.
+ */
+ public static final MediaType AUDIO_T140C_TYPE =
+ new MediaType("audio", "t140c");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_T38} media
+ * type defined by RFC 4612.
+ */
+ public static final String AUDIO_T38 =
+ "audio/t38";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_T38} media
+ * type defined by RFC 4612.
+ */
+ public static final MediaType AUDIO_T38_TYPE =
+ new MediaType("audio", "t38");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_TELEPHONE_EVENT} media
+ * type defined by RFC 4733.
+ */
+ public static final String AUDIO_TELEPHONE_EVENT =
+ "audio/telephone-event";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_TELEPHONE_EVENT} media
+ * type defined by RFC 4733.
+ */
+ public static final MediaType AUDIO_TELEPHONE_EVENT_TYPE =
+ new MediaType("audio", "telephone-event");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_TONE} media
+ * type defined by RFC 4733.
+ */
+ public static final String AUDIO_TONE =
+ "audio/tone";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_TONE} media
+ * type defined by RFC 4733.
+ */
+ public static final MediaType AUDIO_TONE_TYPE =
+ new MediaType("audio", "tone");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_TSVCIS} media
+ * type defined by RFC 8817.
+ */
+ public static final String AUDIO_TSVCIS =
+ "audio/TSVCIS";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_TSVCIS} media
+ * type defined by RFC 8817.
+ */
+ public static final MediaType AUDIO_TSVCIS_TYPE =
+ new MediaType("audio", "TSVCIS");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_UEMCLIP} media
+ * type defined by RFC 5686.
+ */
+ public static final String AUDIO_UEMCLIP =
+ "audio/UEMCLIP";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_UEMCLIP} media
+ * type defined by RFC 5686.
+ */
+ public static final MediaType AUDIO_UEMCLIP_TYPE =
+ new MediaType("audio", "UEMCLIP");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final String AUDIO_ULPFEC =
+ "audio/ulpfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final MediaType AUDIO_ULPFEC_TYPE =
+ new MediaType("audio", "ulpfec");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_VDVI} media
+ * type defined by RFC 4856.
+ */
+ public static final String AUDIO_VDVI =
+ "audio/VDVI";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_VDVI} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType AUDIO_VDVI_TYPE =
+ new MediaType("audio", "VDVI");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_VMR_WB} media
+ * type defined by RFC 4348, and RFC 4424.
+ */
+ public static final String AUDIO_VMR_WB =
+ "audio/VMR-WB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_VMR_WB} media
+ * type defined by RFC 4348, and RFC 4424.
+ */
+ public static final MediaType AUDIO_VMR_WB_TYPE =
+ new MediaType("audio", "VMR-WB");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_VND_QCELP} media
+ * type defined by RFC 3625.
+ */
+ public static final String AUDIO_VND_QCELP =
+ "audio/vnd.qcelp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_VND_QCELP} media
+ * type defined by RFC 3625.
+ */
+ public static final MediaType AUDIO_VND_QCELP_TYPE =
+ new MediaType("audio", "vnd.qcelp");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_VORBIS} media
+ * type defined by RFC 5215.
+ */
+ public static final String AUDIO_VORBIS =
+ "audio/vorbis";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_VORBIS} media
+ * type defined by RFC 5215.
+ */
+ public static final MediaType AUDIO_VORBIS_TYPE =
+ new MediaType("audio", "vorbis");
+
+ /**
+ * A {@code String} constant representing {@value #AUDIO_VORBIS_CONFIG} media
+ * type defined by RFC 5215.
+ */
+ public static final String AUDIO_VORBIS_CONFIG =
+ "audio/vorbis-config";
+
+ /**
+ * A {@link MediaType} constant representing {@value #AUDIO_VORBIS_CONFIG} media
+ * type defined by RFC 5215.
+ */
+ public static final MediaType AUDIO_VORBIS_CONFIG_TYPE =
+ new MediaType("audio", "vorbis-config");
+ }
+
+ /**
+ * Font type media subtypes.
+ */
+ public static class Font {
+ /**
+ * A {@code String} constant representing {@value #FONT_COLLECTION} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_COLLECTION =
+ "font/collection";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_COLLECTION} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_COLLECTION_TYPE =
+ new MediaType("font", "collection");
+
+ /**
+ * A {@code String} constant representing {@value #FONT_OTF} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_OTF =
+ "font/otf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_OTF} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_OTF_TYPE =
+ new MediaType("font", "otf");
+
+ /**
+ * A {@code String} constant representing {@value #FONT_SFNT} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_SFNT =
+ "font/sfnt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_SFNT} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_SFNT_TYPE =
+ new MediaType("font", "sfnt");
+
+ /**
+ * A {@code String} constant representing {@value #FONT_TTF} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_TTF =
+ "font/ttf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_TTF} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_TTF_TYPE =
+ new MediaType("font", "ttf");
+
+ /**
+ * A {@code String} constant representing {@value #FONT_WOFF} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_WOFF =
+ "font/woff";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_WOFF} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_WOFF_TYPE =
+ new MediaType("font", "woff");
+
+ /**
+ * A {@code String} constant representing {@value #FONT_WOFF2} media
+ * type defined by RFC 8081.
+ */
+ public static final String FONT_WOFF2 =
+ "font/woff2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #FONT_WOFF2} media
+ * type defined by RFC 8081.
+ */
+ public static final MediaType FONT_WOFF2_TYPE =
+ new MediaType("font", "woff2");
+ }
+
+ /**
+ * Haptics type media subtypes.
+ */
+ public static class Haptics {
+ /**
+ * A {@code String} constant representing {@value #HAPTICS_IVS} media
+ * type defined by RFC 9695.
+ */
+ public static final String HAPTICS_IVS =
+ "haptics/ivs";
+
+ /**
+ * A {@link MediaType} constant representing {@value #HAPTICS_IVS} media
+ * type defined by RFC 9695.
+ */
+ public static final MediaType HAPTICS_IVS_TYPE =
+ new MediaType("haptics", "ivs");
+
+ /**
+ * A {@code String} constant representing {@value #HAPTICS_HJIF} media
+ * type defined by RFC 9695.
+ */
+ public static final String HAPTICS_HJIF =
+ "haptics/hjif";
+
+ /**
+ * A {@link MediaType} constant representing {@value #HAPTICS_HJIF} media
+ * type defined by RFC 9695.
+ */
+ public static final MediaType HAPTICS_HJIF_TYPE =
+ new MediaType("haptics", "hjif");
+
+ /**
+ * A {@code String} constant representing {@value #HAPTICS_HMPG} media
+ * type defined by RFC 9695.
+ */
+ public static final String HAPTICS_HMPG =
+ "haptics/hmpg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #HAPTICS_HMPG} media
+ * type defined by RFC 9695.
+ */
+ public static final MediaType HAPTICS_HMPG_TYPE =
+ new MediaType("haptics", "hmpg");
+ }
+
+ /**
+ * Image type media subtypes.
+ */
+ public static class Image {
+ /**
+ * A {@code String} constant representing {@value #IMAGE_BMP} media
+ * type defined by RFC 7903.
+ */
+ public static final String IMAGE_BMP =
+ "image/bmp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_BMP} media
+ * type defined by RFC 7903.
+ */
+ public static final MediaType IMAGE_BMP_TYPE =
+ new MediaType("image", "bmp");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_EMF} media
+ * type defined by RFC 7903.
+ */
+ public static final String IMAGE_EMF =
+ "image/emf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_EMF} media
+ * type defined by RFC 7903.
+ */
+ public static final MediaType IMAGE_EMF_TYPE =
+ new MediaType("image", "emf");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String IMAGE_EXAMPLE =
+ "image/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType IMAGE_EXAMPLE_TYPE =
+ new MediaType("image", "example");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_FITS} media
+ * type defined by RFC 4047.
+ */
+ public static final String IMAGE_FITS =
+ "image/fits";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_FITS} media
+ * type defined by RFC 4047.
+ */
+ public static final MediaType IMAGE_FITS_TYPE =
+ new MediaType("image", "fits");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_G3FAX} media
+ * type defined by RFC 1494.
+ */
+ public static final String IMAGE_G3FAX =
+ "image/g3fax";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_G3FAX} media
+ * type defined by RFC 1494.
+ */
+ public static final MediaType IMAGE_G3FAX_TYPE =
+ new MediaType("image", "g3fax");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_GIF} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String IMAGE_GIF =
+ "image/gif";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_GIF} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType IMAGE_GIF_TYPE =
+ new MediaType("image", "gif");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_IEF} media
+ * type defined by RFC 1314.
+ */
+ public static final String IMAGE_IEF =
+ "image/ief";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_IEF} media
+ * type defined by RFC 1314.
+ */
+ public static final MediaType IMAGE_IEF_TYPE =
+ new MediaType("image", "ief");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_JP2} media
+ * type defined by RFC 3745.
+ */
+ public static final String IMAGE_JP2 =
+ "image/jp2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_JP2} media
+ * type defined by RFC 3745.
+ */
+ public static final MediaType IMAGE_JP2_TYPE =
+ new MediaType("image", "jp2");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_JPEG} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String IMAGE_JPEG =
+ "image/jpeg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_JPEG} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType IMAGE_JPEG_TYPE =
+ new MediaType("image", "jpeg");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_JPM} media
+ * type defined by RFC 3745.
+ */
+ public static final String IMAGE_JPM =
+ "image/jpm";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_JPM} media
+ * type defined by RFC 3745.
+ */
+ public static final MediaType IMAGE_JPM_TYPE =
+ new MediaType("image", "jpm");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_JPX} media
+ * type defined by RFC 3745.
+ */
+ public static final String IMAGE_JPX =
+ "image/jpx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_JPX} media
+ * type defined by RFC 3745.
+ */
+ public static final MediaType IMAGE_JPX_TYPE =
+ new MediaType("image", "jpx");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_SVG_XML} media
+ * type defined by {@code http://www.w3.org/TR/SVG/mimereg.html}.
+ */
+ public static final String IMAGE_SVG_XML =
+ "image/svg+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_SVG_XML} media
+ * type defined by {@code http://www.w3.org/TR/SVG/mimereg.html}.
+ */
+ public static final MediaType IMAGE_SVG_XML_TYPE =
+ new MediaType("image", "svg+xml");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_T38} media
+ * type defined by RFC 3362.
+ */
+ public static final String IMAGE_T38 =
+ "image/t38";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_T38} media
+ * type defined by RFC 3362.
+ */
+ public static final MediaType IMAGE_T38_TYPE =
+ new MediaType("image", "t38");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_TIFF} media
+ * type defined by RFC 3302.
+ */
+ public static final String IMAGE_TIFF =
+ "image/tiff";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_TIFF} media
+ * type defined by RFC 3302.
+ */
+ public static final MediaType IMAGE_TIFF_TYPE =
+ new MediaType("image", "tiff");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_TIFF_FX} media
+ * type defined by RFC 3950.
+ */
+ public static final String IMAGE_TIFF_FX =
+ "image/tiff-fx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_TIFF_FX} media
+ * type defined by RFC 3950.
+ */
+ public static final MediaType IMAGE_TIFF_FX_TYPE =
+ new MediaType("image", "tiff-fx");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_WEBP} media
+ * type defined by RFC 9649.
+ */
+ public static final String IMAGE_WEBP =
+ "image/webp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_WEBP} media
+ * type defined by RFC 9649.
+ */
+ public static final MediaType IMAGE_WEBP_TYPE =
+ new MediaType("image", "webp");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_WMF} media
+ * type defined by RFC 7903.
+ */
+ public static final String IMAGE_WMF =
+ "image/wmf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_WMF} media
+ * type defined by RFC 7903.
+ */
+ public static final MediaType IMAGE_WMF_TYPE =
+ new MediaType("image", "wmf");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_X_EMF} media
+ * type defined by RFC 7903.
+ */
+ public static final String IMAGE_X_EMF =
+ "image/x-emf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_X_EMF} media
+ * type defined by RFC 7903.
+ */
+ public static final MediaType IMAGE_X_EMF_TYPE =
+ new MediaType("image", "x-emf");
+
+ /**
+ * A {@code String} constant representing {@value #IMAGE_X_WMF} media
+ * type defined by RFC 7903.
+ */
+ public static final String IMAGE_X_WMF =
+ "image/x-wmf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #IMAGE_X_WMF} media
+ * type defined by RFC 7903.
+ */
+ public static final MediaType IMAGE_X_WMF_TYPE =
+ new MediaType("image", "x-wmf");
+ }
+
+ /**
+ * Message type media subtypes.
+ */
+ public static class Message {
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_BHTTP} media
+ * type defined by RFC 9292.
+ */
+ public static final String MESSAGE_BHTTP =
+ "message/bhttp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_BHTTP} media
+ * type defined by RFC 9292.
+ */
+ public static final MediaType MESSAGE_BHTTP_TYPE =
+ new MediaType("message", "bhttp");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_CPIM} media
+ * type defined by RFC 3862.
+ */
+ public static final String MESSAGE_CPIM =
+ "message/CPIM";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_CPIM} media
+ * type defined by RFC 3862.
+ */
+ public static final MediaType MESSAGE_CPIM_TYPE =
+ new MediaType("message", "CPIM");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_DELIVERY_STATUS} media
+ * type defined by RFC 1894.
+ */
+ public static final String MESSAGE_DELIVERY_STATUS =
+ "message/delivery-status";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_DELIVERY_STATUS} media
+ * type defined by RFC 1894.
+ */
+ public static final MediaType MESSAGE_DELIVERY_STATUS_TYPE =
+ new MediaType("message", "delivery-status");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_DISPOSITION_NOTIFICATION} media
+ * type defined by RFC 8098.
+ */
+ public static final String MESSAGE_DISPOSITION_NOTIFICATION =
+ "message/disposition-notification";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_DISPOSITION_NOTIFICATION} media
+ * type defined by RFC 8098.
+ */
+ public static final MediaType MESSAGE_DISPOSITION_NOTIFICATION_TYPE =
+ new MediaType("message", "disposition-notification");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String MESSAGE_EXAMPLE =
+ "message/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType MESSAGE_EXAMPLE_TYPE =
+ new MediaType("message", "example");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_EXTERNAL_BODY} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String MESSAGE_EXTERNAL_BODY =
+ "message/external-body";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_EXTERNAL_BODY} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType MESSAGE_EXTERNAL_BODY_TYPE =
+ new MediaType("message", "external-body");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_FEEDBACK_REPORT} media
+ * type defined by RFC 5965.
+ */
+ public static final String MESSAGE_FEEDBACK_REPORT =
+ "message/feedback-report";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_FEEDBACK_REPORT} media
+ * type defined by RFC 5965.
+ */
+ public static final MediaType MESSAGE_FEEDBACK_REPORT_TYPE =
+ new MediaType("message", "feedback-report");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_GLOBAL} media
+ * type defined by RFC 6532.
+ */
+ public static final String MESSAGE_GLOBAL =
+ "message/global";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_GLOBAL} media
+ * type defined by RFC 6532.
+ */
+ public static final MediaType MESSAGE_GLOBAL_TYPE =
+ new MediaType("message", "global");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_GLOBAL_DELIVERY_STATUS} media
+ * type defined by RFC 6533.
+ */
+ public static final String MESSAGE_GLOBAL_DELIVERY_STATUS =
+ "message/global-delivery-status";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_GLOBAL_DELIVERY_STATUS} media
+ * type defined by RFC 6533.
+ */
+ public static final MediaType MESSAGE_GLOBAL_DELIVERY_STATUS_TYPE =
+ new MediaType("message", "global-delivery-status");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION} media
+ * type defined by RFC 6533.
+ */
+ public static final String MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION =
+ "message/global-disposition-notification";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION} media
+ * type defined by RFC 6533.
+ */
+ public static final MediaType MESSAGE_GLOBAL_DISPOSITION_NOTIFICATION_TYPE =
+ new MediaType("message", "global-disposition-notification");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_GLOBAL_HEADERS} media
+ * type defined by RFC 6533.
+ */
+ public static final String MESSAGE_GLOBAL_HEADERS =
+ "message/global-headers";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_GLOBAL_HEADERS} media
+ * type defined by RFC 6533.
+ */
+ public static final MediaType MESSAGE_GLOBAL_HEADERS_TYPE =
+ new MediaType("message", "global-headers");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_HTTP} media
+ * type defined by RFC 9112.
+ */
+ public static final String MESSAGE_HTTP =
+ "message/http";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_HTTP} media
+ * type defined by RFC 9112.
+ */
+ public static final MediaType MESSAGE_HTTP_TYPE =
+ new MediaType("message", "http");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_IMDN_XML} media
+ * type defined by RFC 5438.
+ */
+ public static final String MESSAGE_IMDN_XML =
+ "message/imdn+xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_IMDN_XML} media
+ * type defined by RFC 5438.
+ */
+ public static final MediaType MESSAGE_IMDN_XML_TYPE =
+ new MediaType("message", "imdn+xml");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_MLS} media
+ * type defined by RFC 9420.
+ */
+ public static final String MESSAGE_MLS =
+ "message/mls";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_MLS} media
+ * type defined by RFC 9420.
+ */
+ public static final MediaType MESSAGE_MLS_TYPE =
+ new MediaType("message", "mls");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_NEWS} media
+ * type defined by RFC 5537.
+ */
+ public static final String MESSAGE_NEWS =
+ "message/news";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_NEWS} media
+ * type defined by RFC 5537.
+ */
+ public static final MediaType MESSAGE_NEWS_TYPE =
+ new MediaType("message", "news");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_OHTTP_REQ} media
+ * type defined by RFC 9458.
+ */
+ public static final String MESSAGE_OHTTP_REQ =
+ "message/ohttp-req";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_OHTTP_REQ} media
+ * type defined by RFC 9458.
+ */
+ public static final MediaType MESSAGE_OHTTP_REQ_TYPE =
+ new MediaType("message", "ohttp-req");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_OHTTP_RES} media
+ * type defined by RFC 9458.
+ */
+ public static final String MESSAGE_OHTTP_RES =
+ "message/ohttp-res";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_OHTTP_RES} media
+ * type defined by RFC 9458.
+ */
+ public static final MediaType MESSAGE_OHTTP_RES_TYPE =
+ new MediaType("message", "ohttp-res");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_PARTIAL} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String MESSAGE_PARTIAL =
+ "message/partial";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_PARTIAL} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType MESSAGE_PARTIAL_TYPE =
+ new MediaType("message", "partial");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_RFC822} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String MESSAGE_RFC822 =
+ "message/rfc822";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_RFC822} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType MESSAGE_RFC822_TYPE =
+ new MediaType("message", "rfc822");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_S_HTTP} media
+ * type defined by RFC 2660{@code Status change of HTTP experiments to Historic}.
+ */
+ public static final String MESSAGE_S_HTTP =
+ "message/s-http";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_S_HTTP} media
+ * type defined by RFC 2660{@code Status change of HTTP experiments to Historic}.
+ */
+ public static final MediaType MESSAGE_S_HTTP_TYPE =
+ new MediaType("message", "s-http");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_SIP} media
+ * type defined by RFC 3261.
+ */
+ public static final String MESSAGE_SIP =
+ "message/sip";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_SIP} media
+ * type defined by RFC 3261.
+ */
+ public static final MediaType MESSAGE_SIP_TYPE =
+ new MediaType("message", "sip");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_SIPFRAG} media
+ * type defined by RFC 3420.
+ */
+ public static final String MESSAGE_SIPFRAG =
+ "message/sipfrag";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_SIPFRAG} media
+ * type defined by RFC 3420.
+ */
+ public static final MediaType MESSAGE_SIPFRAG_TYPE =
+ new MediaType("message", "sipfrag");
+
+ /**
+ * A {@code String} constant representing {@value #MESSAGE_TRACKING_STATUS} media
+ * type defined by RFC 3886.
+ */
+ public static final String MESSAGE_TRACKING_STATUS =
+ "message/tracking-status";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MESSAGE_TRACKING_STATUS} media
+ * type defined by RFC 3886.
+ */
+ public static final MediaType MESSAGE_TRACKING_STATUS_TYPE =
+ new MediaType("message", "tracking-status");
+ }
+
+ /**
+ * Model type media subtypes.
+ */
+ public static class Model {
+ /**
+ * A {@code String} constant representing {@value #MODEL_3MF} media
+ * type defined by {@code http://www.3mf.io/specification}.
+ */
+ public static final String MODEL_3MF =
+ "model/3mf";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MODEL_3MF} media
+ * type defined by {@code http://www.3mf.io/specification}.
+ */
+ public static final MediaType MODEL_3MF_TYPE =
+ new MediaType("model", "3mf");
+
+ /**
+ * A {@code String} constant representing {@value #MODEL_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String MODEL_EXAMPLE =
+ "model/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MODEL_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType MODEL_EXAMPLE_TYPE =
+ new MediaType("model", "example");
+
+ /**
+ * A {@code String} constant representing {@value #MODEL_MESH} media
+ * type defined by RFC 2077.
+ */
+ public static final String MODEL_MESH =
+ "model/mesh";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MODEL_MESH} media
+ * type defined by RFC 2077.
+ */
+ public static final MediaType MODEL_MESH_TYPE =
+ new MediaType("model", "mesh");
+
+ /**
+ * A {@code String} constant representing {@value #MODEL_VRML} media
+ * type defined by RFC 2077.
+ */
+ public static final String MODEL_VRML =
+ "model/vrml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MODEL_VRML} media
+ * type defined by RFC 2077.
+ */
+ public static final MediaType MODEL_VRML_TYPE =
+ new MediaType("model", "vrml");
+ }
+
+ /**
+ * Multipart type media subtypes.
+ */
+ public static class Multipart {
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_ALTERNATIVE} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final String MULTIPART_ALTERNATIVE =
+ "multipart/alternative";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_ALTERNATIVE} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final MediaType MULTIPART_ALTERNATIVE_TYPE =
+ new MediaType("multipart", "alternative");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_BYTERANGES} media
+ * type defined by RFC 9110.
+ */
+ public static final String MULTIPART_BYTERANGES =
+ "multipart/byteranges";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_BYTERANGES} media
+ * type defined by RFC 9110.
+ */
+ public static final MediaType MULTIPART_BYTERANGES_TYPE =
+ new MediaType("multipart", "byteranges");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_DIGEST} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final String MULTIPART_DIGEST =
+ "multipart/digest";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_DIGEST} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final MediaType MULTIPART_DIGEST_TYPE =
+ new MediaType("multipart", "digest");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_ENCRYPTED} media
+ * type defined by RFC 1847.
+ */
+ public static final String MULTIPART_ENCRYPTED =
+ "multipart/encrypted";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_ENCRYPTED} media
+ * type defined by RFC 1847.
+ */
+ public static final MediaType MULTIPART_ENCRYPTED_TYPE =
+ new MediaType("multipart", "encrypted");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String MULTIPART_EXAMPLE =
+ "multipart/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType MULTIPART_EXAMPLE_TYPE =
+ new MediaType("multipart", "example");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_FORM_DATA} media
+ * type defined by RFC 7578.
+ */
+ public static final String MULTIPART_FORM_DATA =
+ "multipart/form-data";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_FORM_DATA} media
+ * type defined by RFC 7578.
+ */
+ public static final MediaType MULTIPART_FORM_DATA_TYPE =
+ new MediaType("multipart", "form-data");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_MIXED} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final String MULTIPART_MIXED =
+ "multipart/mixed";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_MIXED} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final MediaType MULTIPART_MIXED_TYPE =
+ new MediaType("multipart", "mixed");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_MULTILINGUAL} media
+ * type defined by RFC 8255.
+ */
+ public static final String MULTIPART_MULTILINGUAL =
+ "multipart/multilingual";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_MULTILINGUAL} media
+ * type defined by RFC 8255.
+ */
+ public static final MediaType MULTIPART_MULTILINGUAL_TYPE =
+ new MediaType("multipart", "multilingual");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_PARALLEL} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final String MULTIPART_PARALLEL =
+ "multipart/parallel";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_PARALLEL} media
+ * type defined by RFC 2046, and RFC 2045.
+ */
+ public static final MediaType MULTIPART_PARALLEL_TYPE =
+ new MediaType("multipart", "parallel");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_RELATED} media
+ * type defined by RFC 2387.
+ */
+ public static final String MULTIPART_RELATED =
+ "multipart/related";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_RELATED} media
+ * type defined by RFC 2387.
+ */
+ public static final MediaType MULTIPART_RELATED_TYPE =
+ new MediaType("multipart", "related");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_REPORT} media
+ * type defined by RFC 6522.
+ */
+ public static final String MULTIPART_REPORT =
+ "multipart/report";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_REPORT} media
+ * type defined by RFC 6522.
+ */
+ public static final MediaType MULTIPART_REPORT_TYPE =
+ new MediaType("multipart", "report");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_SIGNED} media
+ * type defined by RFC 1847.
+ */
+ public static final String MULTIPART_SIGNED =
+ "multipart/signed";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_SIGNED} media
+ * type defined by RFC 1847.
+ */
+ public static final MediaType MULTIPART_SIGNED_TYPE =
+ new MediaType("multipart", "signed");
+
+ /**
+ * A {@code String} constant representing {@value #MULTIPART_VOICE_MESSAGE} media
+ * type defined by RFC 3801.
+ */
+ public static final String MULTIPART_VOICE_MESSAGE =
+ "multipart/voice-message";
+
+ /**
+ * A {@link MediaType} constant representing {@value #MULTIPART_VOICE_MESSAGE} media
+ * type defined by RFC 3801.
+ */
+ public static final MediaType MULTIPART_VOICE_MESSAGE_TYPE =
+ new MediaType("multipart", "voice-message");
+ }
+
+ /**
+ * Text type media subtypes.
+ */
+ public static class Text {
+ /**
+ * A {@code String} constant representing {@value #TEXT_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final String TEXT_1D_INTERLEAVED_PARITYFEC =
+ "text/1d-interleaved-parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final MediaType TEXT_1D_INTERLEAVED_PARITYFEC_TYPE =
+ new MediaType("text", "1d-interleaved-parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_CALENDAR} media
+ * type defined by RFC 5545.
+ */
+ public static final String TEXT_CALENDAR =
+ "text/calendar";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_CALENDAR} media
+ * type defined by RFC 5545.
+ */
+ public static final MediaType TEXT_CALENDAR_TYPE =
+ new MediaType("text", "calendar");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_CSS} media
+ * type defined by RFC 2318.
+ */
+ public static final String TEXT_CSS =
+ "text/css";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_CSS} media
+ * type defined by RFC 2318.
+ */
+ public static final MediaType TEXT_CSS_TYPE =
+ new MediaType("text", "css");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_CSV} media
+ * type defined by RFC 4180, and RFC 7111.
+ */
+ public static final String TEXT_CSV =
+ "text/csv";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_CSV} media
+ * type defined by RFC 4180, and RFC 7111.
+ */
+ public static final MediaType TEXT_CSV_TYPE =
+ new MediaType("text", "csv");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_DIRECTORY} media
+ * type defined by RFC 2425, and RFC 6350.
+ */
+ public static final String TEXT_DIRECTORY =
+ "text/directory";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_DIRECTORY} media
+ * type defined by RFC 2425, and RFC 6350.
+ */
+ public static final MediaType TEXT_DIRECTORY_TYPE =
+ new MediaType("text", "directory");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_DNS} media
+ * type defined by RFC 4027.
+ */
+ public static final String TEXT_DNS =
+ "text/dns";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_DNS} media
+ * type defined by RFC 4027.
+ */
+ public static final MediaType TEXT_DNS_TYPE =
+ new MediaType("text", "dns");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_ECMASCRIPT} media
+ * type defined by RFC 9239.
+ */
+ public static final String TEXT_ECMASCRIPT =
+ "text/ecmascript";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_ECMASCRIPT} media
+ * type defined by RFC 9239.
+ */
+ public static final MediaType TEXT_ECMASCRIPT_TYPE =
+ new MediaType("text", "ecmascript");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final String TEXT_ENCAPRTP =
+ "text/encaprtp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType TEXT_ENCAPRTP_TYPE =
+ new MediaType("text", "encaprtp");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_ENRICHED} media
+ * type defined by RFC 1896.
+ */
+ public static final String TEXT_ENRICHED =
+ "text/enriched";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_ENRICHED} media
+ * type defined by RFC 1896.
+ */
+ public static final MediaType TEXT_ENRICHED_TYPE =
+ new MediaType("text", "enriched");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String TEXT_EXAMPLE =
+ "text/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType TEXT_EXAMPLE_TYPE =
+ new MediaType("text", "example");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final String TEXT_FLEXFEC =
+ "text/flexfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final MediaType TEXT_FLEXFEC_TYPE =
+ new MediaType("text", "flexfec");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_FWDRED} media
+ * type defined by RFC 6354.
+ */
+ public static final String TEXT_FWDRED =
+ "text/fwdred";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_FWDRED} media
+ * type defined by RFC 6354.
+ */
+ public static final MediaType TEXT_FWDRED_TYPE =
+ new MediaType("text", "fwdred");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_GRAMMAR_REF_LIST} media
+ * type defined by RFC 6787.
+ */
+ public static final String TEXT_GRAMMAR_REF_LIST =
+ "text/grammar-ref-list";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_GRAMMAR_REF_LIST} media
+ * type defined by RFC 6787.
+ */
+ public static final MediaType TEXT_GRAMMAR_REF_LIST_TYPE =
+ new MediaType("text", "grammar-ref-list");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_JAVASCRIPT} media
+ * type defined by RFC 9239.
+ */
+ public static final String TEXT_JAVASCRIPT =
+ "text/javascript";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_JAVASCRIPT} media
+ * type defined by RFC 9239.
+ */
+ public static final MediaType TEXT_JAVASCRIPT_TYPE =
+ new MediaType("text", "javascript");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_MARKDOWN} media
+ * type defined by RFC 7763.
+ */
+ public static final String TEXT_MARKDOWN =
+ "text/markdown";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_MARKDOWN} media
+ * type defined by RFC 7763.
+ */
+ public static final MediaType TEXT_MARKDOWN_TYPE =
+ new MediaType("text", "markdown");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_PARAMETERS} media
+ * type defined by RFC 7826.
+ */
+ public static final String TEXT_PARAMETERS =
+ "text/parameters";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_PARAMETERS} media
+ * type defined by RFC 7826.
+ */
+ public static final MediaType TEXT_PARAMETERS_TYPE =
+ new MediaType("text", "parameters");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final String TEXT_PARITYFEC =
+ "text/parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final MediaType TEXT_PARITYFEC_TYPE =
+ new MediaType("text", "parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_PLAIN} media
+ * type defined by RFC 2046, and RFC 3676, and RFC 5147.
+ */
+ public static final String TEXT_PLAIN =
+ "text/plain";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_PLAIN} media
+ * type defined by RFC 2046, and RFC 3676, and RFC 5147.
+ */
+ public static final MediaType TEXT_PLAIN_TYPE =
+ new MediaType("text", "plain");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final String TEXT_RAPTORFEC =
+ "text/raptorfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final MediaType TEXT_RAPTORFEC_TYPE =
+ new MediaType("text", "raptorfec");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RED} media
+ * type defined by RFC 4102.
+ */
+ public static final String TEXT_RED =
+ "text/RED";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RED} media
+ * type defined by RFC 4102.
+ */
+ public static final MediaType TEXT_RED_TYPE =
+ new MediaType("text", "RED");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RFC822_HEADERS} media
+ * type defined by RFC 6522.
+ */
+ public static final String TEXT_RFC822_HEADERS =
+ "text/rfc822-headers";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RFC822_HEADERS} media
+ * type defined by RFC 6522.
+ */
+ public static final MediaType TEXT_RFC822_HEADERS_TYPE =
+ new MediaType("text", "rfc822-headers");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RICHTEXT} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String TEXT_RICHTEXT =
+ "text/richtext";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RICHTEXT} media
+ * type defined by RFC 2045,, and RFC 2046.
+ */
+ public static final MediaType TEXT_RICHTEXT_TYPE =
+ new MediaType("text", "richtext");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final String TEXT_RTPLOOPBACK =
+ "text/rtploopback";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType TEXT_RTPLOOPBACK_TYPE =
+ new MediaType("text", "rtploopback");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final String TEXT_RTX =
+ "text/rtx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final MediaType TEXT_RTX_TYPE =
+ new MediaType("text", "rtx");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_SGML} media
+ * type defined by RFC 1874.
+ */
+ public static final String TEXT_SGML =
+ "text/SGML";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_SGML} media
+ * type defined by RFC 1874.
+ */
+ public static final MediaType TEXT_SGML_TYPE =
+ new MediaType("text", "SGML");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_T140} media
+ * type defined by RFC 4103.
+ */
+ public static final String TEXT_T140 =
+ "text/t140";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_T140} media
+ * type defined by RFC 4103.
+ */
+ public static final MediaType TEXT_T140_TYPE =
+ new MediaType("text", "t140");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_TROFF} media
+ * type defined by RFC 4263.
+ */
+ public static final String TEXT_TROFF =
+ "text/troff";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_TROFF} media
+ * type defined by RFC 4263.
+ */
+ public static final MediaType TEXT_TROFF_TYPE =
+ new MediaType("text", "troff");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final String TEXT_ULPFEC =
+ "text/ulpfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final MediaType TEXT_ULPFEC_TYPE =
+ new MediaType("text", "ulpfec");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_URI_LIST} media
+ * type defined by RFC 2483.
+ */
+ public static final String TEXT_URI_LIST =
+ "text/uri-list";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_URI_LIST} media
+ * type defined by RFC 2483.
+ */
+ public static final MediaType TEXT_URI_LIST_TYPE =
+ new MediaType("text", "uri-list");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_VCARD} media
+ * type defined by RFC 6350.
+ */
+ public static final String TEXT_VCARD =
+ "text/vcard";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_VCARD} media
+ * type defined by RFC 6350.
+ */
+ public static final MediaType TEXT_VCARD_TYPE =
+ new MediaType("text", "vcard");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_VND_RADISYS_MSML_BASIC_LAYOUT} media
+ * type defined by RFC 5707.
+ */
+ public static final String TEXT_VND_RADISYS_MSML_BASIC_LAYOUT =
+ "text/vnd.radisys.msml-basic-layout";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_VND_RADISYS_MSML_BASIC_LAYOUT} media
+ * type defined by RFC 5707.
+ */
+ public static final MediaType TEXT_VND_RADISYS_MSML_BASIC_LAYOUT_TYPE =
+ new MediaType("text", "vnd.radisys.msml-basic-layout");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_XML} media
+ * type defined by RFC 7303.
+ */
+ public static final String TEXT_XML =
+ "text/xml";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_XML} media
+ * type defined by RFC 7303.
+ */
+ public static final MediaType TEXT_XML_TYPE =
+ new MediaType("text", "xml");
+
+ /**
+ * A {@code String} constant representing {@value #TEXT_XML_EXTERNAL_PARSED_ENTITY} media
+ * type defined by RFC 7303.
+ */
+ public static final String TEXT_XML_EXTERNAL_PARSED_ENTITY =
+ "text/xml-external-parsed-entity";
+
+ /**
+ * A {@link MediaType} constant representing {@value #TEXT_XML_EXTERNAL_PARSED_ENTITY} media
+ * type defined by RFC 7303.
+ */
+ public static final MediaType TEXT_XML_EXTERNAL_PARSED_ENTITY_TYPE =
+ new MediaType("text", "xml-external-parsed-entity");
+ }
+
+ /**
+ * Video type media subtypes.
+ */
+ public static class Video {
+ /**
+ * A {@code String} constant representing {@value #VIDEO_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final String VIDEO_1D_INTERLEAVED_PARITYFEC =
+ "video/1d-interleaved-parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_1D_INTERLEAVED_PARITYFEC} media
+ * type defined by RFC 6015.
+ */
+ public static final MediaType VIDEO_1D_INTERLEAVED_PARITYFEC_TYPE =
+ new MediaType("video", "1d-interleaved-parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_3GPP} media
+ * type defined by RFC 3839, and RFC 6381.
+ */
+ public static final String VIDEO_3GPP =
+ "video/3gpp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_3GPP} media
+ * type defined by RFC 3839, and RFC 6381.
+ */
+ public static final MediaType VIDEO_3GPP_TYPE =
+ new MediaType("video", "3gpp");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_3GPP2} media
+ * type defined by RFC 4393, and RFC 6381.
+ */
+ public static final String VIDEO_3GPP2 =
+ "video/3gpp2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_3GPP2} media
+ * type defined by RFC 4393, and RFC 6381.
+ */
+ public static final MediaType VIDEO_3GPP2_TYPE =
+ new MediaType("video", "3gpp2");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_3GPP_TT} media
+ * type defined by RFC 4396.
+ */
+ public static final String VIDEO_3GPP_TT =
+ "video/3gpp-tt";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_3GPP_TT} media
+ * type defined by RFC 4396.
+ */
+ public static final MediaType VIDEO_3GPP_TT_TYPE =
+ new MediaType("video", "3gpp-tt");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_BMPEG} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_BMPEG =
+ "video/BMPEG";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_BMPEG} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_BMPEG_TYPE =
+ new MediaType("video", "BMPEG");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_BT656} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_BT656 =
+ "video/BT656";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_BT656} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_BT656_TYPE =
+ new MediaType("video", "BT656");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_CELB} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_CELB =
+ "video/CelB";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_CELB} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_CELB_TYPE =
+ new MediaType("video", "CelB");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_DV} media
+ * type defined by RFC 6469.
+ */
+ public static final String VIDEO_DV =
+ "video/DV";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_DV} media
+ * type defined by RFC 6469.
+ */
+ public static final MediaType VIDEO_DV_TYPE =
+ new MediaType("video", "DV");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final String VIDEO_ENCAPRTP =
+ "video/encaprtp";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_ENCAPRTP} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType VIDEO_ENCAPRTP_TYPE =
+ new MediaType("video", "encaprtp");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_EVC} media
+ * type defined by RFC 9584.
+ */
+ public static final String VIDEO_EVC =
+ "video/evc";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_EVC} media
+ * type defined by RFC 9584.
+ */
+ public static final MediaType VIDEO_EVC_TYPE =
+ new MediaType("video", "evc");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final String VIDEO_EXAMPLE =
+ "video/example";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_EXAMPLE} media
+ * type defined by RFC 4735.
+ */
+ public static final MediaType VIDEO_EXAMPLE_TYPE =
+ new MediaType("video", "example");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_FFV1} media
+ * type defined by RFC 9043.
+ */
+ public static final String VIDEO_FFV1 =
+ "video/FFV1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_FFV1} media
+ * type defined by RFC 9043.
+ */
+ public static final MediaType VIDEO_FFV1_TYPE =
+ new MediaType("video", "FFV1");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final String VIDEO_FLEXFEC =
+ "video/flexfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_FLEXFEC} media
+ * type defined by RFC 8627.
+ */
+ public static final MediaType VIDEO_FLEXFEC_TYPE =
+ new MediaType("video", "flexfec");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H261} media
+ * type defined by RFC 4587.
+ */
+ public static final String VIDEO_H261 =
+ "video/H261";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H261} media
+ * type defined by RFC 4587.
+ */
+ public static final MediaType VIDEO_H261_TYPE =
+ new MediaType("video", "H261");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H263} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_H263 =
+ "video/H263";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H263} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_H263_TYPE =
+ new MediaType("video", "H263");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H263_1998} media
+ * type defined by RFC 4629.
+ */
+ public static final String VIDEO_H263_1998 =
+ "video/H263-1998";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H263_1998} media
+ * type defined by RFC 4629.
+ */
+ public static final MediaType VIDEO_H263_1998_TYPE =
+ new MediaType("video", "H263-1998");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H263_2000} media
+ * type defined by RFC 4629.
+ */
+ public static final String VIDEO_H263_2000 =
+ "video/H263-2000";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H263_2000} media
+ * type defined by RFC 4629.
+ */
+ public static final MediaType VIDEO_H263_2000_TYPE =
+ new MediaType("video", "H263-2000");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H264} media
+ * type defined by RFC 6184.
+ */
+ public static final String VIDEO_H264 =
+ "video/H264";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H264} media
+ * type defined by RFC 6184.
+ */
+ public static final MediaType VIDEO_H264_TYPE =
+ new MediaType("video", "H264");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H264_RCDO} media
+ * type defined by RFC 6185.
+ */
+ public static final String VIDEO_H264_RCDO =
+ "video/H264-RCDO";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H264_RCDO} media
+ * type defined by RFC 6185.
+ */
+ public static final MediaType VIDEO_H264_RCDO_TYPE =
+ new MediaType("video", "H264-RCDO");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H264_SVC} media
+ * type defined by RFC 6190.
+ */
+ public static final String VIDEO_H264_SVC =
+ "video/H264-SVC";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H264_SVC} media
+ * type defined by RFC 6190.
+ */
+ public static final MediaType VIDEO_H264_SVC_TYPE =
+ new MediaType("video", "H264-SVC");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H265} media
+ * type defined by RFC 7798.
+ */
+ public static final String VIDEO_H265 =
+ "video/H265";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H265} media
+ * type defined by RFC 7798.
+ */
+ public static final MediaType VIDEO_H265_TYPE =
+ new MediaType("video", "H265");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_H266} media
+ * type defined by RFC 9328.
+ */
+ public static final String VIDEO_H266 =
+ "video/H266";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_H266} media
+ * type defined by RFC 9328.
+ */
+ public static final MediaType VIDEO_H266_TYPE =
+ new MediaType("video", "H266");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_JPEG} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_JPEG =
+ "video/JPEG";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_JPEG} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_JPEG_TYPE =
+ new MediaType("video", "JPEG");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_JPEG2000} media
+ * type defined by RFC 5371, and RFC 5372.
+ */
+ public static final String VIDEO_JPEG2000 =
+ "video/jpeg2000";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_JPEG2000} media
+ * type defined by RFC 5371, and RFC 5372.
+ */
+ public static final MediaType VIDEO_JPEG2000_TYPE =
+ new MediaType("video", "jpeg2000");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_JPEG2000_SCL} media
+ * type defined by RFC 9828.
+ */
+ public static final String VIDEO_JPEG2000_SCL =
+ "video/jpeg2000-scl";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_JPEG2000_SCL} media
+ * type defined by RFC 9828.
+ */
+ public static final MediaType VIDEO_JPEG2000_SCL_TYPE =
+ new MediaType("video", "jpeg2000-scl");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_JXSV} media
+ * type defined by RFC 9134.
+ */
+ public static final String VIDEO_JXSV =
+ "video/jxsv";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_JXSV} media
+ * type defined by RFC 9134.
+ */
+ public static final MediaType VIDEO_JXSV_TYPE =
+ new MediaType("video", "jxsv");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MATROSKA} media
+ * type defined by RFC 9559.
+ */
+ public static final String VIDEO_MATROSKA =
+ "video/matroska";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MATROSKA} media
+ * type defined by RFC 9559.
+ */
+ public static final MediaType VIDEO_MATROSKA_TYPE =
+ new MediaType("video", "matroska");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MATROSKA_3D} media
+ * type defined by RFC 9559.
+ */
+ public static final String VIDEO_MATROSKA_3D =
+ "video/matroska-3d";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MATROSKA_3D} media
+ * type defined by RFC 9559.
+ */
+ public static final MediaType VIDEO_MATROSKA_3D_TYPE =
+ new MediaType("video", "matroska-3d");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MJ2} media
+ * type defined by RFC 3745.
+ */
+ public static final String VIDEO_MJ2 =
+ "video/mj2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MJ2} media
+ * type defined by RFC 3745.
+ */
+ public static final MediaType VIDEO_MJ2_TYPE =
+ new MediaType("video", "mj2");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MP1S} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_MP1S =
+ "video/MP1S";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MP1S} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_MP1S_TYPE =
+ new MediaType("video", "MP1S");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MP2P} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_MP2P =
+ "video/MP2P";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MP2P} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_MP2P_TYPE =
+ new MediaType("video", "MP2P");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MP2T} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_MP2T =
+ "video/MP2T";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MP2T} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_MP2T_TYPE =
+ new MediaType("video", "MP2T");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final String VIDEO_MP4 =
+ "video/mp4";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MP4} media
+ * type defined by RFC 4337, and RFC 6381.
+ */
+ public static final MediaType VIDEO_MP4_TYPE =
+ new MediaType("video", "mp4");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MP4V_ES} media
+ * type defined by RFC 6416.
+ */
+ public static final String VIDEO_MP4V_ES =
+ "video/MP4V-ES";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MP4V_ES} media
+ * type defined by RFC 6416.
+ */
+ public static final MediaType VIDEO_MP4V_ES_TYPE =
+ new MediaType("video", "MP4V-ES");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MPV} media
+ * type defined by RFC 3555.
+ */
+ public static final String VIDEO_MPV =
+ "video/MPV";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MPV} media
+ * type defined by RFC 3555.
+ */
+ public static final MediaType VIDEO_MPV_TYPE =
+ new MediaType("video", "MPV");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MPEG} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final String VIDEO_MPEG =
+ "video/mpeg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MPEG} media
+ * type defined by RFC 2045, and RFC 2046.
+ */
+ public static final MediaType VIDEO_MPEG_TYPE =
+ new MediaType("video", "mpeg");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_MPEG4_GENERIC} media
+ * type defined by RFC 3640.
+ */
+ public static final String VIDEO_MPEG4_GENERIC =
+ "video/mpeg4-generic";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_MPEG4_GENERIC} media
+ * type defined by RFC 3640.
+ */
+ public static final MediaType VIDEO_MPEG4_GENERIC_TYPE =
+ new MediaType("video", "mpeg4-generic");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_NV} media
+ * type defined by RFC 4856.
+ */
+ public static final String VIDEO_NV =
+ "video/nv";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_NV} media
+ * type defined by RFC 4856.
+ */
+ public static final MediaType VIDEO_NV_TYPE =
+ new MediaType("video", "nv");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final String VIDEO_OGG =
+ "video/ogg";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_OGG} media
+ * type defined by RFC 5334, and RFC 7845.
+ */
+ public static final MediaType VIDEO_OGG_TYPE =
+ new MediaType("video", "ogg");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final String VIDEO_PARITYFEC =
+ "video/parityfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_PARITYFEC} media
+ * type defined by RFC 3009.
+ */
+ public static final MediaType VIDEO_PARITYFEC_TYPE =
+ new MediaType("video", "parityfec");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_POINTER} media
+ * type defined by RFC 2862.
+ */
+ public static final String VIDEO_POINTER =
+ "video/pointer";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_POINTER} media
+ * type defined by RFC 2862.
+ */
+ public static final MediaType VIDEO_POINTER_TYPE =
+ new MediaType("video", "pointer");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_QUICKTIME} media
+ * type defined by RFC 6381.
+ */
+ public static final String VIDEO_QUICKTIME =
+ "video/quicktime";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_QUICKTIME} media
+ * type defined by RFC 6381.
+ */
+ public static final MediaType VIDEO_QUICKTIME_TYPE =
+ new MediaType("video", "quicktime");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final String VIDEO_RAPTORFEC =
+ "video/raptorfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_RAPTORFEC} media
+ * type defined by RFC 6682.
+ */
+ public static final MediaType VIDEO_RAPTORFEC_TYPE =
+ new MediaType("video", "raptorfec");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_RAW} media
+ * type defined by RFC 4175.
+ */
+ public static final String VIDEO_RAW =
+ "video/raw";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_RAW} media
+ * type defined by RFC 4175.
+ */
+ public static final MediaType VIDEO_RAW_TYPE =
+ new MediaType("video", "raw");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final String VIDEO_RTPLOOPBACK =
+ "video/rtploopback";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_RTPLOOPBACK} media
+ * type defined by RFC 6849.
+ */
+ public static final MediaType VIDEO_RTPLOOPBACK_TYPE =
+ new MediaType("video", "rtploopback");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final String VIDEO_RTX =
+ "video/rtx";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_RTX} media
+ * type defined by RFC 4588.
+ */
+ public static final MediaType VIDEO_RTX_TYPE =
+ new MediaType("video", "rtx");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_SCIP} media
+ * type defined by RFC 9607.
+ */
+ public static final String VIDEO_SCIP =
+ "video/scip";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_SCIP} media
+ * type defined by RFC 9607.
+ */
+ public static final MediaType VIDEO_SCIP_TYPE =
+ new MediaType("video", "scip");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_SMPTE291} media
+ * type defined by RFC 8331.
+ */
+ public static final String VIDEO_SMPTE291 =
+ "video/smpte291";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_SMPTE291} media
+ * type defined by RFC 8331.
+ */
+ public static final MediaType VIDEO_SMPTE291_TYPE =
+ new MediaType("video", "smpte291");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_SMPTE292M} media
+ * type defined by RFC 3497.
+ */
+ public static final String VIDEO_SMPTE292M =
+ "video/SMPTE292M";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_SMPTE292M} media
+ * type defined by RFC 3497.
+ */
+ public static final MediaType VIDEO_SMPTE292M_TYPE =
+ new MediaType("video", "SMPTE292M");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final String VIDEO_ULPFEC =
+ "video/ulpfec";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_ULPFEC} media
+ * type defined by RFC 5109.
+ */
+ public static final MediaType VIDEO_ULPFEC_TYPE =
+ new MediaType("video", "ulpfec");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_VC1} media
+ * type defined by RFC 4425.
+ */
+ public static final String VIDEO_VC1 =
+ "video/vc1";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_VC1} media
+ * type defined by RFC 4425.
+ */
+ public static final MediaType VIDEO_VC1_TYPE =
+ new MediaType("video", "vc1");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_VC2} media
+ * type defined by RFC 8450.
+ */
+ public static final String VIDEO_VC2 =
+ "video/vc2";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_VC2} media
+ * type defined by RFC 8450.
+ */
+ public static final MediaType VIDEO_VC2_TYPE =
+ new MediaType("video", "vc2");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_VP8} media
+ * type defined by RFC 7741.
+ */
+ public static final String VIDEO_VP8 =
+ "video/VP8";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_VP8} media
+ * type defined by RFC 7741.
+ */
+ public static final MediaType VIDEO_VP8_TYPE =
+ new MediaType("video", "VP8");
+
+ /**
+ * A {@code String} constant representing {@value #VIDEO_VP9} media
+ * type defined by RFC 9628.
+ */
+ public static final String VIDEO_VP9 =
+ "video/VP9";
+
+ /**
+ * A {@link MediaType} constant representing {@value #VIDEO_VP9} media
+ * type defined by RFC 9628.
+ */
+ public static final MediaType VIDEO_VP9_TYPE =
+ new MediaType("video", "VP9");
+ }
+}
diff --git a/ext/constants/src/main/java/org/glassfish/jersey/constants/http/ResponseStatus.java b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/ResponseStatus.java
new file mode 100644
index 0000000..6d53994
--- /dev/null
+++ b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/ResponseStatus.java
@@ -0,0 +1,55 @@
+/*
+ * 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.constants.http;
+
+/**
+ * This is a list of Hypertext Transfer Protocol (HTTP) response status codes.
+ * The Internet Assigned Numbers Authority (IANA) maintains the official registry of HTTP status codes.
+ * See <a href="https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml">Hypertext Transfer Protocol (HTTP) Status Code Registry</a>.
+ */
+public final class ResponseStatus {
+
+ /**
+ * 1xx informational status codes - request received, continuing process
+ */
+ public static class Info1xx extends org.glassfish.jersey.http.ResponseStatus.Info1xx {
+ }
+
+ /**
+ * 2xx success status codes - the action was successfully received, understood, and accepted.
+ */
+ public static class Success2xx extends org.glassfish.jersey.http.ResponseStatus.Success2xx {
+ }
+
+ /**
+ * 3xx redirection status codes - further action must be taken in order to complete the request.
+ */
+ public static class Redirect3xx extends org.glassfish.jersey.http.ResponseStatus.Redirect3xx {
+ }
+
+ /**
+ * 4xx client error status codes - the request contains bad syntax or cannot be fulfilled.
+ */
+ public static class ClientError4xx extends org.glassfish.jersey.http.ResponseStatus.Redirect3xx {
+ }
+
+ /**
+ * 5xx server error status codes - the server failed to fulfill an apparently valid request.
+ */
+ public static class ServerError5xx extends org.glassfish.jersey.http.ResponseStatus.ServerError5xx {
+ }
+}
diff --git a/ext/constants/src/main/java/org/glassfish/jersey/constants/http/package-info.java b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/package-info.java
new file mode 100644
index 0000000..2e4b917
--- /dev/null
+++ b/ext/constants/src/main/java/org/glassfish/jersey/constants/http/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * 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
+ */
+
+/**
+ * HTTP communication related constants.
+ */
+package org.glassfish.jersey.constants.http;
\ No newline at end of file
diff --git a/ext/entity-filtering/pom.xml b/ext/entity-filtering/pom.xml
index dc5ebf2..b771680 100644
--- a/ext/entity-filtering/pom.xml
+++ b/ext/entity-filtering/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-entity-filtering</artifactId>
diff --git a/ext/metainf-services/pom.xml b/ext/metainf-services/pom.xml
index 5194681..69e100c 100644
--- a/ext/metainf-services/pom.xml
+++ b/ext/metainf-services/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-metainf-services</artifactId>
diff --git a/ext/micrometer/pom.xml b/ext/micrometer/pom.xml
index d7c6f74..7071652 100644
--- a/ext/micrometer/pom.xml
+++ b/ext/micrometer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/ext/microprofile/mp-config/pom.xml b/ext/microprofile/mp-config/pom.xml
index 37bdc7a..351a7a6 100644
--- a/ext/microprofile/mp-config/pom.xml
+++ b/ext/microprofile/mp-config/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/ext/microprofile/mp-rest-client/pom.xml b/ext/microprofile/mp-rest-client/pom.xml
index c01acae..623c056 100644
--- a/ext/microprofile/mp-rest-client/pom.xml
+++ b/ext/microprofile/mp-rest-client/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -117,6 +117,8 @@
${cdi.osgi.version},
${jakarta.decorator.osgi.version},
org.eclipse.microprofile.config.*;version="!",
+ org.eclipse.microprofile.rest.client;version="!",
+ org.eclipse.microprofile.rest.client.*;version="!",
${jakarta.rest.osgi.version},
*
</Import-Package>
diff --git a/ext/microprofile/pom.xml b/ext/microprofile/pom.xml
index 69b6a86..6ec9623 100644
--- a/ext/microprofile/pom.xml
+++ b/ext/microprofile/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/ext/mvc-bean-validation/pom.xml b/ext/mvc-bean-validation/pom.xml
index 81f7a4d..c3e5cd2 100644
--- a/ext/mvc-bean-validation/pom.xml
+++ b/ext/mvc-bean-validation/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc-bean-validation</artifactId>
diff --git a/ext/mvc-freemarker/pom.xml b/ext/mvc-freemarker/pom.xml
index b50b611..0241680 100644
--- a/ext/mvc-freemarker/pom.xml
+++ b/ext/mvc-freemarker/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc-freemarker</artifactId>
diff --git a/ext/mvc-jsp/pom.xml b/ext/mvc-jsp/pom.xml
index dd56f2a..942f92c 100644
--- a/ext/mvc-jsp/pom.xml
+++ b/ext/mvc-jsp/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc-jsp</artifactId>
diff --git a/ext/mvc-mustache/pom.xml b/ext/mvc-mustache/pom.xml
index ca37327..55bbf4e 100644
--- a/ext/mvc-mustache/pom.xml
+++ b/ext/mvc-mustache/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc-mustache</artifactId>
diff --git a/ext/mvc-thymeleaf/pom.xml b/ext/mvc-thymeleaf/pom.xml
index 4d52073..a774f9b 100644
--- a/ext/mvc-thymeleaf/pom.xml
+++ b/ext/mvc-thymeleaf/pom.xml
@@ -25,7 +25,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc-thymeleaf</artifactId>
diff --git a/ext/mvc/pom.xml b/ext/mvc/pom.xml
index 76cd115..9cc9bc2 100644
--- a/ext/mvc/pom.xml
+++ b/ext/mvc/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-mvc</artifactId>
diff --git a/ext/pom.xml b/ext/pom.xml
index 1f3ce21..19f9754 100644
--- a/ext/pom.xml
+++ b/ext/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.ext</groupId>
@@ -42,6 +42,7 @@
<modules>
<module>bean-validation</module>
<module>cdi</module>
+ <module>constants</module>
<module>entity-filtering</module>
<module>metainf-services</module>
<module>micrometer</module>
diff --git a/ext/proxy-client/pom.xml b/ext/proxy-client/pom.xml
index ad2f19b..f7cefaf 100644
--- a/ext/proxy-client/pom.xml
+++ b/ext/proxy-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-proxy-client</artifactId>
diff --git a/ext/rx/pom.xml b/ext/rx/pom.xml
index 06124b4..34c017f 100644
--- a/ext/rx/pom.xml
+++ b/ext/rx/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.ext.rx</groupId>
diff --git a/ext/rx/rx-client-guava/pom.xml b/ext/rx/rx-client-guava/pom.xml
index 51edcb7..c001705 100644
--- a/ext/rx/rx-client-guava/pom.xml
+++ b/ext/rx/rx-client-guava/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.rx</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-rx-client-guava</artifactId>
diff --git a/ext/rx/rx-client-guava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider b/ext/rx/rx-client-guava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider
deleted file mode 100644
index 4246699..0000000
--- a/ext/rx/rx-client-guava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider
+++ /dev/null
@@ -1 +0,0 @@
-org.glassfish.jersey.client.rx.guava.RxListenableFutureInvokerProvider
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava/pom.xml b/ext/rx/rx-client-rxjava/pom.xml
index b651824..0437fad 100644
--- a/ext/rx/rx-client-rxjava/pom.xml
+++ b/ext/rx/rx-client-rxjava/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.rx</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-rx-client-rxjava</artifactId>
diff --git a/ext/rx/rx-client-rxjava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider b/ext/rx/rx-client-rxjava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider
deleted file mode 100644
index 2e85ada..0000000
--- a/ext/rx/rx-client-rxjava/src/main/resources/META-INF/services/org.glassfish.jersey.client.rx.spi.RxInvokerProvider
+++ /dev/null
@@ -1 +0,0 @@
-org.glassfish.jersey.client.rx.rxjava.RxObservableInvokerProvider
\ No newline at end of file
diff --git a/ext/rx/rx-client-rxjava2/pom.xml b/ext/rx/rx-client-rxjava2/pom.xml
index 444ca22..31e0b78 100644
--- a/ext/rx/rx-client-rxjava2/pom.xml
+++ b/ext/rx/rx-client-rxjava2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.ext.rx</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-rx-client-rxjava2</artifactId>
diff --git a/ext/spring6/pom.xml b/ext/spring6/pom.xml
index d971f32..2f4b5bc 100644
--- a/ext/spring6/pom.xml
+++ b/ext/spring6/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-spring6</artifactId>
diff --git a/ext/wadl-doclet/pom.xml b/ext/wadl-doclet/pom.xml
index 99848a0..9f3b17e 100644
--- a/ext/wadl-doclet/pom.xml
+++ b/ext/wadl-doclet/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.ext</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jersey-wadl-doclet</artifactId>
diff --git a/incubator/cdi-inject-weld/pom.xml b/incubator/cdi-inject-weld/pom.xml
index e9123c8..bcd67ca 100644
--- a/incubator/cdi-inject-weld/pom.xml
+++ b/incubator/cdi-inject-weld/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi-inject-weld</artifactId>
@@ -39,6 +39,7 @@
--add-exports org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.binder.client=weld.core.impl
--add-exports org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld=weld.core.impl
--add-opens org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.binder.client=weld.core.impl
+ --add-opens org.glassfish.jersey.incubator.cdi.inject.weld/org.glassfish.jersey.inject.weld.internal.bean=weld.core.impl
</surefire.security.argline>
</properties>
diff --git a/incubator/cdi-inject-weld/src/main/java/module-info.java b/incubator/cdi-inject-weld/src/main/java/module-info.java
index 3bbb797..19f4ba9 100644
--- a/incubator/cdi-inject-weld/src/main/java/module-info.java
+++ b/incubator/cdi-inject-weld/src/main/java/module-info.java
@@ -36,6 +36,7 @@
weld.core.impl;
exports org.glassfish.jersey.inject.weld.managed to org.glassfish.jersey.core.common;
+ opens org.glassfish.jersey.inject.weld.internal.bean to weld.core.impl;
opens org.glassfish.jersey.inject.weld.internal.managed to weld.core.impl;
opens org.glassfish.jersey.inject.weld.internal.scope to weld.core.impl;
opens org.glassfish.jersey.inject.weld.managed to weld.core.impl;
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java
index 2cf81a0..ecbcc64 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/BeanHelper.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -149,8 +149,8 @@
public static <T> BindingBeanPair registerSupplier(RuntimeType runtimeType, SupplierClassBinding<T> binding,
AfterBeanDiscovery abd, Collection<InjectionResolver> resolvers, BeanManager beanManager) {
- Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass();
- AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass);
+ final Class<Supplier<T>> supplierClass = (Class<Supplier<T>>) binding.getSupplierClass();
+ final AnnotatedType<Supplier<T>> annotatedType = beanManager.createAnnotatedType(supplierClass);
final InjectionTargetFactory<Supplier<T>> injectionTargetFactory = beanManager.getInjectionTargetFactory(annotatedType);
final InjectionTarget<Supplier<T>> injectionTarget = injectionTargetFactory.createInjectionTarget(null);
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
index 1d9a9e3..fe4f2e8 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/bean/JerseyBean.java
@@ -173,7 +173,7 @@
@Override
public Class<?> getBeanClass() {
- return Object.class;
+ return getClass();
}
@Override
diff --git a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java
index 7dd99c8..9525848 100644
--- a/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java
+++ b/incubator/cdi-inject-weld/src/main/java/org/glassfish/jersey/inject/weld/internal/scope/RequestScopeBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, 2022 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/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/binder/client/ClientBindingsTest.java b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/binder/client/ClientBindingsTest.java
index 4b618d8..f2f9c51 100644
--- a/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/binder/client/ClientBindingsTest.java
+++ b/incubator/cdi-inject-weld/src/test/java/org/glassfish/jersey/inject/weld/binder/client/ClientBindingsTest.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -29,7 +29,6 @@
import org.glassfish.jersey.internal.inject.ServiceHolder;
import org.glassfish.jersey.internal.spi.AutoDiscoverable;
import org.glassfish.jersey.message.MessageBodyWorkers;
-import org.glassfish.jersey.message.internal.MessageBodyFactory;
import org.glassfish.jersey.spi.ContextResolvers;
import org.glassfish.jersey.spi.ExceptionMappers;
import org.junit.jupiter.api.Assertions;
@@ -96,7 +95,7 @@
injectionManager.completeRegistration();
// new AutoDiscoverableConfigurator(RuntimeType.CLIENT).init(injectionManager, new ClientBootstrapBag()); config
new ClientBootstrapPreinitialization().preregister(RuntimeType.CLIENT, injectionManager);
- assertMultiple(AutoDiscoverable.class, 2, "LoggingFeatureAutoDiscoverable");
+ assertOneInstance(AutoDiscoverable.class, "LoggingFeatureAutoDiscoverable");
}
@Test
diff --git a/incubator/declarative-linking/pom.xml b/incubator/declarative-linking/pom.xml
index f740318..76bef4d 100644
--- a/incubator/declarative-linking/pom.xml
+++ b/incubator/declarative-linking/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.ext</groupId>
diff --git a/incubator/gae-integration/pom.xml b/incubator/gae-integration/pom.xml
index f800ca7..abd7f9c 100644
--- a/incubator/gae-integration/pom.xml
+++ b/incubator/gae-integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-gae-integration</artifactId>
diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml
index 6f10e85..4b7b302 100644
--- a/incubator/html-json/pom.xml
+++ b/incubator/html-json/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.media</groupId>
diff --git a/incubator/injectless-client/pom.xml b/incubator/injectless-client/pom.xml
index 0ae3a3a..7bef517 100644
--- a/incubator/injectless-client/pom.xml
+++ b/incubator/injectless-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-injectless-client</artifactId>
diff --git a/incubator/kryo/pom.xml b/incubator/kryo/pom.xml
index baa8a3b..bc73752 100644
--- a/incubator/kryo/pom.xml
+++ b/incubator/kryo/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.media</groupId>
diff --git a/incubator/open-tracing/pom.xml b/incubator/open-tracing/pom.xml
index 750e19f..464f9aa 100644
--- a/incubator/open-tracing/pom.xml
+++ b/incubator/open-tracing/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.incubator</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.incubator</groupId>
diff --git a/incubator/pom.xml b/incubator/pom.xml
index 2678793..6bf5ed6 100644
--- a/incubator/pom.xml
+++ b/incubator/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.incubator</groupId>
diff --git a/inject/cdi2-se/pom.xml b/inject/cdi2-se/pom.xml
index 0a16ae1..7aa76f3 100644
--- a/inject/cdi2-se/pom.xml
+++ b/inject/cdi2-se/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-cdi2-se</artifactId>
diff --git a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java
index 86e97ab..d3148b1 100644
--- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java
+++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/RequestScopeBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022 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/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java
index b7bcd4f..b0b5bcf 100644
--- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java
+++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/BeanHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 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/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java
index d075202..4495647 100644
--- a/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java
+++ b/inject/cdi2-se/src/main/java/org/glassfish/jersey/inject/cdi/se/bean/JerseyBean.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -163,7 +163,7 @@
@Override
public Class<?> getBeanClass() {
- return Object.class;
+ return getClass();
}
@Override
diff --git a/inject/hk2/pom.xml b/inject/hk2/pom.xml
index 5c07508..e3fb11d 100644
--- a/inject/hk2/pom.xml
+++ b/inject/hk2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-hk2</artifactId>
diff --git a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/Hk2RequestScope.java b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/Hk2RequestScope.java
index e9437c4..2d66c16 100644
--- a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/Hk2RequestScope.java
+++ b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/Hk2RequestScope.java
@@ -139,7 +139,7 @@
*/
@Override
public void release() {
- if (referenceCounter.decrementAndGet() < 1) {
+ if (referenceCounter.decrementAndGet() == 0) {
try {
ArrayList<ForeignDescriptor> reverse = new ArrayList<>(store.keySet());
Collections.reverse(reverse);
diff --git a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/JerseyClassAnalyzer.java b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/JerseyClassAnalyzer.java
index bceaeda..d9963b5 100644
--- a/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/JerseyClassAnalyzer.java
+++ b/inject/hk2/src/main/java/org/glassfish/jersey/inject/hk2/JerseyClassAnalyzer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020 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
@@ -25,7 +25,6 @@
import java.security.PrivilegedAction;
import java.util.List;
import java.util.Set;
-import java.util.function.Supplier;
import jakarta.inject.Inject;
import jakarta.inject.Named;
@@ -35,9 +34,6 @@
import org.glassfish.jersey.internal.LocalizationMessages;
import org.glassfish.jersey.internal.inject.InjectionResolver;
import org.glassfish.jersey.internal.util.collection.ImmutableCollectors;
-import org.glassfish.jersey.internal.util.collection.LazyValue;
-import org.glassfish.jersey.internal.util.collection.Value;
-import org.glassfish.jersey.internal.util.collection.Values;
import org.glassfish.hk2.api.ClassAnalyzer;
import org.glassfish.hk2.api.MultiException;
@@ -79,33 +75,31 @@
@Override
protected void configure() {
- ClassAnalyzer defaultAnalyzer =
- serviceLocator.getService(ClassAnalyzer.class, ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME);
-
- Supplier<List<InjectionResolver>> resolvers = () -> serviceLocator.getAllServices(InjectionResolver.class);
-
- bind(new JerseyClassAnalyzer(defaultAnalyzer, resolvers))
+ bind(JerseyClassAnalyzer.class)
.analyzeWith(ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME)
.named(JerseyClassAnalyzer.NAME)
.to(ClassAnalyzer.class);
}
}
+ private final Set<Class> resolverAnnotations;
private final ClassAnalyzer defaultAnalyzer;
- private final LazyValue<Set<Class>> resolverAnnotations;
+
/**
* Injection constructor.
*
- * @param defaultAnalyzer default HK2 class analyzer.
- * @param supplierResolvers configured injection resolvers.
+ * @param serviceLocator current injection manager.
*/
- private JerseyClassAnalyzer(ClassAnalyzer defaultAnalyzer, Supplier<List<InjectionResolver>> supplierResolvers) {
- this.defaultAnalyzer = defaultAnalyzer;
- Value<Set<Class>> resolvers = () -> supplierResolvers.get().stream()
+ @Inject
+ public JerseyClassAnalyzer(ServiceLocator serviceLocator) {
+ defaultAnalyzer = serviceLocator.getService(ClassAnalyzer.class, ClassAnalyzer.DEFAULT_IMPLEMENTATION_NAME);
+ // Load the resolver annotations once to avoid potential deadlock later
+ // See https://github.com/eclipse-ee4j/jersey/issues/5996
+ List<InjectionResolver> resolvers = serviceLocator.getAllServices(InjectionResolver.class);
+ this.resolverAnnotations = resolvers.stream()
.filter(InjectionResolver::isConstructorParameterIndicator)
.map(InjectionResolver::getAnnotation)
.collect(ImmutableCollectors.toImmutableSet());
- this.resolverAnnotations = Values.lazy(resolvers);
}
@SuppressWarnings("unchecked")
@@ -186,7 +180,7 @@
final int paramSize = constructor.getParameterTypes().length;
- if (paramSize != 0 && resolverAnnotations.get().isEmpty()) {
+ if (paramSize != 0 && resolverAnnotations.isEmpty()) {
return false;
}
@@ -200,7 +194,7 @@
for (final Annotation[] paramAnnotations : constructor.getParameterAnnotations()) {
boolean found = false;
for (final Annotation paramAnnotation : paramAnnotations) {
- if (resolverAnnotations.get().contains(paramAnnotation.annotationType())) {
+ if (resolverAnnotations.contains(paramAnnotation.annotationType())) {
found = true;
break;
}
diff --git a/inject/pom.xml b/inject/pom.xml
index 53987ba..114b68a 100644
--- a/inject/pom.xml
+++ b/inject/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.inject</groupId>
diff --git a/media/jaxb/pom.xml b/media/jaxb/pom.xml
index c4cd8c6..a748c3b 100644
--- a/media/jaxb/pom.xml
+++ b/media/jaxb/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-jaxb</artifactId>
diff --git a/media/json-binding/pom.xml b/media/json-binding/pom.xml
index e2681e5..e21b7cb 100644
--- a/media/json-binding/pom.xml
+++ b/media/json-binding/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-json-binding</artifactId>
diff --git a/media/json-gson/pom.xml b/media/json-gson/pom.xml
index c0c2279..89d595c 100644
--- a/media/json-gson/pom.xml
+++ b/media/json-gson/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-json-gson</artifactId>
diff --git a/media/json-jackson/pom.xml b/media/json-jackson/pom.xml
index 752954d..44552d6 100644
--- a/media/json-jackson/pom.xml
+++ b/media/json-jackson/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-json-jackson</artifactId>
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 350be25..d86fa8b 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
@@ -6,7 +6,10 @@
import java.io.Reader;
import java.io.Writer;
import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
import java.lang.reflect.Type;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -18,9 +21,12 @@
import jakarta.ws.rs.core.NoContentException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.StreamingOutput;
+import jakarta.ws.rs.ext.ContextResolver;
import jakarta.ws.rs.ext.MessageBodyReader;
import jakarta.ws.rs.ext.MessageBodyWriter;
+import jakarta.ws.rs.ext.Providers;
+import com.fasterxml.jackson.core.PrettyPrinter;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.AnnotationBundleKey;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.Annotations;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.cfg.EndpointConfigBase;
@@ -216,12 +222,13 @@
protected ProviderBase() {
this(null);
}
+
/**
* @since 2.17
*/
protected ProviderBase(MAPPER_CONFIG mconfig,
- LookupCache<AnnotationBundleKey, EP_CONFIG> readerCache,
- LookupCache<AnnotationBundleKey, EP_CONFIG> writerCache)
+ LookupCache<AnnotationBundleKey, EP_CONFIG> readerCache,
+ LookupCache<AnnotationBundleKey, EP_CONFIG> writerCache)
{
_mapperConfig = mconfig;
_jaxRSFeatures = JAXRS_FEATURE_DEFAULTS;
@@ -612,7 +619,12 @@
try {
// Want indentation?
if (writer.isEnabled(SerializationFeature.INDENT_OUTPUT)) {
- g.useDefaultPrettyPrinter();
+ PrettyPrinter defaultPrettyPrinter = writer.getConfig().getDefaultPrettyPrinter();
+ if (defaultPrettyPrinter != null) {
+ g.setPrettyPrinter(defaultPrettyPrinter);
+ } else {
+ g.useDefaultPrettyPrinter();
+ }
}
JavaType rootType = null;
@@ -999,6 +1011,24 @@
/**********************************************************
*/
+ // @since 2.19
+ protected <OM extends ObjectMapper> OM _locateMapperViaProvider(Class<?> type, MediaType mediaType,
+ Class<OM> mapperType, Providers providers) {
+ if (providers != null) {
+ ContextResolver<OM> resolver = providers.getContextResolver(mapperType, mediaType);
+ // Above should work as is, but due to this bug
+ // [https://jersey.dev.java.net/issues/show_bug.cgi?id=288]
+ // in Jersey, it doesn't. But this works until resolution of the issue:
+ if (resolver == null) {
+ resolver = providers.getContextResolver(mapperType, null);
+ }
+ if (resolver != null) {
+ return resolver.getContext(type);
+ }
+ }
+ return null;
+ }
+
protected static boolean _containedIn(Class<?> mainType, HashSet<ClassKey> set)
{
if (set != null) {
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 13f9275..93a5192 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
@@ -19,6 +19,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.ObjectWriter;
+import com.fasterxml.jackson.databind.json.JsonMapper;
/**
* Basic implementation of JAX-RS abstractions ({@link MessageBodyReader},
@@ -207,21 +208,12 @@
@Override
protected ObjectMapper _locateMapperViaProvider(Class<?> type, MediaType mediaType)
{
- if (_providers != null) {
- ContextResolver<ObjectMapper> resolver = _providers.getContextResolver(ObjectMapper.class, mediaType);
- /* Above should work as is, but due to this bug
- * [https://jersey.dev.java.net/issues/show_bug.cgi?id=288]
- * in Jersey, it doesn't. But this works until resolution of
- * the issue:
- */
- if (resolver == null) {
- resolver = _providers.getContextResolver(ObjectMapper.class, null);
- }
- if (resolver != null) {
- return resolver.getContext(type);
- }
+ // 26-Nov-2024, tatu: [jakarta-rs#36] Look for JsonMapper primarily
+ ObjectMapper m =_locateMapperViaProvider(type, mediaType, JsonMapper.class, _providers);
+ if (m == null) {
+ m = _locateMapperViaProvider(type, mediaType, ObjectMapper.class, _providers);
}
- return null;
+ return m;
}
@Override
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 fd5d9aa..3325c5e 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
@@ -10,6 +10,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
import com.fasterxml.jackson.module.jakarta.xmlbind.JakartaXmlBindAnnotationIntrospector;
+import com.fasterxml.jackson.databind.json.JsonMapper;
/**
* Helper class used to encapsulate details of configuring an
@@ -49,7 +50,7 @@
_lock.lock();
try {
if (_defaultMapper == null) {
- _defaultMapper = new ObjectMapper();
+ _defaultMapper = new JsonMapper();
_setAnnotations(_defaultMapper, _defaultAnnotationsToUse);
}
} finally {
@@ -77,7 +78,7 @@
_lock.lock();
try {
if (_mapper == null) {
- _mapper = new ObjectMapper();
+ _mapper = new JsonMapper();
_setAnnotations(_mapper, _defaultAnnotationsToUse);
}
} finally {
@@ -120,9 +121,8 @@
case JACKSON:
return new JacksonAnnotationIntrospector();
case JAXB:
- /* For this, need to use indirection just so that error occurs
- * when we get here, and not when this class is being loaded
- */
+ // For this, need to use indirection just so that error occurs
+ // when we get here, and not when this class is being loaded
try {
if (_jaxbIntrospectorClass == null) {
_jaxbIntrospectorClass = JakartaXmlBindAnnotationIntrospector.class;
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 44c9073..a7c123c 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.18.0", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
+ "2.19.1", "com.fasterxml.jackson.jaxrs", "jackson-jaxrs-json-provider");
@Override
public Version version() {
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 d893c65..d9b20ee 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.18.0
+Jackson JAX-RS Providers version 2.19.1
* 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-jettison/pom.xml b/media/json-jettison/pom.xml
index a397fff..2d10e95 100644
--- a/media/json-jettison/pom.xml
+++ b/media/json-jettison/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-json-jettison</artifactId>
diff --git a/media/json-processing/pom.xml b/media/json-processing/pom.xml
index 31c1d08..c15f8fa 100644
--- a/media/json-processing/pom.xml
+++ b/media/json-processing/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-json-processing</artifactId>
diff --git a/media/moxy/pom.xml b/media/moxy/pom.xml
index 5558c7b..eefd442 100644
--- a/media/moxy/pom.xml
+++ b/media/moxy/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-moxy</artifactId>
diff --git a/media/moxy/src/main/java/module-info.java b/media/moxy/src/main/java/module-info.java
index 2fc7daa..7d7f953 100644
--- a/media/moxy/src/main/java/module-info.java
+++ b/media/moxy/src/main/java/module-info.java
@@ -38,6 +38,7 @@
opens org.glassfish.jersey.moxy.json.internal to
org.glassfish.hk2.locator,
org.glassfish.hk2.utilities,
+ org.glassfish.jersey.core.common,
org.glassfish.jersey.core.client,
org.glassfish.jersey.incubator.cdi.inject.weld,
org.glassfish.jersey.inject.cdi2.se,
diff --git a/media/multipart/pom.xml b/media/multipart/pom.xml
index 0451347..9aa2cd3 100644
--- a/media/multipart/pom.xml
+++ b/media/multipart/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-multipart</artifactId>
diff --git a/media/pom.xml b/media/pom.xml
index 14a0fc2..3d988b7 100644
--- a/media/pom.xml
+++ b/media/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.media</groupId>
diff --git a/media/sse/pom.xml b/media/sse/pom.xml
index 97db1e1..bcf856d 100644
--- a/media/sse/pom.xml
+++ b/media/sse/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-media-sse</artifactId>
diff --git a/pom.xml b/pom.xml
index 5b7a417..889be49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
<packaging>pom</packaging>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<name>jersey</name>
<description>
Eclipse Jersey is the open source (under dual EPL+GPL license) Jakarta RESTful WebServices 3.0
@@ -697,6 +697,7 @@
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
<_noimportjava>true</_noimportjava>
<_nodefaultversion>false</_nodefaultversion>
+ <_noimportjava>true</_noimportjava>
<Include-Resource>{maven-resources},${project.build.directory}/legal</Include-Resource>
</instructions>
</configuration>
@@ -799,6 +800,31 @@
</pluginManagement>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>flatten-maven-plugin</artifactId>
+ <version>1.7.2</version>
+ <configuration>
+ <updatePomFile>true</updatePomFile>
+ <flattenMode>resolveCiFriendliesOnly</flattenMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>flatten</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>flatten</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>flatten.clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-maven-plugin</artifactId>
<version>1.0</version>
@@ -2080,11 +2106,11 @@
<artifactId>opentracing-util</artifactId>
<version>${opentracing.version}</version>
</dependency>
-
</dependencies>
</dependencyManagement>
<properties>
+ <revision>4.0.99-SNAPSHOT</revision>
<archetype.mvn.plugin.version>3.4.0</archetype.mvn.plugin.version>
<findbugs.skip>false</findbugs.skip>
@@ -2115,9 +2141,9 @@
<mvn.ant.version>1.10.15</mvn.ant.version>
<assembly.mvn.plugin.version>3.7.1</assembly.mvn.plugin.version>
<clean.mvn.plugin.version>3.5.0</clean.mvn.plugin.version>
- <enforcer.mvn.plugin.version>3.5.0</enforcer.mvn.plugin.version>
- <exec.mvn.plugin.version>3.5.0</exec.mvn.plugin.version>
- <buildhelper.mvn.plugin.version>3.6.0</buildhelper.mvn.plugin.version>
+ <enforcer.mvn.plugin.version>3.6.1</enforcer.mvn.plugin.version>
+ <exec.mvn.plugin.version>3.5.1</exec.mvn.plugin.version>
+ <buildhelper.mvn.plugin.version>3.6.1</buildhelper.mvn.plugin.version>
<buildnumber.mvn.plugin.version>3.2.1</buildnumber.mvn.plugin.version>
<checkstyle.mvn.plugin.version>3.6.0</checkstyle.mvn.plugin.version>
<checkstyle.version>10.21.4</checkstyle.version>
@@ -2125,7 +2151,7 @@
<cyclonedx.mvn.plugin.version>2.8.1</cyclonedx.mvn.plugin.version>
<dependency.mvn.plugin.version>3.8.1</dependency.mvn.plugin.version>
<deploy.mvn.plugin.version>3.1.4</deploy.mvn.plugin.version>
- <ear.mvn.plugin.version>3.3.0</ear.mvn.plugin.version>
+ <ear.mvn.plugin.version>3.4.0</ear.mvn.plugin.version>
<failsafe.mvn.plugin.version>3.5.3</failsafe.mvn.plugin.version>
<felix.mvn.plugin.version>5.1.9</felix.mvn.plugin.version> <!-- newer versions are not supported by JDK 11- -->
<findbugs.mvn.plugin.version>3.0.5</findbugs.mvn.plugin.version>
@@ -2153,7 +2179,7 @@
<arquillian.weld.version>4.0.0.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.8</asm.version>
+ <asm.version>9.9</asm.version>
<!--required for spring (ext) modules integration -->
<aspectj.weaver.version>1.9.24</aspectj.weaver.version>
<!-- <bnd.plugin.version>2.3.6</bnd.plugin.version>-->
@@ -2167,7 +2193,7 @@
<felix.framework.version>7.0.5</felix.framework.version>
<findbugs.glassfish.version>1.7</findbugs.glassfish.version>
<freemarker.version>2.3.34</freemarker.version>
- <gae.version>2.0.36</gae.version>
+ <gae.version>2.0.38</gae.version>
<groovy.version>5.0.0-alpha-12</groovy.version>
<gson.version>2.13.1</gson.version>
@@ -2187,18 +2213,18 @@
<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.12</helidon.config.version>
- <helidon.container.version>4.2.4</helidon.container.version>
+ <helidon.container.version>4.3.1</helidon.container.version>
<helidon3.connector.version>3.2.12</helidon3.connector.version>
- <helidon.connector.version>4.2.4</helidon.connector.version>
+ <helidon.connector.version>4.3.1</helidon.connector.version>
<helidon.config.11.version>1.4.15</helidon.config.11.version> <!-- JDK 11- support -->
<smallrye.config.version>3.9.1</smallrye.config.version>
<guava.version>33.4.8-jre</guava.version>
<hamcrest.version>3.0</hamcrest.version>
- <xmlunit.version>2.10.0</xmlunit.version>
+ <xmlunit.version>2.10.3</xmlunit.version>
<httpclient.version>4.5.14</httpclient.version>
- <httpclient5.version>5.3.1</httpclient5.version>
- <jackson.version>2.18.0</jackson.version>
+ <httpclient5.version>5.5</httpclient5.version>
+ <jackson.version>2.19.1</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>
@@ -2206,13 +2232,13 @@
<jmh.version>1.37</jmh.version>
<jmockit.version>1.49</jmockit.version>
<junit4.version>4.13.2</junit4.version>
- <junit5.version>5.12.2</junit5.version>
+ <junit5.version>5.13.4</junit5.version>
<junit-platform-suite.version>1.13.4</junit-platform-suite.version>
<junit-platform-suite.legacy.version>1.10.0</junit-platform-suite.legacy.version>
<kryo.version>4.0.3</kryo.version>
<mockito.version>4.11.0</mockito.version> <!-- CQ 17673 -->
<mustache.version>0.9.14</mustache.version>
- <netty.version>4.1.122.Final</netty.version>
+ <netty.version>4.1.126.Final</netty.version>
<opentracing.version>0.33.0</opentracing.version>
<osgi.version>6.0.0</osgi.version>
<osgi.framework.version>1.10.0</osgi.framework.version>
@@ -2231,7 +2257,7 @@
<servlet6.version>6.1.0</servlet6.version>
<slf4j.version>2.0.17</slf4j.version>
- <spring6.version>6.0.23</spring6.version>
+ <spring6.version>6.2.11</spring6.version>
<testng.version>7.11.0</testng.version>
<testng6.version>6.14.3</testng6.version>
<thymeleaf.version>3.1.3.RELEASE</thymeleaf.version>
@@ -2285,16 +2311,16 @@
<jaxrs.api.impl.version>4.0.0</jaxrs.api.impl.version>
<jakarta.rest.osgi.version>jakarta.ws.rs;version="[3.1,5)",jakarta.ws.rs.client;version="[3.1,5)",jakarta.ws.rs.container;version="[3.1,5)",jakarta.ws.rs.core;version="[3.1,5)",jakarta.ws.rs.ext;version="[3.1,5)",jakarta.ws.rs.sse;version="[3.1,5)"</jakarta.rest.osgi.version>
<jetty.osgi.version>org.eclipse.jetty.*;version="[11,15)"</jetty.osgi.version>
- <jetty.version>12.0.22</jetty.version>
- <jetty9.version>9.4.57.v20241219</jetty9.version>
+ <jetty.version>12.0.27</jetty.version>
+ <jetty9.version>9.4.58.v20250814</jetty9.version>
<jetty.servlet.api.version>5.0.2</jetty.servlet.api.version>
- <jetty11.version>11.0.25</jetty11.version>
+ <jetty11.version>11.0.26</jetty11.version>
<jetty.plugin.version>12.0.22</jetty.plugin.version>
<jsonb.api.version>3.0.1</jsonb.api.version>
<jsonp.ri.version>1.1.7</jsonp.ri.version>
<jsonp.jaxrs.version>1.1.7</jsonp.jaxrs.version>
<moxy.version>5.0.0-B09</moxy.version>
- <moxy.asm.version>9.8.0</moxy.asm.version>
+ <moxy.asm.version>9.9.0</moxy.asm.version>
<yasson.version>3.0.4</yasson.version>
<!-- END of Jakartified -->
diff --git a/security/oauth1-client/pom.xml b/security/oauth1-client/pom.xml
index 136e498..7f65243 100644
--- a/security/oauth1-client/pom.xml
+++ b/security/oauth1-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>oauth1-client</artifactId>
diff --git a/security/oauth1-server/pom.xml b/security/oauth1-server/pom.xml
index 6ad7be9..f868bd9 100644
--- a/security/oauth1-server/pom.xml
+++ b/security/oauth1-server/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>oauth1-server</artifactId>
diff --git a/security/oauth1-signature/pom.xml b/security/oauth1-signature/pom.xml
index 600d813..1eacf56 100644
--- a/security/oauth1-signature/pom.xml
+++ b/security/oauth1-signature/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/security/oauth2-client/pom.xml b/security/oauth2-client/pom.xml
index d7fd082..83f2c83 100644
--- a/security/oauth2-client/pom.xml
+++ b/security/oauth2-client/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.glassfish.jersey.security</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/security/pom.xml b/security/pom.xml
index 6d3bed0..81166cd 100644
--- a/security/pom.xml
+++ b/security/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.security</groupId>
diff --git a/test-framework/core/pom.xml b/test-framework/core/pom.xml
index 63caaad..41fd6f8 100644
--- a/test-framework/core/pom.xml
+++ b/test-framework/core/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-core</artifactId>
diff --git a/test-framework/maven/container-runner-maven-plugin/pom.xml b/test-framework/maven/container-runner-maven-plugin/pom.xml
index 1376c78..ed43163 100644
--- a/test-framework/maven/container-runner-maven-plugin/pom.xml
+++ b/test-framework/maven/container-runner-maven-plugin/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.maven</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>container-runner-maven-plugin</artifactId>
diff --git a/test-framework/maven/custom-enforcer-rules/pom.xml b/test-framework/maven/custom-enforcer-rules/pom.xml
index aed6ccc..824376c 100644
--- a/test-framework/maven/custom-enforcer-rules/pom.xml
+++ b/test-framework/maven/custom-enforcer-rules/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.maven</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>custom-enforcer-rules</artifactId>
diff --git a/test-framework/maven/pom.xml b/test-framework/maven/pom.xml
index 742e830..6f1396a 100644
--- a/test-framework/maven/pom.xml
+++ b/test-framework/maven/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.test-framework.maven</groupId>
diff --git a/test-framework/memleak-test-common/pom.xml b/test-framework/memleak-test-common/pom.xml
index b09ef2a..53136c5 100644
--- a/test-framework/memleak-test-common/pom.xml
+++ b/test-framework/memleak-test-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>memleak-test-common</artifactId>
diff --git a/test-framework/pom.xml b/test-framework/pom.xml
index a827fe3..345b691 100644
--- a/test-framework/pom.xml
+++ b/test-framework/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
diff --git a/test-framework/providers/bundle/pom.xml b/test-framework/providers/bundle/pom.xml
index 3842684..6303ab2 100644
--- a/test-framework/providers/bundle/pom.xml
+++ b/test-framework/providers/bundle/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-bundle</artifactId>
@@ -70,4 +70,19 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>helidon-container</id>
+ <activation>
+ <jdk>[21,)</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-helidon</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
diff --git a/test-framework/providers/external/pom.xml b/test-framework/providers/external/pom.xml
index 7734c8f..e5c48ae 100644
--- a/test-framework/providers/external/pom.xml
+++ b/test-framework/providers/external/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-external</artifactId>
diff --git a/test-framework/providers/grizzly2/pom.xml b/test-framework/providers/grizzly2/pom.xml
index 1617324..962eea9 100644
--- a/test-framework/providers/grizzly2/pom.xml
+++ b/test-framework/providers/grizzly2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
diff --git a/test-framework/providers/helidon-http/pom.xml b/test-framework/providers/helidon-http/pom.xml
index aec77c2..bdc45fc 100644
--- a/test-framework/providers/helidon-http/pom.xml
+++ b/test-framework/providers/helidon-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-helidon</artifactId>
@@ -43,6 +43,17 @@
<artifactId>jersey-container-helidon-http</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>io.helidon.webserver</groupId>
+ <artifactId>helidon-webserver</artifactId>
+ <version>${helidon.container.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.helidon.service</groupId>
+ <artifactId>helidon-service-registry</artifactId>
+ <version>${helidon.container.version}</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/test-framework/providers/inmemory/pom.xml b/test-framework/providers/inmemory/pom.xml
index 08f85ab..7fe628f 100644
--- a/test-framework/providers/inmemory/pom.xml
+++ b/test-framework/providers/inmemory/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-inmemory</artifactId>
diff --git a/test-framework/providers/jdk-http/pom.xml b/test-framework/providers/jdk-http/pom.xml
index f90829b..7ee4fee 100644
--- a/test-framework/providers/jdk-http/pom.xml
+++ b/test-framework/providers/jdk-http/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-jdk-http</artifactId>
diff --git a/test-framework/providers/jetty-http2/pom.xml b/test-framework/providers/jetty-http2/pom.xml
index 99fd5ae..7d88580 100644
--- a/test-framework/providers/jetty-http2/pom.xml
+++ b/test-framework/providers/jetty-http2/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/test-framework/providers/jetty/pom.xml b/test-framework/providers/jetty/pom.xml
index 34c0d04..6f41054 100644
--- a/test-framework/providers/jetty/pom.xml
+++ b/test-framework/providers/jetty/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/test-framework/providers/netty/pom.xml b/test-framework/providers/netty/pom.xml
index 4b5e232..08de714 100644
--- a/test-framework/providers/netty/pom.xml
+++ b/test-framework/providers/netty/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-provider-netty</artifactId>
diff --git a/test-framework/providers/pom.xml b/test-framework/providers/pom.xml
index 0f6a8dd..3f77ae1 100644
--- a/test-framework/providers/pom.xml
+++ b/test-framework/providers/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
diff --git a/test-framework/util/pom.xml b/test-framework/util/pom.xml
index a81df23..c5393be 100644
--- a/test-framework/util/pom.xml
+++ b/test-framework/util/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-test-framework-util</artifactId>
@@ -59,6 +59,12 @@
<artifactId>junit-platform-engine</artifactId>
<scope>test</scope>
</dependency>
+ <dependency> <!--added due to an issue in JUnit 5 dependencies for junit-vintage-engine -->
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <version>${junit-platform-suite.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -71,6 +77,12 @@
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit5.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
</plugin>
diff --git a/tests/e2e-client/pom.xml b/tests/e2e-client/pom.xml
index 8fb4953..e85ea7f 100644
--- a/tests/e2e-client/pom.xml
+++ b/tests/e2e-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-client</artifactId>
@@ -247,6 +247,18 @@
<profiles>
<profile>
+ <id>jdk26+</id>
+ <activation>
+ <jdk>[26,)</jdk>
+ </activation>
+ <properties>
+ <surefire.security.argline>
+ -Djdk.tls.server.protocols=TLSv1.2
+ -Djava.security.properties=${project.build.directory}/test-classes/disabled_tls.properties
+ </surefire.security.argline>
+ </properties>
+ </profile>
+ <profile>
<id>xdk</id>
<properties>
<!-- do not use security manager for xdk -->
diff --git a/tests/e2e-client/src/test/resources/disabled_tls.properties b/tests/e2e-client/src/test/resources/disabled_tls.properties
new file mode 100644
index 0000000..41cb0b9
--- /dev/null
+++ b/tests/e2e-client/src/test/resources/disabled_tls.properties
@@ -0,0 +1,19 @@
+#
+# 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
+# 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
+#
+
+jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \
+ MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
+ ECDH
\ No newline at end of file
diff --git a/tests/e2e-core-common/pom.xml b/tests/e2e-core-common/pom.xml
index 1eb2ec9..8d8541e 100644
--- a/tests/e2e-core-common/pom.xml
+++ b/tests/e2e-core-common/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-core-common</artifactId>
diff --git a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/process/internal/RequestScopeTest.java b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/process/internal/RequestScopeTest.java
index d0488fa..6a875a8 100644
--- a/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/process/internal/RequestScopeTest.java
+++ b/tests/e2e-core-common/src/test/java/org/glassfish/jersey/tests/e2e/common/process/internal/RequestScopeTest.java
@@ -17,6 +17,7 @@
package org.glassfish.jersey.tests.e2e.common.process.internal;
import java.lang.reflect.Type;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
@@ -171,12 +172,67 @@
Assertions.assertEquals(987654321, instanceRelease.get());
}
+ @Test
+ public void testMultipleReleases() throws InterruptedException {
+ final RequestScope requestScope = new Hk2RequestScope();
+ final AtomicBoolean passed = new AtomicBoolean(true);
+ final int CNT = 200;
+ Thread[] thread = new Thread[CNT];
+ Hk2RequestScope.Instance instance = requestScope.runInScope(() -> {
+ final Hk2RequestScope.Instance internalInstance = (Hk2RequestScope.Instance) requestScope.current();
+ for (int index = 1; index != CNT; index++) {
+ TestProvider testProvider = new TestProvider(String.valueOf(index)) {
+ @Override
+ public int hashCode() {
+ return super.hashCode() + Integer.parseInt(id);
+ }
+ };
+ final ForeignDescriptor fd = ForeignDescriptor.wrap(testProvider, new Consumer<Object>() {
+ @Override
+ public void accept(Object o) {
+ // noop
+ }
+ });
+ internalInstance.put(fd, String.valueOf(index));
+
+ for (int i = 0; i != CNT; i++) {
+ thread[i] = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ final long waitTime = (int) (Math.random() * 5 + 1) * 10L;
+ try {
+ Thread.sleep(waitTime);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ internalInstance.release();
+ } catch (Throwable throwable) {
+ passed.set(false);
+ }
+ }
+ });
+ }
+ for (int i = 0; i != CNT; i++) {
+ thread[i].start();
+ }
+ }
+ return internalInstance;
+ });
+
+ for (int i = 0; i != CNT; i++) {
+ thread[i].join();
+ }
+
+ Assertions.assertTrue(passed.get());
+ }
+
/**
* Test request scope inhabitant.
*/
public static class TestProvider extends AbstractActiveDescriptor<String> {
- private final String id;
+ public final String id;
public TestProvider(final String id) {
super();
diff --git a/tests/e2e-entity/pom.xml b/tests/e2e-entity/pom.xml
index 6c8a328..3de49a0 100644
--- a/tests/e2e-entity/pom.xml
+++ b/tests/e2e-entity/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-entity</artifactId>
diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/ContextResolverMediaTypeTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/ContextResolverMediaTypeTest.java
index f7cfe15..66a2c7c 100644
--- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/ContextResolverMediaTypeTest.java
+++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/ContextResolverMediaTypeTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 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
@@ -134,7 +134,7 @@
}
@Nested
- public static class ProduceTest extends JerseyTest {
+ class ProduceTest extends JerseyTest {
@Override
protected Application configure() {
@@ -161,7 +161,7 @@
}
@Nested
- public static class ProducesTest extends JerseyTest {
+ class ProducesTest extends JerseyTest {
@Override
protected Application configure() {
@@ -188,7 +188,7 @@
}
@Nested
- public static class ProducesSeparateTest extends JerseyTest {
+ class ProducesSeparateTest extends JerseyTest {
@Override
protected Application configure() {
@@ -216,7 +216,7 @@
}
@Nested
- public static class ProducesXXXTest extends JerseyTest {
+ class ProducesXXXTest extends JerseyTest {
@Override
protected Application configure() {
diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EmptyRequestWithJaxbTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EmptyRequestWithJaxbTest.java
index 74e4613..4577bcc 100644
--- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EmptyRequestWithJaxbTest.java
+++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/EmptyRequestWithJaxbTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 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
@@ -96,7 +96,7 @@
}
@Nested
- public static class EmptyRequestTest extends JerseyTest {
+ class EmptyRequestTest extends JerseyTest {
@Override
protected Application configure() {
@@ -162,7 +162,7 @@
}
@Nested
- public static class MappedJettisonCRTest extends JerseyTest {
+ class MappedJettisonCRTest extends JerseyTest {
@Override
protected Application configure() {
@@ -174,7 +174,7 @@
config.register(JettisonFeature.class);
}
- public static class MappedJettisonCR extends CR {
+ class MappedJettisonCR extends CR {
protected JAXBContext configure(Class[] classes) throws JAXBException {
return new JettisonJaxbContext(JettisonConfig.mappedJettison().build(), classes);
@@ -188,7 +188,7 @@
}
@Nested
- public static class BadgerFishCRTest extends JerseyTest {
+ class BadgerFishCRTest extends JerseyTest {
@Override
protected Application configure() {
@@ -200,7 +200,7 @@
config.register(JettisonFeature.class);
}
- public static class BadgerFishCR extends CR {
+ class BadgerFishCR extends CR {
protected JAXBContext configure(Class[] classes) throws JAXBException {
return new JettisonJaxbContext(JettisonConfig.badgerFish().build(), classes);
diff --git a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JAXBContextResolverTest.java b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JAXBContextResolverTest.java
index e56763f..a6b1a42 100644
--- a/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JAXBContextResolverTest.java
+++ b/tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/entity/JAXBContextResolverTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2022 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
@@ -191,7 +191,7 @@
}
@Nested
- public static class UnmarshallerTest extends AbstractTypeTester {
+ class UnmarshallerTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private MarshallerResolver mr;
@@ -244,7 +244,7 @@
}
@Nested
- public static class JAXBContextAppTest extends AbstractTypeTester {
+ class JAXBContextAppTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private JAXBContextResolverApp crApp;
@@ -266,7 +266,7 @@
}
@Nested
- public static class UnmarshallerAppTest extends AbstractTypeTester {
+ class UnmarshallerAppTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private MarshallerResolver mr;
@@ -330,7 +330,7 @@
}
@Nested
- public static class JAXBContextTextTest extends AbstractTypeTester {
+ class JAXBContextTextTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private JAXBContextResolverText crText;
@@ -351,7 +351,7 @@
}
@Nested
- public static class UnmarshallerTextTest extends AbstractTypeTester {
+ class UnmarshallerTextTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private MarshallerResolver mr;
@@ -400,7 +400,7 @@
}
@Nested
- public static class UnmarshallerFooTest extends AbstractTypeTester {
+ class UnmarshallerFooTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private MarshallerResolver mr;
@@ -465,7 +465,7 @@
}
@Nested
- public static class JAXBContextAllTest extends AbstractTypeTester {
+ class JAXBContextAllTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private JAXBContextResolverApp crApp;
@@ -501,7 +501,7 @@
}
@Nested
- public static class UnmarshallerAllTest extends AbstractTypeTester {
+ class UnmarshallerAllTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private JAXBContextResolverApp crApp;
@@ -616,7 +616,7 @@
}
@Nested
- public static class JAXBContextAllWithOtherJaxbBeanTest extends AbstractTypeTester {
+ class JAXBContextAllWithOtherJaxbBeanTest extends AbstractTypeTester {
private JAXBContextResolver cr;
private JAXBContextResolverApp crApp;
diff --git a/tests/e2e-inject/cdi-inject-weld/pom.xml b/tests/e2e-inject/cdi-inject-weld/pom.xml
index 2c9c334..13505a6 100644
--- a/tests/e2e-inject/cdi-inject-weld/pom.xml
+++ b/tests/e2e-inject/cdi-inject-weld/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>e2e-inject</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-inject-cdi-inject-weld</artifactId>
diff --git a/tests/e2e-inject/cdi2-se/pom.xml b/tests/e2e-inject/cdi2-se/pom.xml
index 745b684..de7f5ff 100644
--- a/tests/e2e-inject/cdi2-se/pom.xml
+++ b/tests/e2e-inject/cdi2-se/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>e2e-inject</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-inject-cdi2-se</artifactId>
diff --git a/tests/e2e-inject/cdi2-se/src/main/java/module-info.java b/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
index bbb8949..28c8162 100644
--- a/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
+++ b/tests/e2e-inject/cdi2-se/src/main/java/module-info.java
@@ -25,6 +25,7 @@
requires weld.core.impl;
exports org.glassfish.jersey.tests.e2e.inject.cdi.se;
+ exports org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000;
exports org.glassfish.jersey.tests.e2e.inject.cdi.se.scopes;
exports org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources;
@@ -36,4 +37,5 @@
org.glassfish.jersey.inject.cdi2.se,
weld.core.impl;
opens org.glassfish.jersey.tests.e2e.inject.cdi.se.subresources to weld.core.impl;
+ opens org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000 to weld.core.impl;
}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingService.java b/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingService.java
new file mode 100644
index 0000000..e42df16
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingService.java
@@ -0,0 +1,25 @@
+/*
+ * 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.e2e.inject.cdi.se.j6000;
+
+import jakarta.ws.rs.core.Response;
+
+public interface PingService {
+ String HELLO_WORLD = "Hello world!";
+
+ Response ping();
+}
diff --git a/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingServiceImpl.java b/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingServiceImpl.java
new file mode 100644
index 0000000..c99f423
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/main/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/j6000/PingServiceImpl.java
@@ -0,0 +1,34 @@
+/*
+ * 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.e2e.inject.cdi.se.j6000;
+
+import jakarta.enterprise.context.RequestScoped;
+import jakarta.ws.rs.core.Response;
+
+@RequestScoped
+public class PingServiceImpl implements PingService {
+ @Override
+ public Response ping() {
+ Package pkg = getClass().getPackage();
+ String str = HELLO_WORLD //
+ + "\n\nImplementation-Title: " + pkg.getImplementationTitle() //
+ + "\nImplementation-Version: " + pkg.getImplementationVersion() //
+ + "\nImplementation-Vendor: " + pkg.getImplementationVendor();
+
+ return Response.ok().entity(str).build();
+ }
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml b/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml
index c2146b4..6591a9a 100644
--- a/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml
+++ b/tests/e2e-inject/cdi2-se/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2017, 2022 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/cdi2-se/src/test/java/module-info.java b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
index ed920e3..7a3fdbc 100644
--- a/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
+++ b/tests/e2e-inject/cdi2-se/src/test/java/module-info.java
@@ -15,6 +15,8 @@
*/
open module org.glassfish.jersey.tests.e2e.inject.cdi2.se.test {
+ requires jakarta.cdi;
+ requires jakarta.inject;
requires jakarta.ws.rs;
requires java.logging;
requires org.glassfish.jersey.core.common;
@@ -22,6 +24,7 @@
requires org.glassfish.jersey.tests.framework.core;
requires org.junit.jupiter.api;
requires org.glassfish.jersey.tests.e2e.inject.cdi2.se.main;
+ requires weld.api;
exports org.glassfish.jersey.tests.e2e.inject.cdi.se.test;
exports org.glassfish.jersey.tests.e2e.inject.cdi.se.test.subresources;
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java
new file mode 100644
index 0000000..f9e0bd2
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/PingApi.java
@@ -0,0 +1,36 @@
+/*
+ * 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.e2e.inject.cdi.se.test.j6000;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.tests.e2e.inject.cdi.se.j6000.PingService;
+
+@Path("/ping")
+public class PingApi {
+ private @Inject PingService delegate;
+
+ @GET
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response ping() {
+ return this.delegate.ping();
+ }
+}
\ No newline at end of file
diff --git a/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java
new file mode 100644
index 0000000..624bff9
--- /dev/null
+++ b/tests/e2e-inject/cdi2-se/src/test/java/org/glassfish/jersey/tests/e2e/inject/cdi/se/test/j6000/TestServer.java
@@ -0,0 +1,78 @@
+/*
+ * 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.e2e.inject.cdi.se.test.j6000;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.ApplicationPath;
+import jakarta.ws.rs.SeBootstrap;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.core.Application;
+import jakarta.ws.rs.core.Response;
+import org.glassfish.jersey.server.spi.WebServer;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.Set;
+import java.util.concurrent.CompletionStage;
+import java.util.concurrent.ExecutionException;
+
+@ApplicationPath("/")
+@ApplicationScoped
+public class TestServer extends Application implements AutoCloseable {
+
+ private CompletionStage<SeBootstrap.Instance> instance;
+
+ public CompletionStage<SeBootstrap.Instance> startServer(int port) throws GeneralSecurityException, IOException {
+ jakarta.ws.rs.SeBootstrap.Configuration.Builder builder = SeBootstrap.Configuration.builder()
+ .port(port)
+ .rootPath("/")
+ .protocol("HTTP");
+
+ this.instance = SeBootstrap.start(this, builder.build());
+ this.instance.thenAccept(i -> {
+ System.out.println("server started");
+ });
+ return this.instance;
+ }
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ return Set.of(PingApi.class);
+ }
+
+ @Override
+ public void close() throws Exception {
+ }
+
+ @Test
+ void testJerseyBeanGetBeanClass() throws GeneralSecurityException, IOException, ExecutionException, InterruptedException {
+ final String sPort = System.getProperty("jersey.config.test.container.port");
+ int port = sPort == null || sPort.isEmpty() ? 8080 : Integer.parseInt(sPort);
+ TestServer server = new TestServer();
+ SeBootstrap.Instance instance = server.startServer(port).toCompletableFuture().get();
+ try {
+ port = instance.unwrap(WebServer.class).port();
+ try (Response response = ClientBuilder.newClient().target("http://localhost:" + port + "/ping").request().get()) {
+ Assertions.assertEquals(200, response.getStatus());
+ }
+ } finally {
+ instance.stop();
+ }
+ }
+}
diff --git a/tests/e2e-inject/hk2/pom.xml b/tests/e2e-inject/hk2/pom.xml
index 7990083..d297151 100644
--- a/tests/e2e-inject/hk2/pom.xml
+++ b/tests/e2e-inject/hk2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>e2e-inject</artifactId>
<groupId>org.glassfish.jersey.tests</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/e2e-inject/non-inject/pom.xml b/tests/e2e-inject/non-inject/pom.xml
index a0f81ed..16b779e 100644
--- a/tests/e2e-inject/non-inject/pom.xml
+++ b/tests/e2e-inject/non-inject/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>e2e-inject</artifactId>
<groupId>org.glassfish.jersey.tests</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/e2e-inject/pom.xml b/tests/e2e-inject/pom.xml
index 34f6292..f9ce803 100644
--- a/tests/e2e-inject/pom.xml
+++ b/tests/e2e-inject/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-inject</artifactId>
diff --git a/tests/e2e-jdk-specifics/pom.xml b/tests/e2e-jdk-specifics/pom.xml
index c31dc24..37dc372 100644
--- a/tests/e2e-jdk-specifics/pom.xml
+++ b/tests/e2e-jdk-specifics/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-jdk-specifics</artifactId>
diff --git a/tests/e2e-server/pom.xml b/tests/e2e-server/pom.xml
index 962cc38..67e2f2a 100644
--- a/tests/e2e-server/pom.xml
+++ b/tests/e2e-server/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-server</artifactId>
@@ -34,13 +34,10 @@
<properties>
<surefire.security.argline>
- --add-reads org.jboss.logging=weld.core.impl
- --add-reads org.jboss.logging=weld.se.core
- --add-reads org.jboss.logging=weld.environment.common
--add-reads org.jboss.logging=org.hibernate.validator
</surefire.security.argline>
</properties>
-
+
<build>
<plugins>
<!-- <plugin>-->
diff --git a/tests/e2e-testng/pom.xml b/tests/e2e-testng/pom.xml
index fde635f..8ad164d 100644
--- a/tests/e2e-testng/pom.xml
+++ b/tests/e2e-testng/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-testng</artifactId>
diff --git a/tests/e2e-testng/src/test/java/org/glassfish/jersey/tests/e2e/ContainerPerClassTest.java b/tests/e2e-testng/src/test/java/org/glassfish/jersey/tests/e2e/ContainerPerClassTest.java
index 66ae84d..eba8422 100644
--- a/tests/e2e-testng/src/test/java/org/glassfish/jersey/tests/e2e/ContainerPerClassTest.java
+++ b/tests/e2e-testng/src/test/java/org/glassfish/jersey/tests/e2e/ContainerPerClassTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020 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
@@ -27,8 +27,8 @@
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTestNg;
+import org.testng.Assert;
import org.testng.annotations.Test;
-import static org.testng.Assert.assertEquals;
/**
* Tests that container is created only once per class and each test method sends request to the same container.
@@ -73,7 +73,7 @@
private void test(final Integer expected) {
final Response response = target().request().get();
- assertEquals(response.getStatus(), 200);
- assertEquals(response.readEntity(Integer.class), expected);
+ Assert.assertEquals(response.getStatus(), 200);
+ Assert.assertEquals(response.readEntity(Integer.class), expected);
}
}
diff --git a/tests/e2e-tls/pom.xml b/tests/e2e-tls/pom.xml
index 187b24d..50a3502 100644
--- a/tests/e2e-tls/pom.xml
+++ b/tests/e2e-tls/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e-tls</artifactId>
@@ -97,7 +97,7 @@
<dependency>
<groupId>io.specto</groupId>
<artifactId>hoverfly-java-junit5</artifactId>
- <version>0.18.1</version>
+ <version>0.20.2</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/tests/e2e/pom.xml b/tests/e2e/pom.xml
index c1f25de..0e1b481 100644
--- a/tests/e2e/pom.xml
+++ b/tests/e2e/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>e2e</artifactId>
@@ -34,9 +34,6 @@
<properties>
<surefire.security.argline>
- --add-reads org.jboss.logging=weld.core.impl
- --add-reads org.jboss.logging=weld.se.core
- --add-reads org.jboss.logging=weld.environment.common
--add-reads org.jboss.logging=org.hibernate.validator
</surefire.security.argline>
</properties>
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/CookieImplTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/CookieImplTest.java
index 53cd76d..1c8894c 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/CookieImplTest.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/CookieImplTest.java
@@ -16,13 +16,17 @@
package org.glassfish.jersey.tests.api;
+import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import jakarta.ws.rs.core.Cookie;
import jakarta.ws.rs.core.NewCookie;
+import jakarta.ws.rs.core.Response;
import org.glassfish.jersey.message.internal.HttpHeaderReader;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -46,8 +50,8 @@
expResult = "$Version=1;fred=flintstone;$Domain=.sun.com;$Path=/path";
assertEquals(expResult, cookie.toString());
- cookie = new Cookie("fred", "flintstone", "/path", ".sun.com", 2);
- expResult = "$Version=2;fred=flintstone;$Domain=.sun.com;$Path=/path";
+ cookie = new Cookie("fred", "flintstone", "/path", ".sun.com", 0);
+ expResult = "$Version=0;fred=flintstone;$Domain=.sun.com;$Path=/path";
assertEquals(expResult, cookie.toString());
}
@@ -149,7 +153,7 @@
}
@Test
- public void testMultipleCookiesWithSameName(){
+ public void testMultipleCookiesWithSameName() {
String cookieHeader = "kobe=oldeststring; kobe=neweststring";
Map<String, Cookie> cookies = HttpHeaderReader.readCookies(cookieHeader);
@@ -246,4 +250,26 @@
assertEquals(NewCookie.SameSite.NONE, cookie.getSameSite());
}
+ @Test
+ public void parseCookieTckTest() {
+ String NewCookie_toParse = "NAME_1=Value_1;";
+ int version = 1;
+ NewCookie nck26 = jakarta.ws.rs.core.NewCookie.valueOf(NewCookie_toParse);
+ Assertions.assertEquals(version, nck26.getVersion());
+ }
+
+ @Test
+ public void getCookiesTckTest() {
+ NewCookie cookie1 = new NewCookie("c1", "v1");
+ NewCookie cookie2 = new NewCookie("c2", "v2");
+ Response response = Response.ok().cookie(cookie1).cookie(cookie2).build();
+ Map<String, NewCookie> map = response.getCookies();
+ for (Map.Entry<String, NewCookie> entry : map.entrySet()) {
+ if (entry.getKey().equals("c1")) {
+ Assertions.assertTrue(entry.getValue().equals(cookie1));
+ } else if (entry.getKey().equals("c2")) {
+ Assertions.assertTrue(entry.getValue().equals(cookie2));
+ }
+ }
+ }
}
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/Jersey5939Test.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/Jersey5939Test.java
new file mode 100644
index 0000000..78f1ef4
--- /dev/null
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/api/Jersey5939Test.java
@@ -0,0 +1,81 @@
+/*
+ * 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.api;
+
+import org.glassfish.jersey.server.ContainerResponse;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.jupiter.api.Test;
+
+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.Response;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * Check the reused response does not leak by additional Annotations (ContainerResponse#setEntityAnnottaions.
+ */
+public class Jersey5939Test extends JerseyTest {
+
+ private final List<ContainerResponse> capturedResponses = new ArrayList<>();
+
+ @Override
+ protected Application configure() {
+ return new ResourceConfig(Restlet.class).register(new ContainerResponseFilter() {
+ @Override
+ public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)
+ throws IOException {
+ if (responseContext instanceof ContainerResponse) {
+ capturedResponses.add((ContainerResponse) responseContext);
+ }
+ }
+ });
+ }
+
+ @Test
+ public void testIssue5939() {
+ for (int i = 0; i < 10; i++) {
+ Response response = target("foo/bar").request().get();
+ assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus());
+ ContainerResponse containerResponse = capturedResponses.get(i);
+ Annotation[] annotations = containerResponse.getEntityAnnotations();
+ // [@javax.ws.rs.GET(), @javax.ws.rs.Path("/bar")]
+ assertEquals(2, annotations.length, "Found " + annotations.length + " annotations, in iteration " + i);
+ }
+ }
+
+ @Path("/foo")
+ public static class Restlet {
+
+ private static final Response RESPONSE_204 = Response.noContent().build();
+
+ @GET
+ @Path("/bar")
+ public Response fooBar() {
+ return RESPONSE_204;
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/AutoDiscoverableTest.java b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/AutoDiscoverableTest.java
index 3dea887..476c255 100644
--- a/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/AutoDiscoverableTest.java
+++ b/tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/common/AutoDiscoverableTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 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
@@ -17,6 +17,9 @@
package org.glassfish.jersey.tests.e2e.common;
import java.io.IOException;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+import java.util.stream.Collectors;
import jakarta.ws.rs.ConstrainedTo;
import jakarta.ws.rs.POST;
@@ -31,13 +34,20 @@
import jakarta.ws.rs.ext.WriterInterceptorContext;
import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.internal.AutoDiscoverableConfigurator;
+import org.glassfish.jersey.internal.BootstrapBag;
+import org.glassfish.jersey.internal.ServiceFinder;
+import org.glassfish.jersey.internal.inject.InjectionManager;
+import org.glassfish.jersey.internal.inject.Injections;
import org.glassfish.jersey.internal.spi.AutoDiscoverable;
import org.glassfish.jersey.internal.util.PropertiesHelper;
+import org.glassfish.jersey.model.internal.CommonConfig;
+import org.glassfish.jersey.model.internal.ComponentBag;
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 static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Note: Auto-discoverables from this test "affects" all other tests in suit.
@@ -133,6 +143,84 @@
public void testAutoDiscoverableConstrainedTo() throws Exception {
final Response response = target().request().post(Entity.text("value"));
- assertEquals("value-common-client-common-server", response.readEntity(String.class));
+ Assertions.assertEquals("value-common-client-common-server", response.readEntity(String.class));
+ }
+
+ @Test
+ public void testServiceFinderIterator() {
+ Class<AutoDiscoverable>[] array =
+ ServiceFinder.service(AutoDiscoverable.class).runtimeType(RuntimeType.SERVER).find().toClassArray();
+ int size = array.length;
+
+ Assertions.assertTrue(size > 3);
+
+ ServiceFinder<AutoDiscoverable> finder =
+ ServiceFinder.service(AutoDiscoverable.class).runtimeType(RuntimeType.SERVER).find();
+ AutoDiscoverable next = null;
+ // check next()
+ final Iterator<AutoDiscoverable> it = finder.iterator();
+ for (int i = 0; i != size; i++) {
+ AutoDiscoverable n = it.next();
+ Assertions.assertNotSame(next, n);
+ next = n;
+ }
+ Assertions.assertThrows(NoSuchElementException.class, it::next);
+
+ // check hasNext();
+ final Iterator<AutoDiscoverable> it2 = finder.iterator();
+ next = null;
+ for (int i = 0; i != size; i++) {
+ for (int j = 0; j != size + 1; j++) {
+ Assertions.assertTrue(it2.hasNext());
+ }
+ AutoDiscoverable n = it2.next();
+ Assertions.assertNotSame(next, n);
+ next = n;
+ }
+ Assertions.assertFalse(it2.hasNext());
+ Assertions.assertThrows(NoSuchElementException.class, it2::next);
+ }
+
+ @Test
+ public void testAutoDiscoverableConstrainedConfigurator() {
+ Class<?>[] array = ServiceFinder.find(AutoDiscoverable.class).toClassArray();
+ Assertions.assertTrue(contains(ClientAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(CommonAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(ServerAutoDiscoverable.class, array));
+
+ array = ServiceFinder.service(AutoDiscoverable.class).find().toClassArray();
+ Assertions.assertTrue(contains(ClientAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(CommonAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(ServerAutoDiscoverable.class, array));
+
+ array = ServiceFinder.service(AutoDiscoverable.class).runtimeType(RuntimeType.SERVER).find().toClassArray();
+ Assertions.assertFalse(contains(ClientAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(CommonAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(ServerAutoDiscoverable.class, array));
+
+ array = ServiceFinder.service(AutoDiscoverable.class).runtimeType(RuntimeType.CLIENT).find().toClassArray();
+ Assertions.assertTrue(contains(ClientAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(CommonAutoDiscoverable.class, array));
+ Assertions.assertFalse(contains(ServerAutoDiscoverable.class, array));
+
+ AutoDiscoverableConfigurator configurator = new AutoDiscoverableConfigurator(RuntimeType.SERVER);
+ InjectionManager injectionManager = Injections.createInjectionManager();
+ BootstrapBag bb = new BootstrapBag();
+ bb.setConfiguration(new CommonConfig(RuntimeType.SERVER, ComponentBag.INCLUDE_ALL));
+ configurator.init(injectionManager, bb);
+ array = bb.getAutoDiscoverables().stream().map(ad -> ad.getClass()).collect(Collectors.toList())
+ .toArray(new Class[0]);
+ Assertions.assertFalse(contains(ClientAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(CommonAutoDiscoverable.class, array));
+ Assertions.assertTrue(contains(ServerAutoDiscoverable.class, array));
+ }
+
+ private static boolean contains(Class<?> clazz, Class<?>... list) {
+ for (Class<?> listClass : list) {
+ if (listClass.equals(clazz)) {
+ return true;
+ }
+ }
+ return false;
}
}
diff --git a/tests/integration/asm/pom.xml b/tests/integration/asm/pom.xml
index 2fed923..0cef6e3 100644
--- a/tests/integration/asm/pom.xml
+++ b/tests/integration/asm/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/async-jersey-filter/pom.xml b/tests/integration/async-jersey-filter/pom.xml
index 7c044c6..b09fd7b 100644
--- a/tests/integration/async-jersey-filter/pom.xml
+++ b/tests/integration/async-jersey-filter/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>async-jersey-filter</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
index 6e95223..b1b6409 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-beanvalidation-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
index 778499f..67f9d3c 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/Hk2ValidationInterceptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 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
@@ -115,7 +115,7 @@
}
/**
- * Determines if a resource has a property of type {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a resource has a property of type {@code jakarta.mvc.validation.ValidationResult}.
*
* @param resource resource instance.
* @return outcome of test.
@@ -125,7 +125,7 @@
}
/**
- * Returns a getter for {@code javax.mvc.validation.ValidationResult} or {@code null}
+ * Returns a getter for {@code jakarta.mvc.validation.ValidationResult} or {@code null}
* if one cannot be found.
*
* @param resource resource instance.
@@ -145,7 +145,7 @@
}
/**
- * Determines if a method is a getter for {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a method is a getter for {@code jakarta.mvc.validation.ValidationResult}.
*
* @param m method to test.
* @return outcome of test.
@@ -157,7 +157,7 @@
}
/**
- * Returns a setter for {@code javax.mvc.validation.ValidationResult} or {@code null}
+ * Returns a setter for {@code jakarta.mvc.validation.ValidationResult} or {@code null}
* if one cannot be found.
*
* @param resource resource instance.
@@ -177,7 +177,7 @@
}
/**
- * Determines if a method is a setter for {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a method is a setter for {@code jakarta.mvc.validation.ValidationResult}.
* As a CDI initializer method, it must be annotated with {@link jakarta.inject.Inject}.
*
* @param m method to test.
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
index 498f91d..ce22760 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/java/org/glassfish/jersey/tests/cdi/bv/ValidationResultUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2021 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
@@ -27,7 +27,7 @@
import jakarta.validation.ConstraintViolation;
/**
- * Helper class to implement support for {@code javax.mvc.validation.ValidationResult}.
+ * Helper class to implement support for {@code jakarta.mvc.validation.ValidationResult}.
*
* @author Santiago Pericas-Geertsen
*/
@@ -41,7 +41,7 @@
}
/**
- * Search for a {@code javax.mvc.validation.ValidationResult} field in the resource's
+ * Search for a {@code jakarta.mvc.validation.ValidationResult} field in the resource's
* class hierarchy. Field must be annotated with {@link jakarta.inject.Inject}.
*
* @param resource resource instance.
@@ -63,7 +63,7 @@
}
/**
- * Updates a {@code javax.mvc.validation.ValidationResult} field. In pseudo-code:
+ * Updates a {@code jakarta.mvc.validation.ValidationResult} field. In pseudo-code:
* <p/>
* resource.field.setViolations(constraints)
*
@@ -92,7 +92,7 @@
}
/**
- * Updates a {@code javax.mvc.validation.ValidationResult} property. In pseudo-code:
+ * Updates a {@code jakarta.mvc.validation.ValidationResult} property. In pseudo-code:
* <p/>
* obj = getter.invoke(resource);
* obj.setViolations(constraints);
@@ -125,7 +125,7 @@
}
/**
- * Determines if a resource has a property of type {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a resource has a property of type {@code jakarta.mvc.validation.ValidationResult}.
*
* @param resource resource instance.
* @return outcome of test.
@@ -135,7 +135,7 @@
}
/**
- * Returns a getter for {@code javax.mvc.validation.ValidationResult} or {@code null}
+ * Returns a getter for {@code jakarta.mvc.validation.ValidationResult} or {@code null}
* if one cannot be found.
*
* @param resource resource instance.
@@ -155,7 +155,7 @@
}
/**
- * Determines if a method is a getter for {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a method is a getter for {@code jakarta.mvc.validation.ValidationResult}.
*
* @param m method to test.
* @return outcome of test.
@@ -167,7 +167,7 @@
}
/**
- * Returns a setter for {@code javax.mvc.validation.ValidationResult} or {@code null}
+ * Returns a setter for {@code jakarta.mvc.validation.ValidationResult} or {@code null}
* if one cannot be found.
*
* @param resource resource instance.
@@ -191,7 +191,7 @@
}
/**
- * Determines if a method is a setter for {@code javax.mvc.validation.ValidationResult}.
+ * Determines if a method is a setter for {@code jakarta.mvc.validation.ValidationResult}.
* As a CDI initializer method, it must be annotated with {@link jakarta.inject.Inject}.
*
* @param m method to test.
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
index 2b8160f..3587fee 100644
--- a/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-beanvalidation-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2021 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
@@ -17,5 +17,10 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 b29c3da..2c920af 100644
--- a/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
+++ b/tests/integration/cdi-integration/cdi-client-on-server/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-client-on-server</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml
index dc38505..f105124 100644
--- a/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-client-on-server/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- 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
@@ -17,11 +17,10 @@
-->
-
-<beans
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
</beans>
diff --git a/tests/integration/cdi-integration/cdi-client/pom.xml b/tests/integration/cdi-integration/cdi-client/pom.xml
index f02878e..809db83 100644
--- a/tests/integration/cdi-integration/cdi-client/pom.xml
+++ b/tests/integration/cdi-integration/cdi-client/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-client</artifactId>
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 7082bde..65a089c 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-ejb-test-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-ejb-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 b4232ae..bce9708 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
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-iface-with-non-jaxrs-impl-test-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-iface-with-non-jaxrs-impl-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml b/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
index 5fd27a8..01e1ca5 100644
--- a/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
+++ b/tests/integration/cdi-integration/cdi-inject-weld-test/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-inject-weld-test</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-log-check/pom.xml b/tests/integration/cdi-integration/cdi-log-check/pom.xml
index 34fe7ed..e49afee 100644
--- a/tests/integration/cdi-integration/cdi-log-check/pom.xml
+++ b/tests/integration/cdi-integration/cdi-log-check/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-log-check</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-log-check/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-log-check/src/main/resources/META-INF/beans.xml
index ea4422d..7ab8f3c 100644
--- a/tests/integration/cdi-integration/cdi-log-check/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-log-check/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2019 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
@@ -18,11 +18,11 @@
-->
-<beans
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
<interceptors>
<class>org.glassfish.jersey.tests.cdi.resources.FooInterceptor</class>
</interceptors>
diff --git a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
index d32f56a..8d80395 100644
--- a/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
+++ b/tests/integration/cdi-integration/cdi-manually-bound/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>cdi-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
index c9294d6..b1002fe 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/ear/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
index f3a5ae7..d170ec8 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/lib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
index 449fa1c..ae2af10 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/lib/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/pom.xml
index ebb7daf..1f17ad3 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-multimodule</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
index 4e9926e..746a253 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/war1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
index c5e481e..f9d3b8b 100644
--- a/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multimodule/war2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
index 6935be9..b521645 100644
--- a/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-multipart-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
index c8df7fe..6f19892 100644
--- a/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-multipart-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 8f9d487..7b0eae2 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
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/cdi-integration/cdi-singleton/pom.xml b/tests/integration/cdi-integration/cdi-singleton/pom.xml
index 13d9d2e..f2a6098 100644
--- a/tests/integration/cdi-integration/cdi-singleton/pom.xml
+++ b/tests/integration/cdi-integration/cdi-singleton/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>cdi-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
index 6f2810f..5830c95 100644
--- a/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
+++ b/tests/integration/cdi-integration/cdi-skipping-analyzer/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>cdi-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
index 880adc1..4453d9e 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-test-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
index 8d3e4b2..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2022 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-test-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
index 8d3e4b2..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-test-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2022 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 700fff4..c455dd6 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
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-with-jersey-injection-custom-cfg-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-cfg-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 e76c5f9..4ba214f 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
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-with-jersey-injection-custom-hk2-banned-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-custom-hk2-banned-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 efd732f..e0c0dc8 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
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>cdi-with-jersey-injection-webapp</artifactId>
diff --git a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
index 14ea61e..5d27f02 100644
--- a/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/cdi-integration/cdi-with-jersey-injection-webapp/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2021 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
@@ -17,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
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 cc5f7ae..3ac7297 100644
--- a/tests/integration/cdi-integration/context-inject-on-server/pom.xml
+++ b/tests/integration/cdi-integration/context-inject-on-server/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>context-inject-on-server</artifactId>
diff --git a/tests/integration/cdi-integration/gf-cdi-inject/pom.xml b/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
index d7268da..84e97f4 100644
--- a/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
+++ b/tests/integration/cdi-integration/gf-cdi-inject/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration.cdi</groupId>
<artifactId>cdi-integration-project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>gf-cdi-inject-on-server</artifactId>
diff --git a/tests/integration/cdi-integration/pom.xml b/tests/integration/cdi-integration/pom.xml
index 82c4289..d9fa7c8 100644
--- a/tests/integration/cdi-integration/pom.xml
+++ b/tests/integration/cdi-integration/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
diff --git a/tests/integration/client-connector-provider/pom.xml b/tests/integration/client-connector-provider/pom.xml
index aca7b12..5cd3565 100644
--- a/tests/integration/client-connector-provider/pom.xml
+++ b/tests/integration/client-connector-provider/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>client-connector-provider</artifactId>
diff --git a/tests/integration/ejb-multimodule-reload/ear/pom.xml b/tests/integration/ejb-multimodule-reload/ear/pom.xml
index 4fc07bd..fc44430 100644
--- a/tests/integration/ejb-multimodule-reload/ear/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/ear/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule-reload/lib/pom.xml b/tests/integration/ejb-multimodule-reload/lib/pom.xml
index 23b5e9d..2f7f245 100644
--- a/tests/integration/ejb-multimodule-reload/lib/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/lib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule-reload/lib/src/main/resources/META-INF/beans.xml b/tests/integration/ejb-multimodule-reload/lib/src/main/resources/META-INF/beans.xml
index 3b46d69..ae2af10 100644
--- a/tests/integration/ejb-multimodule-reload/lib/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/ejb-multimodule-reload/lib/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/ejb-multimodule-reload/pom.xml b/tests/integration/ejb-multimodule-reload/pom.xml
index 0598ae8..2c81664 100644
--- a/tests/integration/ejb-multimodule-reload/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>ejb-multimodule-reload</artifactId>
diff --git a/tests/integration/ejb-multimodule-reload/war1/pom.xml b/tests/integration/ejb-multimodule-reload/war1/pom.xml
index e743025..aa2b327 100644
--- a/tests/integration/ejb-multimodule-reload/war1/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/war1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule-reload/war1/src/main/resources/META-INF/beans.xml b/tests/integration/ejb-multimodule-reload/war1/src/main/resources/META-INF/beans.xml
index 07df368..5d27f02 100644
--- a/tests/integration/ejb-multimodule-reload/war1/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/ejb-multimodule-reload/war1/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/ejb-multimodule-reload/war2/pom.xml b/tests/integration/ejb-multimodule-reload/war2/pom.xml
index 8d8c605..4724fb2 100644
--- a/tests/integration/ejb-multimodule-reload/war2/pom.xml
+++ b/tests/integration/ejb-multimodule-reload/war2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule-reload/war2/src/main/resources/META-INF/beans.xml b/tests/integration/ejb-multimodule-reload/war2/src/main/resources/META-INF/beans.xml
index 07df368..5d27f02 100644
--- a/tests/integration/ejb-multimodule-reload/war2/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/ejb-multimodule-reload/war2/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/ejb-multimodule/ear/pom.xml b/tests/integration/ejb-multimodule/ear/pom.xml
index b28a11f..f015c8e 100644
--- a/tests/integration/ejb-multimodule/ear/pom.xml
+++ b/tests/integration/ejb-multimodule/ear/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule/lib/pom.xml b/tests/integration/ejb-multimodule/lib/pom.xml
index ae8ca07..3698175 100644
--- a/tests/integration/ejb-multimodule/lib/pom.xml
+++ b/tests/integration/ejb-multimodule/lib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-multimodule/pom.xml b/tests/integration/ejb-multimodule/pom.xml
index 44b8a6e..01b3e6b 100644
--- a/tests/integration/ejb-multimodule/pom.xml
+++ b/tests/integration/ejb-multimodule/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>ejb-multimodule</artifactId>
diff --git a/tests/integration/ejb-multimodule/war/pom.xml b/tests/integration/ejb-multimodule/war/pom.xml
index 150ac23..794e978 100644
--- a/tests/integration/ejb-multimodule/war/pom.xml
+++ b/tests/integration/ejb-multimodule/war/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/ejb-test-webapp/pom.xml b/tests/integration/ejb-test-webapp/pom.xml
index 90da4f0..071220d 100644
--- a/tests/integration/ejb-test-webapp/pom.xml
+++ b/tests/integration/ejb-test-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>ejb-test-webapp</artifactId>
diff --git a/tests/integration/externalproperties/pom.xml b/tests/integration/externalproperties/pom.xml
index dc69625..c688ce9 100644
--- a/tests/integration/externalproperties/pom.xml
+++ b/tests/integration/externalproperties/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>externalproperties</artifactId>
diff --git a/tests/integration/helidon3-client/pom.xml b/tests/integration/helidon3-client/pom.xml
index e7a8635..1a4dd08 100644
--- a/tests/integration/helidon3-client/pom.xml
+++ b/tests/integration/helidon3-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/j-376/pom.xml b/tests/integration/j-376/pom.xml
index e42a8c3..db37544 100644
--- a/tests/integration/j-376/pom.xml
+++ b/tests/integration/j-376/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>j-376</artifactId>
diff --git a/tests/integration/j-376/src/main/resources/META-INF/beans.xml b/tests/integration/j-376/src/main/resources/META-INF/beans.xml
index 3b46d69..ae2af10 100644
--- a/tests/integration/j-376/src/main/resources/META-INF/beans.xml
+++ b/tests/integration/j-376/src/main/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/j-441/ear/pom.xml b/tests/integration/j-441/ear/pom.xml
index a0cc4e5..ddc0203 100644
--- a/tests/integration/j-441/ear/pom.xml
+++ b/tests/integration/j-441/ear/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>j-441-ear</artifactId>
diff --git a/tests/integration/j-441/pom.xml b/tests/integration/j-441/pom.xml
index 8e56c13..eddcc47 100644
--- a/tests/integration/j-441/pom.xml
+++ b/tests/integration/j-441/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>j-441</artifactId>
diff --git a/tests/integration/j-441/war1/pom.xml b/tests/integration/j-441/war1/pom.xml
index e2b9a9a..d65004c 100644
--- a/tests/integration/j-441/war1/pom.xml
+++ b/tests/integration/j-441/war1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/j-441/war1/src/main/webapp/WEB-INF/beans.xml b/tests/integration/j-441/war1/src/main/webapp/WEB-INF/beans.xml
index 93cfed7..825ac0c 100644
--- a/tests/integration/j-441/war1/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/j-441/war1/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
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,7 +17,9 @@
-->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-</beans>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
\ No newline at end of file
diff --git a/tests/integration/j-441/war2/pom.xml b/tests/integration/j-441/war2/pom.xml
index c71c175..597e580 100644
--- a/tests/integration/j-441/war2/pom.xml
+++ b/tests/integration/j-441/war2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/j-441/war2/src/main/webapp/WEB-INF/beans.xml b/tests/integration/j-441/war2/src/main/webapp/WEB-INF/beans.xml
index 93cfed7..825ac0c 100644
--- a/tests/integration/j-441/war2/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/j-441/war2/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2025 Oracle and/or its affiliates. All rights reserved.
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,7 +17,9 @@
-->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-</beans>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
\ No newline at end of file
diff --git a/tests/integration/j-59/ear/pom.xml b/tests/integration/j-59/ear/pom.xml
index c3aeafc..eb8edbf 100644
--- a/tests/integration/j-59/ear/pom.xml
+++ b/tests/integration/j-59/ear/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/j-59/lib/pom.xml b/tests/integration/j-59/lib/pom.xml
index 143942a..b5417f3 100644
--- a/tests/integration/j-59/lib/pom.xml
+++ b/tests/integration/j-59/lib/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
diff --git a/tests/integration/j-59/pom.xml b/tests/integration/j-59/pom.xml
index 287f129..8d710ac 100644
--- a/tests/integration/j-59/pom.xml
+++ b/tests/integration/j-59/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>j-59</artifactId>
diff --git a/tests/integration/j-59/war/pom.xml b/tests/integration/j-59/war/pom.xml
index 8b12947..725ece9 100644
--- a/tests/integration/j-59/war/pom.xml
+++ b/tests/integration/j-59/war/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -68,7 +68,7 @@
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
- <version>1.1.1</version>
+ <version>3.0.0</version>
</dependency>
</dependencies>
diff --git a/tests/integration/j-59/war/src/main/java/org/glassfish/jersey/tests/integration/j59/cdi/web/CdiBackedResource.java b/tests/integration/j-59/war/src/main/java/org/glassfish/jersey/tests/integration/j59/cdi/web/CdiBackedResource.java
index 6210ac4..1992aae 100644
--- a/tests/integration/j-59/war/src/main/java/org/glassfish/jersey/tests/integration/j59/cdi/web/CdiBackedResource.java
+++ b/tests/integration/j-59/war/src/main/java/org/glassfish/jersey/tests/integration/j59/cdi/web/CdiBackedResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2020 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
@@ -19,7 +19,7 @@
import jakarta.enterprise.context.RequestScoped;
import jakarta.inject.Inject;
-import javax.jws.WebResult;
+import jakarta.jws.WebResult;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
diff --git a/tests/integration/j-59/war/src/main/webapp/WEB-INF/beans.xml b/tests/integration/j-59/war/src/main/webapp/WEB-INF/beans.xml
index 6d5c2c1..8d6656d 100644
--- a/tests/integration/j-59/war/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/j-59/war/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2014, 2025 Oracle and/or its affiliates. All rights reserved.
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,7 +17,9 @@
-->
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
</beans>
diff --git a/tests/integration/jackson-14/pom.xml b/tests/integration/jackson-14/pom.xml
index 8f3d62b..8be015f 100644
--- a/tests/integration/jackson-14/pom.xml
+++ b/tests/integration/jackson-14/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jaxrs-component-inject/pom.xml b/tests/integration/jaxrs-component-inject/pom.xml
index d0e9dbf..ff010ab 100644
--- a/tests/integration/jaxrs-component-inject/pom.xml
+++ b/tests/integration/jaxrs-component-inject/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jaxrs-component-inject</artifactId>
diff --git a/tests/integration/jersey-1107/pom.xml b/tests/integration/jersey-1107/pom.xml
index 3de3987..86e524a 100644
--- a/tests/integration/jersey-1107/pom.xml
+++ b/tests/integration/jersey-1107/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-1107</artifactId>
diff --git a/tests/integration/jersey-1223/pom.xml b/tests/integration/jersey-1223/pom.xml
index 6b8131b..fa188a7 100644
--- a/tests/integration/jersey-1223/pom.xml
+++ b/tests/integration/jersey-1223/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jersey-1223</artifactId>
diff --git a/tests/integration/jersey-1604/pom.xml b/tests/integration/jersey-1604/pom.xml
index 9a551e5..d3564bf 100644
--- a/tests/integration/jersey-1604/pom.xml
+++ b/tests/integration/jersey-1604/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jersey-1604</artifactId>
diff --git a/tests/integration/jersey-1667/pom.xml b/tests/integration/jersey-1667/pom.xml
index b8220dc..5f01100 100644
--- a/tests/integration/jersey-1667/pom.xml
+++ b/tests/integration/jersey-1667/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-1667</artifactId>
diff --git a/tests/integration/jersey-1829/pom.xml b/tests/integration/jersey-1829/pom.xml
index ec1d5da..90bd268 100644
--- a/tests/integration/jersey-1829/pom.xml
+++ b/tests/integration/jersey-1829/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-1883/pom.xml b/tests/integration/jersey-1883/pom.xml
index d2be867..6f4db44 100644
--- a/tests/integration/jersey-1883/pom.xml
+++ b/tests/integration/jersey-1883/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-1883</artifactId>
diff --git a/tests/integration/jersey-1928/pom.xml b/tests/integration/jersey-1928/pom.xml
index 706b0dd..f7c619e 100644
--- a/tests/integration/jersey-1928/pom.xml
+++ b/tests/integration/jersey-1928/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jersey-1928</artifactId>
diff --git a/tests/integration/jersey-1960/pom.xml b/tests/integration/jersey-1960/pom.xml
index 4c359fd..321df71 100644
--- a/tests/integration/jersey-1960/pom.xml
+++ b/tests/integration/jersey-1960/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-1960</artifactId>
diff --git a/tests/integration/jersey-1964/pom.xml b/tests/integration/jersey-1964/pom.xml
index 922e1d4..1fb6ebf 100644
--- a/tests/integration/jersey-1964/pom.xml
+++ b/tests/integration/jersey-1964/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-1964</artifactId>
diff --git a/tests/integration/jersey-2031/pom.xml b/tests/integration/jersey-2031/pom.xml
index 26b053a..b69d141 100644
--- a/tests/integration/jersey-2031/pom.xml
+++ b/tests/integration/jersey-2031/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2031</artifactId>
diff --git a/tests/integration/jersey-2136/pom.xml b/tests/integration/jersey-2136/pom.xml
index e77a843..025f0ea 100644
--- a/tests/integration/jersey-2136/pom.xml
+++ b/tests/integration/jersey-2136/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2136</artifactId>
diff --git a/tests/integration/jersey-2137/pom.xml b/tests/integration/jersey-2137/pom.xml
index e53e739..859aaaf 100644
--- a/tests/integration/jersey-2137/pom.xml
+++ b/tests/integration/jersey-2137/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2137</artifactId>
diff --git a/tests/integration/jersey-2137/src/main/webapp/WEB-INF/beans.xml b/tests/integration/jersey-2137/src/main/webapp/WEB-INF/beans.xml
index 07df368..5d27f02 100644
--- a/tests/integration/jersey-2137/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/jersey-2137/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/jersey-2137/src/test/java/org/glassfish/jersey/tests/integration/jersey2137/WaeExceptionMappingTest.java b/tests/integration/jersey-2137/src/test/java/org/glassfish/jersey/tests/integration/jersey2137/WaeExceptionMappingTest.java
index 5a1a631..a91df15 100644
--- a/tests/integration/jersey-2137/src/test/java/org/glassfish/jersey/tests/integration/jersey2137/WaeExceptionMappingTest.java
+++ b/tests/integration/jersey-2137/src/test/java/org/glassfish/jersey/tests/integration/jersey2137/WaeExceptionMappingTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2022 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
@@ -51,7 +51,7 @@
}
/**
- * Test all {@javax.transaction.Transactional}
+ * Test all {@jakarta.transaction.Transactional}
* annotated CDI beans. The test scenario is as follows.
* Set two accounts via the CDI bean that avoids rollback.
* Should any rollback happen there, we would not be able
diff --git a/tests/integration/jersey-2154/pom.xml b/tests/integration/jersey-2154/pom.xml
index f1950d4..a4cd218 100644
--- a/tests/integration/jersey-2154/pom.xml
+++ b/tests/integration/jersey-2154/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2154</artifactId>
diff --git a/tests/integration/jersey-2154/src/main/webapp/WEB-INF/beans.xml b/tests/integration/jersey-2154/src/main/webapp/WEB-INF/beans.xml
index 07df368..5d27f02 100644
--- a/tests/integration/jersey-2154/src/main/webapp/WEB-INF/beans.xml
+++ b/tests/integration/jersey-2154/src/main/webapp/WEB-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 2025 Oracle and/or its affiliates. All rights reserved.
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,4 +17,9 @@
-->
-<beans/>
+<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
+ bean-discovery-mode="all">
+</beans>
diff --git a/tests/integration/jersey-2160/pom.xml b/tests/integration/jersey-2160/pom.xml
index c5818a4..3bff65d 100644
--- a/tests/integration/jersey-2160/pom.xml
+++ b/tests/integration/jersey-2160/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2160</artifactId>
diff --git a/tests/integration/jersey-2164/pom.xml b/tests/integration/jersey-2164/pom.xml
index 39e0fda..e2d7a31 100644
--- a/tests/integration/jersey-2164/pom.xml
+++ b/tests/integration/jersey-2164/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2164</artifactId>
diff --git a/tests/integration/jersey-2167/pom.xml b/tests/integration/jersey-2167/pom.xml
index 8ede8a1..d0c9285 100644
--- a/tests/integration/jersey-2167/pom.xml
+++ b/tests/integration/jersey-2167/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2167</artifactId>
diff --git a/tests/integration/jersey-2176/pom.xml b/tests/integration/jersey-2176/pom.xml
index b50d3e2..b0cfad1 100644
--- a/tests/integration/jersey-2176/pom.xml
+++ b/tests/integration/jersey-2176/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2176</artifactId>
diff --git a/tests/integration/jersey-2184/pom.xml b/tests/integration/jersey-2184/pom.xml
index 40e5ea8..8e779b6 100644
--- a/tests/integration/jersey-2184/pom.xml
+++ b/tests/integration/jersey-2184/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2184</artifactId>
diff --git a/tests/integration/jersey-2255/pom.xml b/tests/integration/jersey-2255/pom.xml
index 96e9caf..9f4b79a 100644
--- a/tests/integration/jersey-2255/pom.xml
+++ b/tests/integration/jersey-2255/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2255</artifactId>
diff --git a/tests/integration/jersey-2322/pom.xml b/tests/integration/jersey-2322/pom.xml
index 140c584..8e9b7f5 100644
--- a/tests/integration/jersey-2322/pom.xml
+++ b/tests/integration/jersey-2322/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2322</artifactId>
diff --git a/tests/integration/jersey-2335/pom.xml b/tests/integration/jersey-2335/pom.xml
index 4d39abd..68fa45f 100644
--- a/tests/integration/jersey-2335/pom.xml
+++ b/tests/integration/jersey-2335/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2335</artifactId>
diff --git a/tests/integration/jersey-2421/pom.xml b/tests/integration/jersey-2421/pom.xml
index 7a6bade..5a1b3f5 100644
--- a/tests/integration/jersey-2421/pom.xml
+++ b/tests/integration/jersey-2421/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2421</artifactId>
diff --git a/tests/integration/jersey-2551/pom.xml b/tests/integration/jersey-2551/pom.xml
index 25d7225..56e210d 100644
--- a/tests/integration/jersey-2551/pom.xml
+++ b/tests/integration/jersey-2551/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2551</artifactId>
diff --git a/tests/integration/jersey-2612/pom.xml b/tests/integration/jersey-2612/pom.xml
index 3c2fdaa..a0ae375 100644
--- a/tests/integration/jersey-2612/pom.xml
+++ b/tests/integration/jersey-2612/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2612</artifactId>
diff --git a/tests/integration/jersey-2637/pom.xml b/tests/integration/jersey-2637/pom.xml
index 2b1856f..4628c8d 100644
--- a/tests/integration/jersey-2637/pom.xml
+++ b/tests/integration/jersey-2637/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2637</artifactId>
diff --git a/tests/integration/jersey-2654/pom.xml b/tests/integration/jersey-2654/pom.xml
index b4a7760..6d9e698 100644
--- a/tests/integration/jersey-2654/pom.xml
+++ b/tests/integration/jersey-2654/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2654</artifactId>
diff --git a/tests/integration/jersey-2673/pom.xml b/tests/integration/jersey-2673/pom.xml
index b181646..6dfcb21 100644
--- a/tests/integration/jersey-2673/pom.xml
+++ b/tests/integration/jersey-2673/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2673</artifactId>
diff --git a/tests/integration/jersey-2689/pom.xml b/tests/integration/jersey-2689/pom.xml
index f518c0f..87954b1 100644
--- a/tests/integration/jersey-2689/pom.xml
+++ b/tests/integration/jersey-2689/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2689</artifactId>
diff --git a/tests/integration/jersey-2704/pom.xml b/tests/integration/jersey-2704/pom.xml
index 396205b..e5d39c6 100644
--- a/tests/integration/jersey-2704/pom.xml
+++ b/tests/integration/jersey-2704/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2704</artifactId>
diff --git a/tests/integration/jersey-2776/pom.xml b/tests/integration/jersey-2776/pom.xml
index 42c8910..d579bda 100644
--- a/tests/integration/jersey-2776/pom.xml
+++ b/tests/integration/jersey-2776/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2776</artifactId>
diff --git a/tests/integration/jersey-2794/pom.xml b/tests/integration/jersey-2794/pom.xml
index c96f33d..e6498b3 100644
--- a/tests/integration/jersey-2794/pom.xml
+++ b/tests/integration/jersey-2794/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2794</artifactId>
diff --git a/tests/integration/jersey-2846/pom.xml b/tests/integration/jersey-2846/pom.xml
index f3a1717..9069b2e 100644
--- a/tests/integration/jersey-2846/pom.xml
+++ b/tests/integration/jersey-2846/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2846</artifactId>
diff --git a/tests/integration/jersey-2878/pom.xml b/tests/integration/jersey-2878/pom.xml
index 9afb2cc..e5714bd 100644
--- a/tests/integration/jersey-2878/pom.xml
+++ b/tests/integration/jersey-2878/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2878</artifactId>
diff --git a/tests/integration/jersey-2892/pom.xml b/tests/integration/jersey-2892/pom.xml
index 98b6f93..6ab5e8c 100644
--- a/tests/integration/jersey-2892/pom.xml
+++ b/tests/integration/jersey-2892/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-2892</artifactId>
diff --git a/tests/integration/jersey-3662/pom.xml b/tests/integration/jersey-3662/pom.xml
index 1efc3bd..546afa9 100644
--- a/tests/integration/jersey-3662/pom.xml
+++ b/tests/integration/jersey-3662/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-3670/pom.xml b/tests/integration/jersey-3670/pom.xml
index d3072ce..a816335 100644
--- a/tests/integration/jersey-3670/pom.xml
+++ b/tests/integration/jersey-3670/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-3670</artifactId>
diff --git a/tests/integration/jersey-3796/pom.xml b/tests/integration/jersey-3796/pom.xml
index 9b2e569..60d18c3 100644
--- a/tests/integration/jersey-3796/pom.xml
+++ b/tests/integration/jersey-3796/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-3796</artifactId>
diff --git a/tests/integration/jersey-3992/pom.xml b/tests/integration/jersey-3992/pom.xml
index 94d68a5..5229deb 100644
--- a/tests/integration/jersey-3992/pom.xml
+++ b/tests/integration/jersey-3992/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-3992</artifactId>
diff --git a/tests/integration/jersey-4003/pom.xml b/tests/integration/jersey-4003/pom.xml
index 21cca1b..d2c3b9e 100644
--- a/tests/integration/jersey-4003/pom.xml
+++ b/tests/integration/jersey-4003/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-4099/pom.xml b/tests/integration/jersey-4099/pom.xml
index f0c0b82..f43fc7f 100644
--- a/tests/integration/jersey-4099/pom.xml
+++ b/tests/integration/jersey-4099/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-4099</artifactId>
diff --git a/tests/integration/jersey-4507/pom.xml b/tests/integration/jersey-4507/pom.xml
index 5a9ff7b..e404fb4 100644
--- a/tests/integration/jersey-4507/pom.xml
+++ b/tests/integration/jersey-4507/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-4542/pom.xml b/tests/integration/jersey-4542/pom.xml
index e4910a6..2ab81ab 100644
--- a/tests/integration/jersey-4542/pom.xml
+++ b/tests/integration/jersey-4542/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml b/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml
index d6b4b48..fec2dcc 100644
--- a/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml
+++ b/tests/integration/jersey-4542/src/test/resources/META-INF/beans.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2020, 2022 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 886355f..55e9704 100644
--- a/tests/integration/jersey-4697/pom.xml
+++ b/tests/integration/jersey-4697/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-4722/pom.xml b/tests/integration/jersey-4722/pom.xml
index 0ace83b..5c78b7f 100644
--- a/tests/integration/jersey-4722/pom.xml
+++ b/tests/integration/jersey-4722/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-4949/pom.xml b/tests/integration/jersey-4949/pom.xml
index 3f9cf51..5d7b363 100644
--- a/tests/integration/jersey-4949/pom.xml
+++ b/tests/integration/jersey-4949/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-4949</artifactId>
diff --git a/tests/integration/jersey-5087/pom.xml b/tests/integration/jersey-5087/pom.xml
index ad82ef5..f604488 100644
--- a/tests/integration/jersey-5087/pom.xml
+++ b/tests/integration/jersey-5087/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-5796/pom.xml b/tests/integration/jersey-5796/pom.xml
index 437fb7f..5531e26 100644
--- a/tests/integration/jersey-5796/pom.xml
+++ b/tests/integration/jersey-5796/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/jersey-780/pom.xml b/tests/integration/jersey-780/pom.xml
index f94601a..5d0477a 100644
--- a/tests/integration/jersey-780/pom.xml
+++ b/tests/integration/jersey-780/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-780</artifactId>
diff --git a/tests/integration/microprofile/config/helidon/pom.xml b/tests/integration/microprofile/config/helidon/pom.xml
index 1948dc3..d2b39fe 100644
--- a/tests/integration/microprofile/config/helidon/pom.xml
+++ b/tests/integration/microprofile/config/helidon/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>microprofile-config-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/microprofile/config/pom.xml b/tests/integration/microprofile/config/pom.xml
index 426120f..f2ad68d 100644
--- a/tests/integration/microprofile/config/pom.xml
+++ b/tests/integration/microprofile/config/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>microprofile-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
diff --git a/tests/integration/microprofile/config/webapp/pom.xml b/tests/integration/microprofile/config/webapp/pom.xml
index f1a77c8..01f8c65 100644
--- a/tests/integration/microprofile/config/webapp/pom.xml
+++ b/tests/integration/microprofile/config/webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>microprofile-config-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/microprofile/pom.xml b/tests/integration/microprofile/pom.xml
index 284d717..1fe5fec 100644
--- a/tests/integration/microprofile/pom.xml
+++ b/tests/integration/microprofile/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
diff --git a/tests/integration/microprofile/rest-client-tck/pom.xml b/tests/integration/microprofile/rest-client-tck/pom.xml
index b2ccaae..2bd563c 100644
--- a/tests/integration/microprofile/rest-client-tck/pom.xml
+++ b/tests/integration/microprofile/rest-client-tck/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>microprofile-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/microprofile/rest-client-tck3/pom.xml b/tests/integration/microprofile/rest-client-tck3/pom.xml
index d6831f6..26f7d21 100644
--- a/tests/integration/microprofile/rest-client-tck3/pom.xml
+++ b/tests/integration/microprofile/rest-client-tck3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>microprofile-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/microprofile/rest-client/pom.xml b/tests/integration/microprofile/rest-client/pom.xml
index d65bd38..d6650f6 100644
--- a/tests/integration/microprofile/rest-client/pom.xml
+++ b/tests/integration/microprofile/rest-client/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>microprofile-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.microprofile</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/pom.xml b/tests/integration/pom.xml
index 48ce07a..d36d259 100644
--- a/tests/integration/pom.xml
+++ b/tests/integration/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
diff --git a/tests/integration/property-check/pom.xml b/tests/integration/property-check/pom.xml
index d207ac6..4d15168 100644
--- a/tests/integration/property-check/pom.xml
+++ b/tests/integration/property-check/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>property-check</artifactId>
diff --git a/tests/integration/reactive-streams/pom.xml b/tests/integration/reactive-streams/pom.xml
index f1864b9..8f6c3cb 100644
--- a/tests/integration/reactive-streams/pom.xml
+++ b/tests/integration/reactive-streams/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
diff --git a/tests/integration/reactive-streams/sse/pom.xml b/tests/integration/reactive-streams/sse/pom.xml
index a8ed594..691e4e6 100644
--- a/tests/integration/reactive-streams/sse/pom.xml
+++ b/tests/integration/reactive-streams/sse/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>reactive-streams-integration-project</artifactId>
<groupId>org.glassfish.jersey.tests.integration.reactive</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/resteasy-client/pom.xml b/tests/integration/resteasy-client/pom.xml
index b0f699a..420209f 100644
--- a/tests/integration/resteasy-client/pom.xml
+++ b/tests/integration/resteasy-client/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>resteasy-client</artifactId>
diff --git a/tests/integration/security-digest/pom.xml b/tests/integration/security-digest/pom.xml
index be8198e..f411e57 100644
--- a/tests/integration/security-digest/pom.xml
+++ b/tests/integration/security-digest/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>security-digest</artifactId>
diff --git a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
index 4adb50d..df8cdbb 100644
--- a/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
+++ b/tests/integration/servlet-2.5-autodiscovery-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-autodiscovery-1</artifactId>
diff --git a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
index 6c99728..4020a81 100644
--- a/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
+++ b/tests/integration/servlet-2.5-autodiscovery-2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-autodiscovery-2</artifactId>
diff --git a/tests/integration/servlet-2.5-filter/pom.xml b/tests/integration/servlet-2.5-filter/pom.xml
index d476f98..8ccdb50 100644
--- a/tests/integration/servlet-2.5-filter/pom.xml
+++ b/tests/integration/servlet-2.5-filter/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-filter</artifactId>
diff --git a/tests/integration/servlet-2.5-inflector-1/pom.xml b/tests/integration/servlet-2.5-inflector-1/pom.xml
index 377a65a..22a0512 100644
--- a/tests/integration/servlet-2.5-inflector-1/pom.xml
+++ b/tests/integration/servlet-2.5-inflector-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-inflector-1</artifactId>
diff --git a/tests/integration/servlet-2.5-init-1/pom.xml b/tests/integration/servlet-2.5-init-1/pom.xml
index cdb6e72..24fc1e4 100644
--- a/tests/integration/servlet-2.5-init-1/pom.xml
+++ b/tests/integration/servlet-2.5-init-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-1</artifactId>
diff --git a/tests/integration/servlet-2.5-init-2/pom.xml b/tests/integration/servlet-2.5-init-2/pom.xml
index 862411c..708f331 100644
--- a/tests/integration/servlet-2.5-init-2/pom.xml
+++ b/tests/integration/servlet-2.5-init-2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-2</artifactId>
diff --git a/tests/integration/servlet-2.5-init-3/pom.xml b/tests/integration/servlet-2.5-init-3/pom.xml
index 5aabfcb..4706f10 100644
--- a/tests/integration/servlet-2.5-init-3/pom.xml
+++ b/tests/integration/servlet-2.5-init-3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-3</artifactId>
diff --git a/tests/integration/servlet-2.5-init-4/pom.xml b/tests/integration/servlet-2.5-init-4/pom.xml
index 7379729..bad4554 100644
--- a/tests/integration/servlet-2.5-init-4/pom.xml
+++ b/tests/integration/servlet-2.5-init-4/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-4</artifactId>
diff --git a/tests/integration/servlet-2.5-init-5/pom.xml b/tests/integration/servlet-2.5-init-5/pom.xml
index 089b278..8476503 100644
--- a/tests/integration/servlet-2.5-init-5/pom.xml
+++ b/tests/integration/servlet-2.5-init-5/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-5</artifactId>
diff --git a/tests/integration/servlet-2.5-init-6/pom.xml b/tests/integration/servlet-2.5-init-6/pom.xml
index 4b84362..ef5104b 100644
--- a/tests/integration/servlet-2.5-init-6/pom.xml
+++ b/tests/integration/servlet-2.5-init-6/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-6</artifactId>
diff --git a/tests/integration/servlet-2.5-init-7/pom.xml b/tests/integration/servlet-2.5-init-7/pom.xml
index b281f08..00fb432 100644
--- a/tests/integration/servlet-2.5-init-7/pom.xml
+++ b/tests/integration/servlet-2.5-init-7/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-7</artifactId>
diff --git a/tests/integration/servlet-2.5-init-8/pom.xml b/tests/integration/servlet-2.5-init-8/pom.xml
index 9cc5081..f9d1194 100644
--- a/tests/integration/servlet-2.5-init-8/pom.xml
+++ b/tests/integration/servlet-2.5-init-8/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-init-8</artifactId>
diff --git a/tests/integration/servlet-2.5-mvc-1/pom.xml b/tests/integration/servlet-2.5-mvc-1/pom.xml
index ab48b30..e4280c1 100644
--- a/tests/integration/servlet-2.5-mvc-1/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-mvc-1</artifactId>
diff --git a/tests/integration/servlet-2.5-mvc-2/pom.xml b/tests/integration/servlet-2.5-mvc-2/pom.xml
index 9d431d4..ff4aaee 100644
--- a/tests/integration/servlet-2.5-mvc-2/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-mvc-2</artifactId>
diff --git a/tests/integration/servlet-2.5-mvc-3/pom.xml b/tests/integration/servlet-2.5-mvc-3/pom.xml
index b168678..1a96f7b 100644
--- a/tests/integration/servlet-2.5-mvc-3/pom.xml
+++ b/tests/integration/servlet-2.5-mvc-3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-mvc-3</artifactId>
diff --git a/tests/integration/servlet-2.5-reload/pom.xml b/tests/integration/servlet-2.5-reload/pom.xml
index bf65e6a..843b1d1 100644
--- a/tests/integration/servlet-2.5-reload/pom.xml
+++ b/tests/integration/servlet-2.5-reload/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-2.5-reload</artifactId>
diff --git a/tests/integration/servlet-3-async/pom.xml b/tests/integration/servlet-3-async/pom.xml
index d8602b3..e6d2ee4 100644
--- a/tests/integration/servlet-3-async/pom.xml
+++ b/tests/integration/servlet-3-async/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-async</artifactId>
diff --git a/tests/integration/servlet-3-chunked-io/pom.xml b/tests/integration/servlet-3-chunked-io/pom.xml
index 5a53750..38e9a10 100644
--- a/tests/integration/servlet-3-chunked-io/pom.xml
+++ b/tests/integration/servlet-3-chunked-io/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-chunked-io</artifactId>
diff --git a/tests/integration/servlet-3-filter/pom.xml b/tests/integration/servlet-3-filter/pom.xml
index 3612098..e1c3c0c 100644
--- a/tests/integration/servlet-3-filter/pom.xml
+++ b/tests/integration/servlet-3-filter/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-filter</artifactId>
diff --git a/tests/integration/servlet-3-gf-async/pom.xml b/tests/integration/servlet-3-gf-async/pom.xml
index 9758162..696b834 100644
--- a/tests/integration/servlet-3-gf-async/pom.xml
+++ b/tests/integration/servlet-3-gf-async/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-gf-async</artifactId>
diff --git a/tests/integration/servlet-3-inflector-1/pom.xml b/tests/integration/servlet-3-inflector-1/pom.xml
index 378125d..dd969f0 100644
--- a/tests/integration/servlet-3-inflector-1/pom.xml
+++ b/tests/integration/servlet-3-inflector-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-inflector-1</artifactId>
diff --git a/tests/integration/servlet-3-init-1/pom.xml b/tests/integration/servlet-3-init-1/pom.xml
index 72b7943..b572553 100644
--- a/tests/integration/servlet-3-init-1/pom.xml
+++ b/tests/integration/servlet-3-init-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-1</artifactId>
diff --git a/tests/integration/servlet-3-init-2/pom.xml b/tests/integration/servlet-3-init-2/pom.xml
index be40c0f..fbe8f78 100644
--- a/tests/integration/servlet-3-init-2/pom.xml
+++ b/tests/integration/servlet-3-init-2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-2</artifactId>
diff --git a/tests/integration/servlet-3-init-3/pom.xml b/tests/integration/servlet-3-init-3/pom.xml
index d39f359..93dcb8b 100644
--- a/tests/integration/servlet-3-init-3/pom.xml
+++ b/tests/integration/servlet-3-init-3/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-3</artifactId>
diff --git a/tests/integration/servlet-3-init-4/pom.xml b/tests/integration/servlet-3-init-4/pom.xml
index 99213e7..9a315da 100644
--- a/tests/integration/servlet-3-init-4/pom.xml
+++ b/tests/integration/servlet-3-init-4/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-4</artifactId>
diff --git a/tests/integration/servlet-3-init-5/pom.xml b/tests/integration/servlet-3-init-5/pom.xml
index 574819d..701b957 100644
--- a/tests/integration/servlet-3-init-5/pom.xml
+++ b/tests/integration/servlet-3-init-5/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-5</artifactId>
diff --git a/tests/integration/servlet-3-init-6/pom.xml b/tests/integration/servlet-3-init-6/pom.xml
index a3138d4..a9007c7 100644
--- a/tests/integration/servlet-3-init-6/pom.xml
+++ b/tests/integration/servlet-3-init-6/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-6</artifactId>
diff --git a/tests/integration/servlet-3-init-7/pom.xml b/tests/integration/servlet-3-init-7/pom.xml
index 7fbdbb1..672811d 100644
--- a/tests/integration/servlet-3-init-7/pom.xml
+++ b/tests/integration/servlet-3-init-7/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-7</artifactId>
diff --git a/tests/integration/servlet-3-init-8/pom.xml b/tests/integration/servlet-3-init-8/pom.xml
index 1a56097..ad028d8 100644
--- a/tests/integration/servlet-3-init-8/pom.xml
+++ b/tests/integration/servlet-3-init-8/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-8</artifactId>
diff --git a/tests/integration/servlet-3-init-9/pom.xml b/tests/integration/servlet-3-init-9/pom.xml
index 4b81fad..67b9f6c 100644
--- a/tests/integration/servlet-3-init-9/pom.xml
+++ b/tests/integration/servlet-3-init-9/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-9</artifactId>
diff --git a/tests/integration/servlet-3-init-provider/pom.xml b/tests/integration/servlet-3-init-provider/pom.xml
index 09c0d8f..d5d6e20 100644
--- a/tests/integration/servlet-3-init-provider/pom.xml
+++ b/tests/integration/servlet-3-init-provider/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-init-provider</artifactId>
diff --git a/tests/integration/servlet-3-params/pom.xml b/tests/integration/servlet-3-params/pom.xml
index 5c4a33d..6a334d5 100644
--- a/tests/integration/servlet-3-params/pom.xml
+++ b/tests/integration/servlet-3-params/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-params</artifactId>
diff --git a/tests/integration/servlet-3-sse-1/pom.xml b/tests/integration/servlet-3-sse-1/pom.xml
index 554d209..74b3e92 100644
--- a/tests/integration/servlet-3-sse-1/pom.xml
+++ b/tests/integration/servlet-3-sse-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-3-sse-1</artifactId>
diff --git a/tests/integration/servlet-4.0-mvc-1/pom.xml b/tests/integration/servlet-4.0-mvc-1/pom.xml
index ced7516..d045bf8 100644
--- a/tests/integration/servlet-4.0-mvc-1/pom.xml
+++ b/tests/integration/servlet-4.0-mvc-1/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-4.0-mvc-1</artifactId>
diff --git a/tests/integration/servlet-request-wrapper-binding-2/pom.xml b/tests/integration/servlet-request-wrapper-binding-2/pom.xml
index 773662d..f8bc5b3 100644
--- a/tests/integration/servlet-request-wrapper-binding-2/pom.xml
+++ b/tests/integration/servlet-request-wrapper-binding-2/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-request-wrappper-binding-2</artifactId>
diff --git a/tests/integration/servlet-request-wrapper-binding/pom.xml b/tests/integration/servlet-request-wrapper-binding/pom.xml
index 4307850..fd94a08 100644
--- a/tests/integration/servlet-request-wrapper-binding/pom.xml
+++ b/tests/integration/servlet-request-wrapper-binding/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-request-wrappper-binding</artifactId>
diff --git a/tests/integration/servlet-tests/pom.xml b/tests/integration/servlet-tests/pom.xml
index fac7639..c6ff62d 100644
--- a/tests/integration/servlet-tests/pom.xml
+++ b/tests/integration/servlet-tests/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>servlet-tests</artifactId>
diff --git a/tests/integration/sonar-test/pom.xml b/tests/integration/sonar-test/pom.xml
index 8711622..69c44e2 100644
--- a/tests/integration/sonar-test/pom.xml
+++ b/tests/integration/sonar-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>sonar-test</artifactId>
diff --git a/tests/integration/spring6/pom.xml b/tests/integration/spring6/pom.xml
index 8ef2e0e..7caf098 100644
--- a/tests/integration/spring6/pom.xml
+++ b/tests/integration/spring6/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>spring6</artifactId>
diff --git a/tests/integration/thin-server/pom.xml b/tests/integration/thin-server/pom.xml
index a1eec94..4d3e26e 100644
--- a/tests/integration/thin-server/pom.xml
+++ b/tests/integration/thin-server/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests.integration</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/integration/tracing-support/pom.xml b/tests/integration/tracing-support/pom.xml
index afe4a9b..7a0b8db 100644
--- a/tests/integration/tracing-support/pom.xml
+++ b/tests/integration/tracing-support/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.integration</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>tracing-support</artifactId>
diff --git a/tests/jersey-tck/pom.xml b/tests/jersey-tck/pom.xml
index 417bdf2..020978c 100644
--- a/tests/jersey-tck/pom.xml
+++ b/tests/jersey-tck/pom.xml
@@ -538,7 +538,7 @@
<profile>
<id>jersey-tck</id>
<properties>
- <jersey.version>4.0.99-SNAPSHOT</jersey.version> <!-- When running the profile, use SNAPSHOT -->
+ <jersey.version>${revision}</jersey.version> <!-- When running the profile, use SNAPSHOT -->
</properties>
</profile>
</profiles>
diff --git a/tests/jmockit/pom.xml b/tests/jmockit/pom.xml
index 7494d1f..260cdb0 100644
--- a/tests/jmockit/pom.xml
+++ b/tests/jmockit/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>project</artifactId>
<groupId>org.glassfish.jersey.tests</groupId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/tests/mem-leaks/pom.xml b/tests/mem-leaks/pom.xml
index c94b1d1..b03f3ed 100644
--- a/tests/mem-leaks/pom.xml
+++ b/tests/mem-leaks/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.memleaks</groupId>
diff --git a/tests/mem-leaks/redeployment/pom.xml b/tests/mem-leaks/redeployment/pom.xml
index 132bebb..6765e38 100644
--- a/tests/mem-leaks/redeployment/pom.xml
+++ b/tests/mem-leaks/redeployment/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.memleaks.redeployment</groupId>
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 4afb939..152bfda 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
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.redeployment</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>redeployment-hello-world-app-ref</artifactId>
@@ -132,7 +132,7 @@
<groupId>org.glassfish.jersey.examples</groupId>
<artifactId>helloworld-webapp</artifactId>
<type>war</type>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</dependency>
</dependencies>
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 a10c517..a0b7610 100644
--- a/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-leaking-test-app/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.redeployment</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>redeployment-leaking-test-app</artifactId>
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 b0cc72a..e4b88e8 100644
--- a/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-no-jersey-app/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.redeployment</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>redeployment-no-jersey-app</artifactId>
diff --git a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
index 323fad7..4012475 100644
--- a/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
+++ b/tests/mem-leaks/redeployment/redeployment-threadlocals-app/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.redeployment</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>redeployment-threadlocals-app</artifactId>
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 f07aa35..6a8a1b6 100644
--- a/tests/mem-leaks/test-cases/bean-param-leak/pom.xml
+++ b/tests/mem-leaks/test-cases/bean-param-leak/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>bean-param-leak</artifactId>
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 b708b06..ac70dd4 100644
--- a/tests/mem-leaks/test-cases/leaking-test-app/pom.xml
+++ b/tests/mem-leaks/test-cases/leaking-test-app/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>leaking-test-app</artifactId>
diff --git a/tests/mem-leaks/test-cases/pom.xml b/tests/mem-leaks/test-cases/pom.xml
index 5a445b2..b4be515 100644
--- a/tests/mem-leaks/test-cases/pom.xml
+++ b/tests/mem-leaks/test-cases/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.memleaks.testcases</groupId>
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 7a50dd6..012448b 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
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>shutdown-hook-leak-client</artifactId>
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 5d37ec4..ed31288 100644
--- a/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml
+++ b/tests/mem-leaks/test-cases/shutdown-hook-leak/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.memleaks.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>shutdown-hook-leak</artifactId>
diff --git a/tests/osgi/functional/pom.xml b/tests/osgi/functional/pom.xml
index f436d65..2477a10 100644
--- a/tests/osgi/functional/pom.xml
+++ b/tests/osgi/functional/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.osgi</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>jersey-tests-osgi-functional</artifactId>
diff --git a/tests/osgi/pom.xml b/tests/osgi/pom.xml
index f6b3f5b..a0b0d37 100644
--- a/tests/osgi/pom.xml
+++ b/tests/osgi/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.osgi</groupId>
diff --git a/tests/performance/benchmarks/pom.xml b/tests/performance/benchmarks/pom.xml
index 12e47b6..d63c26c 100644
--- a/tests/performance/benchmarks/pom.xml
+++ b/tests/performance/benchmarks/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>performance-test-benchmarks</artifactId>
diff --git a/tests/performance/pom.xml b/tests/performance/pom.xml
index 12db434..cf74e1b 100644
--- a/tests/performance/pom.xml
+++ b/tests/performance/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.performance</groupId>
diff --git a/tests/performance/runners/jersey-grizzly-runner/pom.xml b/tests/performance/runners/jersey-grizzly-runner/pom.xml
index ade1ddf..4cd92e4 100644
--- a/tests/performance/runners/jersey-grizzly-runner/pom.xml
+++ b/tests/performance/runners/jersey-grizzly-runner/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.runners</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
diff --git a/tests/performance/runners/pom.xml b/tests/performance/runners/pom.xml
index 178471d..f8677ca 100644
--- a/tests/performance/runners/pom.xml
+++ b/tests/performance/runners/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.performance.runners</groupId>
diff --git a/tests/performance/test-cases/assemblies/pom.xml b/tests/performance/test-cases/assemblies/pom.xml
index 097af8e..5b56691 100644
--- a/tests/performance/test-cases/assemblies/pom.xml
+++ b/tests/performance/test-cases/assemblies/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>assemblies</artifactId>
diff --git a/tests/performance/test-cases/filter-dynamic/pom.xml b/tests/performance/test-cases/filter-dynamic/pom.xml
index ab9edc9..26e065b 100644
--- a/tests/performance/test-cases/filter-dynamic/pom.xml
+++ b/tests/performance/test-cases/filter-dynamic/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>filter-dynamic</artifactId>
diff --git a/tests/performance/test-cases/filter-global/pom.xml b/tests/performance/test-cases/filter-global/pom.xml
index 300e6e5..3b84271 100644
--- a/tests/performance/test-cases/filter-global/pom.xml
+++ b/tests/performance/test-cases/filter-global/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>filter-global</artifactId>
diff --git a/tests/performance/test-cases/filter-name/pom.xml b/tests/performance/test-cases/filter-name/pom.xml
index 07ede67..c8c49c3 100644
--- a/tests/performance/test-cases/filter-name/pom.xml
+++ b/tests/performance/test-cases/filter-name/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>filter-name</artifactId>
diff --git a/tests/performance/test-cases/interceptor-dynamic/pom.xml b/tests/performance/test-cases/interceptor-dynamic/pom.xml
index 535a03c..d5974fa 100644
--- a/tests/performance/test-cases/interceptor-dynamic/pom.xml
+++ b/tests/performance/test-cases/interceptor-dynamic/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>interceptor-dynamic</artifactId>
diff --git a/tests/performance/test-cases/interceptor-global/pom.xml b/tests/performance/test-cases/interceptor-global/pom.xml
index 486ab5a..353c7eb 100644
--- a/tests/performance/test-cases/interceptor-global/pom.xml
+++ b/tests/performance/test-cases/interceptor-global/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>interceptor-global</artifactId>
diff --git a/tests/performance/test-cases/interceptor-name/pom.xml b/tests/performance/test-cases/interceptor-name/pom.xml
index 91b6186..7015ee3 100644
--- a/tests/performance/test-cases/interceptor-name/pom.xml
+++ b/tests/performance/test-cases/interceptor-name/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>interceptor-name</artifactId>
diff --git a/tests/performance/test-cases/mbw-custom-provider/pom.xml b/tests/performance/test-cases/mbw-custom-provider/pom.xml
index 402d4ba..3d65025 100644
--- a/tests/performance/test-cases/mbw-custom-provider/pom.xml
+++ b/tests/performance/test-cases/mbw-custom-provider/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>custom-provider</artifactId>
diff --git a/tests/performance/test-cases/mbw-json-jackson/pom.xml b/tests/performance/test-cases/mbw-json-jackson/pom.xml
index 7ef71fb..07b1385 100644
--- a/tests/performance/test-cases/mbw-json-jackson/pom.xml
+++ b/tests/performance/test-cases/mbw-json-jackson/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-jackson</artifactId>
diff --git a/tests/performance/test-cases/mbw-json-moxy/pom.xml b/tests/performance/test-cases/mbw-json-moxy/pom.xml
index 54350fb..721ba47 100644
--- a/tests/performance/test-cases/mbw-json-moxy/pom.xml
+++ b/tests/performance/test-cases/mbw-json-moxy/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>json-moxy</artifactId>
diff --git a/tests/performance/test-cases/mbw-kryo/pom.xml b/tests/performance/test-cases/mbw-kryo/pom.xml
index 603fa10..a91dbf8 100644
--- a/tests/performance/test-cases/mbw-kryo/pom.xml
+++ b/tests/performance/test-cases/mbw-kryo/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>mbw-kryo</artifactId>
diff --git a/tests/performance/test-cases/mbw-text-plain/pom.xml b/tests/performance/test-cases/mbw-text-plain/pom.xml
index b764299..299f771 100644
--- a/tests/performance/test-cases/mbw-text-plain/pom.xml
+++ b/tests/performance/test-cases/mbw-text-plain/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>text-plain</artifactId>
diff --git a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
index 62bf4b1..5b7d6a0 100644
--- a/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
+++ b/tests/performance/test-cases/mbw-xml-jaxb/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>xml-jaxb</artifactId>
diff --git a/tests/performance/test-cases/mbw-xml-moxy/pom.xml b/tests/performance/test-cases/mbw-xml-moxy/pom.xml
index 83d1feb..e077083 100644
--- a/tests/performance/test-cases/mbw-xml-moxy/pom.xml
+++ b/tests/performance/test-cases/mbw-xml-moxy/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>xml-moxy</artifactId>
diff --git a/tests/performance/test-cases/monitoring/pom.xml b/tests/performance/test-cases/monitoring/pom.xml
index d5b84bd..04d00ad 100644
--- a/tests/performance/test-cases/monitoring/pom.xml
+++ b/tests/performance/test-cases/monitoring/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2014, 2022 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
@@ -30,6 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jersey.version>2.47</jersey.version>
</properties>
<dependencies>
@@ -43,31 +44,32 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
- <version>5.10.2</version>
+ <version>5.13.4</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.18.0</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.17.0</version>
+ <version>1.19.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
- <version>2.0.13</version>
+ <version>2.0.17</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-grizzly2-http</artifactId>
+ <version>${jersey.version}</version>
</dependency>
</dependencies>
@@ -88,7 +90,7 @@
<phase>package</phase>
<!-- append to the packaging phase. -->
<goals>
- <goal>attached</goal>
+ <goal>single</goal>
<!-- goals == mojos -->
</goals>
</execution>
@@ -97,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.13.0</version>
+ <version>3.14.0</version>
<inherited>true</inherited>
<configuration>
<source>1.8</source>
diff --git a/tests/performance/test-cases/monitoring/src/main/assembly/zip-with-jars.xml b/tests/performance/test-cases/monitoring/src/main/assembly/zip-with-jars.xml
new file mode 100644
index 0000000..1b42712
--- /dev/null
+++ b/tests/performance/test-cases/monitoring/src/main/assembly/zip-with-jars.xml
@@ -0,0 +1,35 @@
+<!--
+
+ 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
+
+-->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>zip-with-jars</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <useProjectArtifact>true</useProjectArtifact>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/tests/performance/test-cases/param-srl/pom.xml b/tests/performance/test-cases/param-srl/pom.xml
index 6e2b2a0..873c284 100644
--- a/tests/performance/test-cases/param-srl/pom.xml
+++ b/tests/performance/test-cases/param-srl/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>param-srl</artifactId>
diff --git a/tests/performance/test-cases/pom.xml b/tests/performance/test-cases/pom.xml
index 0f852d8..086b88a 100644
--- a/tests/performance/test-cases/pom.xml
+++ b/tests/performance/test-cases/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
diff --git a/tests/performance/test-cases/proxy-injection/pom.xml b/tests/performance/test-cases/proxy-injection/pom.xml
index b632fae..517aca5 100644
--- a/tests/performance/test-cases/proxy-injection/pom.xml
+++ b/tests/performance/test-cases/proxy-injection/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance.testcases</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>proxy-injection</artifactId>
diff --git a/tests/performance/tools/pom.xml b/tests/performance/tools/pom.xml
index b9ecdd3..f10d025 100644
--- a/tests/performance/tools/pom.xml
+++ b/tests/performance/tools/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.glassfish.jersey.tests.performance</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests.performance.tools</groupId>
<artifactId>performance-test-tools</artifactId>
diff --git a/tests/pom.xml b/tests/pom.xml
index 82e071d..0764432 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<groupId>org.glassfish.jersey.tests</groupId>
diff --git a/tests/release-test/pom.xml b/tests/release-test/pom.xml
index 1be9c8f..26a83cf 100644
--- a/tests/release-test/pom.xml
+++ b/tests/release-test/pom.xml
@@ -23,13 +23,13 @@
<parent>
<groupId>org.glassfish.jersey</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>release-test</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
<packaging>jar</packaging>
<name>jersey-release-test</name>
@@ -56,6 +56,7 @@
<includes>
<include>**/ArchetypesTest</include>
<include>**/NoticeFilesTest</include>
+ <include>**/JavaxOccurrenceTest</include>
<include>**/MoxyAsmTest</include>
</includes>
</configuration>
diff --git a/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/JavaxOccurrenceTest.java b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/JavaxOccurrenceTest.java
new file mode 100644
index 0000000..9a94141
--- /dev/null
+++ b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/JavaxOccurrenceTest.java
@@ -0,0 +1,141 @@
+/*
+ * 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.artifacts;
+
+import org.glassfish.jersey.message.internal.ReaderWriter;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.nio.file.FileVisitResult;
+import java.nio.file.FileVisitor;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.stream.Stream;
+
+public class JavaxOccurrenceTest {
+
+ private static final String[] packages = {"javax.ws.rs"};
+
+ @Test
+ public void testSources() throws IOException {
+ TestResult result = new TestResult();
+ Path root = Paths.get(".").toAbsolutePath().getParent().getParent().getParent();
+ Assert.assertTrue(Files.exists(root) && Files.isDirectory(root));
+ Files.walkFileTree(root, new FileVisitor<>() {
+ @Override
+ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+ if (isSourceFolder(dir)) {
+ result.ok().append("parsing ").println(dir.toString());
+ Files.walkFileTree(dir.resolve("main"), new SrcWalker(result));
+ return FileVisitResult.CONTINUE;
+ } else if (isModule(dir)) {
+ return FileVisitResult.CONTINUE;
+ } else {
+ return FileVisitResult.SKIP_SUBTREE;
+ }
+ }
+
+ @Override
+ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+ return FileVisitResult.CONTINUE;
+ }
+ });
+
+ if (result.exception().builder.length() == 0) {
+ result.ok().append("All java files are Jakartified correctly");
+ }
+ if (!result.result()) {
+ Assert.fail();
+ }
+ }
+
+ private static class SrcWalker implements FileVisitor<Path> {
+
+ private final TestResult testResult;
+
+ private SrcWalker(TestResult testResult) {
+ this.testResult = testResult;
+ }
+
+ @Override
+ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {
+ String path = dir.toAbsolutePath().toString();
+ boolean cont = (path.contains("main") || path.contains("test")) && !path.contains("resources");
+ return cont ? FileVisitResult.CONTINUE : FileVisitResult.SKIP_SUBTREE;
+ }
+
+ @Override
+ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+ if (file.toString().endsWith(".java")) {
+ parseFile(file, testResult);
+ }
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
+ return FileVisitResult.CONTINUE;
+ }
+
+ @Override
+ public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+ return FileVisitResult.CONTINUE;
+ }
+ }
+
+ private static boolean isModule(Path path) throws IOException {
+ try (Stream<Path> stream = Files.list(path)) {
+ return stream.anyMatch(path1 -> path1.getFileName().toString().equals("pom.xml"));
+ }
+ }
+
+ private static boolean isSourceFolder(Path path) {
+ return path.getFileName().startsWith("src");
+ }
+
+ private static void parseFile(Path path, TestResult testResult) throws IOException {
+ String file = path.toString();
+ if (file.contains("MetricsRequestEventListener") || file.contains("ObservationRequestEventListener")) {
+ // these contain both javax && jakarta
+ return;
+ }
+ for (String row : ReaderWriter.readFromAsString(Files.newBufferedReader(path)).split("\n")) {
+ parseRow(file, row, testResult);
+ }
+ }
+
+ private static void parseRow(String path, String row, TestResult result) {
+ for (String pkg : packages) {
+ if (row.contains(pkg)) {
+ result.exception().append("Error in file ").append(path).append(" - contains ").println(pkg);
+ }
+ }
+ }
+}
diff --git a/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/ManifestTest.java b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/ManifestTest.java
index a520868..901c675 100644
--- a/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/ManifestTest.java
+++ b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/ManifestTest.java
@@ -1,5 +1,5 @@
/*
- * 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
@@ -81,6 +81,12 @@
}
}
+ String importPackage = jarFile.getManifest().getMainAttributes().getValue("Import-Package");
+ if (importPackage == null) {
+ testResult.exception().append("No Import-Package in module ").println(jar.getName());
+ } else if (importPackage.contains("java.lang") || importPackage.contains("java.io")) {
+ testResult.exception().append("Import-Package contains java.* packages in ").println(jar.getName());
+ }
}
//Assertions.assertTrue(testResult.result(), "Some error occurred, see previous messages");
diff --git a/tests/stress/pom.xml b/tests/stress/pom.xml
index d3ff0d9..4bd7cf5 100644
--- a/tests/stress/pom.xml
+++ b/tests/stress/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.glassfish.jersey.tests</groupId>
<artifactId>project</artifactId>
- <version>4.0.99-SNAPSHOT</version>
+ <version>${revision}</version>
</parent>
<artifactId>stress</artifactId>
diff --git a/tools/jersey-release-notes-maven-plugin/pom.xml b/tools/jersey-release-notes-maven-plugin/pom.xml
index dfd342b..acd6678 100644
--- a/tools/jersey-release-notes-maven-plugin/pom.xml
+++ b/tools/jersey-release-notes-maven-plugin/pom.xml
@@ -136,6 +136,6 @@
<java.version>1.8</java.version>
<maven.version>3.9.9</maven.version>
<commons.io.version>2.19.0</commons.io.version>
- <junit.version>5.12.2</junit.version>
+ <junit.version>5.13.3</junit.version>
</properties>
</project>