Closed andyindr closed 3 years ago
I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference.
this always find NullPointerException
Could you please share a small sample that reproduces that exception as we need to investigate the root cause of the NPE. You can do so by attaching a zip to this issue or sharing a link to a GitHub repository.
I suspect this might be due to org.springframework.security.web.savedrequest.RequestCacheAwareFilter
. I wonder if preHandle
is called with a different request to afterCompletion
. Perhaps we should guard against a null
timingContext
?
I don't think we should just guard against null
. Doing so would leave the timers registered and they'd then never be stopped.
https://github.com/spring-projects/spring-boot/issues/16407 is a similar issue with a bit of background.
Thanks @wilkinsona, I hadn't appreciated that. I guess we need a sample from @andyindr to really get to the bottom of this one.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
i use spring-boot-actuator version is 2.3.2 or 2.5.2 this always find NullPointerException
this code is :
but no check getLongTaskTimerSamples is null
so i need update those code, add check null before use getLongTaskTimerSamples result
this code path is :
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/LongTaskTimingHandlerInterceptor.java
this online error is :