From 28a89ce35ed184437b67d1fa9e9e62e18d68a7f9 Mon Sep 17 00:00:00 2001 From: Maxim Nesen Date: Fri, 3 Dec 2021 13:11:01 +0100 Subject: [PATCH 1/2] Refactor processResponseError in ServerRuntime Signed-off-by: Maxim Nesen --- .../org/glassfish/jersey/server/ServerRuntime.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java index 07976531ae..981514c585 100644 --- a/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java +++ b/core-server/src/main/java/org/glassfish/jersey/server/ServerRuntime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0, which is available at @@ -460,6 +460,8 @@ private boolean processResponseError(final Throwable responseError) { final Iterable mappers = Providers.getAllProviders(runtime.injectionManager, ResponseErrorMapper.class); + ContainerResponse processedResponse = null; + try { Response processedError = null; for (final ResponseErrorMapper mapper : mappers) { @@ -470,11 +472,16 @@ private boolean processResponseError(final Throwable responseError) { } if (processedError != null) { - processResponse(new ContainerResponse(processingContext.request(), processedError)); + processedResponse = + processResponse(new ContainerResponse(processingContext.request(), processedError)); processed = true; } } catch (final Throwable throwable) { LOGGER.log(Level.FINE, LocalizationMessages.ERROR_EXCEPTION_MAPPING_PROCESSED_RESPONSE_ERROR(), throwable); + } finally { + if (processedResponse != null) { + release(processedResponse); + } } } From f7f4373993f9e93e563a305caaff7a6fd7943b41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Nie=C3=9Fing?= Date: Thu, 2 Dec 2021 22:35:44 +0100 Subject: [PATCH 2/2] Issue #4917 - Fix dependencies for Grizzly connector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exclude declared dependencies with other versions from grizzly-http-client Signed-off-by: Steffen Nießing --- connectors/grizzly-connector/pom.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/connectors/grizzly-connector/pom.xml b/connectors/grizzly-connector/pom.xml index 4438c4c0ef..6954cf71c6 100644 --- a/connectors/grizzly-connector/pom.xml +++ b/connectors/grizzly-connector/pom.xml @@ -40,6 +40,16 @@ org.glassfish.grizzly grizzly-http-client + + + org.glassfish.grizzly + grizzly-websockets + + + org.glassfish.grizzly + connection-pool + + org.glassfish.grizzly