This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 2083ff0d05 FELIX-6565 : Ignore exception on shutdown
2083ff0d05 is described below
commit 2083ff0d05c6293c6a411163d3691d3b27758a70
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Sun Jul 30 08:56:49 2023 +0200
FELIX-6565 : Ignore exception on shutdown
---
.../apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
b/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
index 319c99c799..ca284dda64 100644
---
a/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
+++
b/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServlet.java
@@ -244,7 +244,7 @@ public class HealthCheckExecutorServlet extends HttpServlet
{
LOG.info("Unregistering HC Servlet {} from path {}",
getClass().getSimpleName(), entry.getKey());
entry.getValue().unregister();
} catch (Exception e) {
- LOG.error("Could not unregister health check servlet", e);
+ // ignore the exception - this might happen on shutdown
}
}
servletRegistrations.clear();
@@ -257,7 +257,7 @@ public class HealthCheckExecutorServlet extends HttpServlet
{
properties.put(HTTP_WHITEBOARD_CONTEXT_SELECT,
"(".concat(HTTP_WHITEBOARD_CONTEXT_NAME).concat("=").concat(servletInfo.contextName).concat(")"));
}
properties.put(HTTP_WHITEBOARD_SERVLET_PATTERN,
servletInfo.servletPath);
-
+
final ServiceRegistration<Servlet> registration =
bundleContext.registerService(Servlet.class, servletInfo.servlet, properties);
servletRegistrations.put(servletPath, registration);
}