mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
f93fda2a95
Update `ServerHttpObservationFilter` to check if the `Observation` is a no-op before adding the `ServerRequestObservationContext`. Prior to this commit, if the `Observation` is a no-op then the context type added with the `CURRENT_OBSERVATION_CONTEXT_ATTRIBUTE` would not be a `ServerRequestObservationContext`. This would mean that `findObservationContext` would throw a `ClassCastException`. Fixes gh-29356