Avoid NPE when binder is closed before started event
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-22141pull/23053/head
parent
9c732fa2b6
commit
b34c268547
Loading…
Reference in New Issue