This is an automated email from the ASF dual-hosted git repository.
jungm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git
The following commit(s) were added to refs/heads/main by this push:
new 4ec9382492 microprofile health don't evaluate health checks twice
4ec9382492 is described below
commit 4ec9382492c736ea6de29393178298fed5f614c1
Author: Markus Jung <[email protected]>
AuthorDate: Sat Jul 11 21:26:40 2026 +0200
microprofile health don't evaluate health checks twice
---
.../tomee/microprofile/health/MicroProfileHealthChecksEndpoint.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/health/MicroProfileHealthChecksEndpoint.java
b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/health/MicroProfileHealthChecksEndpoint.java
index aca3bf13be..8c21a46122 100644
---
a/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/health/MicroProfileHealthChecksEndpoint.java
+++
b/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/health/MicroProfileHealthChecksEndpoint.java
@@ -63,9 +63,10 @@ public class MicroProfileHealthChecksEndpoint {
private Response toResponse(final Supplier<SmallRyeHealth> health) {
+ SmallRyeHealth resolved = health.get();
return Response
- .status(health.get().isDown() ?
Response.Status.SERVICE_UNAVAILABLE : Response.Status.OK)
- .entity(health.get().getPayload())
+ .status(resolved.isDown() ? Response.Status.SERVICE_UNAVAILABLE :
Response.Status.OK)
+ .entity(resolved.getPayload())
.build();
}
}