diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ae6d728956e..3649b66514c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -15,7 +15,7 @@ name: "Validate" on: [pull_request, push] env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' JAVA_DISTRO: 'temurin' concurrency: diff --git a/NOTICE.md b/NOTICE.md index eeb54bd8fef..440dbecbcf9 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -95,7 +95,7 @@ KineticJS, v4.7.1 * Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS * Copyright: Eric Rowell -org.objectweb.asm Version 9.9 +org.objectweb.asm Version 9.9.1 * License: Modified BSD (https://asm.ow2.io/license.html) * Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved. diff --git a/bom/pom.xml b/bom/pom.xml index 145749c6050..a6ddff22313 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -446,7 +446,7 @@ org.codehaus.mojo flatten-maven-plugin - 1.7.2 + 1.7.3 true resolveCiFriendliesOnly diff --git a/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java index 47d5ced646b..0b6759e3eee 100644 --- a/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java +++ b/connectors/jetty-connector/src/main/java/org/glassfish/jersey/jetty/connector/JettyConnector.java @@ -16,6 +16,11 @@ package org.glassfish.jersey.jetty.connector; +import jakarta.ws.rs.ProcessingException; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.core.Configuration; +import jakarta.ws.rs.core.MultivaluedMap; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FilterInputStream; @@ -39,27 +44,31 @@ import java.util.logging.Level; import java.util.logging.Logger; -import jakarta.ws.rs.ProcessingException; -import jakarta.ws.rs.client.Client; -import jakarta.ws.rs.core.Configuration; -import jakarta.ws.rs.core.MultivaluedMap; - import javax.net.ssl.SSLContext; import org.eclipse.jetty.client.AuthenticationStore; import org.eclipse.jetty.client.BasicAuthentication; import org.eclipse.jetty.client.ByteBufferRequestContent; +import org.eclipse.jetty.client.CompletableResponseListener; import org.eclipse.jetty.client.ContentResponse; -import org.eclipse.jetty.client.FutureResponseListener; +import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.HttpClientTransport; +import org.eclipse.jetty.client.HttpProxy; import org.eclipse.jetty.client.OutputStreamRequestContent; +import org.eclipse.jetty.client.ProxyConfiguration; import org.eclipse.jetty.client.Request; import org.eclipse.jetty.client.Response; import org.eclipse.jetty.client.Result; import org.eclipse.jetty.client.transport.HttpClientTransportOverHTTP; import org.eclipse.jetty.client.transport.HttpRequest; import org.eclipse.jetty.http.HttpCookieStore; +import org.eclipse.jetty.http.HttpField; +import org.eclipse.jetty.http.HttpFields; +import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.io.ClientConnector; +import org.eclipse.jetty.util.Jetty; +import org.eclipse.jetty.util.ssl.SslContextFactory; +import org.eclipse.jetty.util.thread.QueuedThreadPool; import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.ClientRequest; import org.glassfish.jersey.client.ClientResponse; @@ -72,16 +81,6 @@ import org.glassfish.jersey.message.internal.OutboundMessageContext; import org.glassfish.jersey.message.internal.Statuses; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.HttpProxy; -import org.eclipse.jetty.client.ProxyConfiguration; -import org.eclipse.jetty.http.HttpField; -import org.eclipse.jetty.http.HttpFields; -import org.eclipse.jetty.http.HttpHeader; -import org.eclipse.jetty.util.Jetty; -import org.eclipse.jetty.util.ssl.SslContextFactory; -import org.eclipse.jetty.util.thread.QueuedThreadPool; - /** * A {@link Connector} that utilizes the Jetty HTTP Client to send and receive * HTTP request and responses. @@ -294,10 +293,11 @@ public ClientResponse apply(final ClientRequest jerseyRequest) throws Processing jettyResponse = jettyRequest.send(); } else { - final FutureResponseListener listener - = new FutureResponseListener(jettyRequest, syncListenerResponseMaxSize.get()); - jettyRequest.send(listener); - jettyResponse = listener.get(); + jettyResponse = new CompletableResponseListener( + jettyRequest, + syncListenerResponseMaxSize.get()) + .send() + .get(); } HeaderUtils.checkHeaderChanges(clientHeadersSnapshot, jerseyRequest.getHeaders(), JettyConnector.this.getClass().getName(), jerseyRequest.getConfiguration()); diff --git a/core-server/src/main/resources/META-INF/NOTICE.markdown b/core-server/src/main/resources/META-INF/NOTICE.markdown index a1216f6224e..8cc8f1ac83f 100644 --- a/core-server/src/main/resources/META-INF/NOTICE.markdown +++ b/core-server/src/main/resources/META-INF/NOTICE.markdown @@ -1,45 +1,45 @@ -# Notice for Jersey Core Server module -This content is produced and maintained by the Eclipse Jersey project. - -* https://projects.eclipse.org/projects/ee4j.jersey - -## Trademarks -Eclipse Jersey is a trademark of the Eclipse Foundation. - -## Copyright - -All content is the property of the respective authors or their employers. For -more information regarding authorship of content, please consult the listed -source code repository logs. - -## Declared Project Licenses - -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 - -## Source Code -The project maintains the following source code repositories: - -* https://github.com/eclipse-ee4j/jersey - -## Third-party Content - -org.glassfish.jersey.server.internal.monitoring.core -* License: Apache License, 2.0 -* 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.9 -* License: Modified BSD (https://asm.ow2.io/license.html) -* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved. - -W3.org documents -* License: W3C License -* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ +# Notice for Jersey Core Server module +This content is produced and maintained by the Eclipse Jersey project. + +* https://projects.eclipse.org/projects/ee4j.jersey + +## Trademarks +Eclipse Jersey is a trademark of the Eclipse Foundation. + +## Copyright + +All content is the property of the respective authors or their employers. For +more information regarding authorship of content, please consult the listed +source code repository logs. + +## Declared Project Licenses + +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 + +## Source Code +The project maintains the following source code repositories: + +* https://github.com/eclipse-ee4j/jersey + +## Third-party Content + +org.glassfish.jersey.server.internal.monitoring.core +* License: Apache License, 2.0 +* 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.9.1 +* License: Modified BSD (https://asm.ow2.io/license.html) +* Copyright: (c) 2000-2011 INRIA, France Telecom. All rights reserved. + +W3.org documents +* License: W3C License +* Copyright: Copyright (c) 1994-2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ diff --git a/examples/NOTICE.md b/examples/NOTICE.md index 630cd004d25..440c9a5a543 100644 --- a/examples/NOTICE.md +++ b/examples/NOTICE.md @@ -96,7 +96,7 @@ KineticJS, v4.7.1 * Project: http://www.kineticjs.com, https://github.com/ericdrowell/KineticJS * Copyright: Eric Rowell -org.objectweb.asm Version 9.9 +org.objectweb.asm Version 9.9.1 * License: Modified BSD (https://asm.ow2.io/license.html) * Copyright (c) 2000-2011 INRIA, France Telecom. All rights reserved. diff --git a/incubator/html-json/pom.xml b/incubator/html-json/pom.xml index 4b7b3029967..b38373e9f1d 100644 --- a/incubator/html-json/pom.xml +++ b/incubator/html-json/pom.xml @@ -39,7 +39,7 @@ - 1.8.1 + 1.8.2 true --add-exports org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED diff --git a/pom.xml b/pom.xml index 4735d77494c..8c2052bea64 100644 --- a/pom.xml +++ b/pom.xml @@ -295,6 +295,9 @@ + + 3.9.6 + ${java.version} @@ -1861,7 +1864,7 @@ com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + ${jackson.version2} @@ -2196,8 +2199,8 @@ 1.10.15 3.7.1 3.5.0 - 3.6.1 - 3.5.1 + 3.6.2 + 3.6.3 3.6.1 3.2.1 3.6.0 @@ -2207,7 +2210,7 @@ 3.8.1 3.1.4 3.4.0 - 3.5.3 + 3.5.5 5.1.9 3.0.5 5.1 @@ -2221,7 +2224,7 @@ 3.3.1 3.6.0 3.3.1 - 3.5.3 + 3.5.5 3.4.0 2.11.0 1.1.0 @@ -2234,7 +2237,7 @@ 4.0.0.Final - 9.9 + 9.9.1 1.9.24 1.70 @@ -2275,6 +2278,7 @@ 4.5.14 5.5 2.19.1 + 2.19.1 3.30.2-GA 1.3.7 3.3.2.Final @@ -2325,7 +2329,7 @@ 5.0.0.Alpha3 jakarta.enterprise.*;version="[4.0,6)" 4.0.1 - 4.0.2 + 5.0.0 1.16 2.0.0 4.0.0-M3 @@ -2353,13 +2357,13 @@ 2.1.3 4.0.0-M1 4.0.0-M1 - 4.0.2 - 4.0.5 + 4.0.5 + 4.0.6 4.0.0 4.0.0 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)" org.eclipse.jetty.*;version="[11,15)" - 12.0.27 + 12.1.7 9.4.58.v20250814 5.0.2 11.0.26 diff --git a/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/MoxyAsmTest.java b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/MoxyAsmTest.java index 4b3e6349eb9..993647c94d3 100644 --- a/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/MoxyAsmTest.java +++ b/tests/release-test/src/test/java/org/glassfish/jersey/test/artifacts/MoxyAsmTest.java @@ -18,34 +18,49 @@ import org.apache.maven.model.Dependency; import org.apache.maven.model.Model; -import org.junit.Assert; import org.junit.Test; +import static org.glassfish.jersey.test.artifacts.MavenUtil.getModelFromFile; +import static org.junit.Assert.assertEquals; + +// We test that org.ow2.asm:asm and org.eclipse.persistence:org.eclipse.persistence.asm are to some degree +// equal. +// +// It's not exactly clear what the tolerance is, and why we are checking this. public class MoxyAsmTest { + @Test public void testAsmInMoxy() throws Exception { - String moxyPomFile = "../../media/moxy/pom.xml"; - Model moxyPom = MavenUtil.getModelFromFile(moxyPomFile); - final Dependency moxyAsmDependency = moxyPom.getDependencies().stream() + Dependency moxyAsmDependency = + getModelFromFile("../../media/moxy/pom.xml") + .getDependencies() + .stream() .filter(dependency -> dependency.getArtifactId().equals("org.eclipse.persistence.asm")) .findFirst().get(); + Model projectPom = MavenUtil.getModelFromFile("../../pom.xml"); - final String asmVersion = projectPom.getProperties().getProperty("asm.version"); - final String moxyAsmVersion = findVersionInModel(moxyAsmDependency.getVersion(), projectPom); - final String lastTwo = moxyAsmVersion.substring(moxyAsmVersion.length() - 2); - final String msg = "org.eclipse.persistence.asm version " + moxyAsmVersion - + " differs from asm version " + asmVersion + " in /media/moxy/pom.xml"; - Assert.assertEquals(msg, asmVersion + lastTwo, moxyAsmVersion); + // org.ow2.asm:asm can be 9.9 or 9.9.1 + String asmVersion = projectPom.getProperties().getProperty("asm.version").substring(0, 4); + + // org.eclipse.persistence:org.eclipse.persistence.asm can be 9.7.1, 9.8.0, 9.9.1 + String moxyAsmVersion = findVersionInModel(moxyAsmDependency.getVersion(), projectPom).substring(0, 4); + + assertEquals( + "org.eclipse.persistence.asm version " + moxyAsmVersion + + " differs from asm version " + asmVersion + " in /media/moxy/pom.xml", + asmVersion, moxyAsmVersion); + System.out.println("Found expected Moxy ASM version " + moxyAsmVersion); } private static String findVersionInModel(String version, Model model) { if (version.startsWith("${")) { - String _version = version.substring(2, version.length() - 1); - return model.getProperties().getProperty(_version); - } else { - return version; + return + model.getProperties() + .getProperty(version.substring(2, version.length() - 1)); } + + return version; } } diff --git a/tests/version-agnostic/pom.xml b/tests/version-agnostic/pom.xml index 4cb55dd1f6d..dd88deb4267 100644 --- a/tests/version-agnostic/pom.xml +++ b/tests/version-agnostic/pom.xml @@ -47,7 +47,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.2 + 3.5.5 1 false