Skip to content

Commit a393c29

Browse files
committed
Merge branch '2.4.x' into 2.5.x
Closes gh-27616
2 parents cd7ae2e + cd0bb96 commit a393c29

File tree

1 file changed

+4
-2
lines changed
  • spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/tomcat

1 file changed

+4
-2
lines changed

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/tomcat/TomcatMetricsBinder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,7 +69,9 @@ private Manager findManager(ApplicationContext applicationContext) {
6969
WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer();
7070
if (webServer instanceof TomcatWebServer) {
7171
Context context = findContext((TomcatWebServer) webServer);
72-
return context.getManager();
72+
if (context != null) {
73+
return context.getManager();
74+
}
7375
}
7476
}
7577
return null;

0 commit comments

Comments
 (0)