-
im47cn authored
Previously, if TomcatMetricsBinder destroy() was called before it had received an ApplicationStartedEvent an NPE would be thrown due to TomcatMetrics being null. This NPE was then caught and logged at warning level by the disposable bean adapter. This prevents the NPE by checking that the TomcatMetrics instance is null before calling close() on it. See gh-22141
b34c2685