This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 17905a911c Fix possible NPE 17905a911c is described below commit 17905a911cc3695da2239efa209bef484c2d1c86 Author: remm <r...@apache.org> AuthorDate: Fri Sep 8 16:00:03 2023 +0200 Fix possible NPE Found by coverity. --- java/org/apache/catalina/mbeans/ServiceMBean.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/mbeans/ServiceMBean.java b/java/org/apache/catalina/mbeans/ServiceMBean.java index 02c6db901c..36102f77bf 100644 --- a/java/org/apache/catalina/mbeans/ServiceMBean.java +++ b/java/org/apache/catalina/mbeans/ServiceMBean.java @@ -112,6 +112,10 @@ public class ServiceMBean extends BaseCatalinaMBean<Service> { public String getExecutor(String name) throws MBeanException{ Service service = doGetManagedResource(); Executor executor = service.getExecutor(name); - return executor.toString(); + if (executor != null) { + return executor.toString(); + } else { + return null; + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org