From 70c8ae28bd6a8d13b4a6ecd6e040d9c9a04c4f64 Mon Sep 17 00:00:00 2001 From: Johannes Beck Date: Thu, 7 Mar 2024 12:59:02 +0100 Subject: [PATCH] Fix jacoco --- pom.xml | 1 + src/main/java/x1/stomp/boundary/QuoteResource.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b016514..838f1339 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,7 @@ /opt/wildfly-${wildfly.version} 5.10.2 0.8.10 + true 1.8.0.Final 5.0.1.Final 1.16.0 diff --git a/src/main/java/x1/stomp/boundary/QuoteResource.java b/src/main/java/x1/stomp/boundary/QuoteResource.java index 70ddf6fe..468df8e3 100644 --- a/src/main/java/x1/stomp/boundary/QuoteResource.java +++ b/src/main/java/x1/stomp/boundary/QuoteResource.java @@ -145,7 +145,11 @@ public void getQuotes( @Parameter(description = "Stock symbols", example = "[\"GOOG\"]") @QueryParam("key") @MDCKey(MDC_KEY) List keys, @Suspended AsyncResponse response) { var baseUriBuilder = uriInfo.getBaseUriBuilder(); - withTimeoutHandler(response).execute(() -> response.resume(retrieveQuotes(keys, baseUriBuilder))); + withTimeoutHandler(response).execute(() -> { + try (var r = retrieveQuotes(keys, baseUriBuilder)) { + response.resume(r); + } + }); } private Response retrieveQuotes(List keys, UriBuilder baseUriBuilder) {