79804754

Date: 2025-10-30 12:27:36
Score: 0.5
Natty:
Report link

In my case, I was sending HttpServletRequest to @Async method then execute call getRequestURI() inside this method (in a different thread). This is giving me not reliable result and sometimes I got null . I modified the behavior and used a static utility method to extract requestUri (extraction in the same thread) then passing the extracted value to @Async method, I got reliable and expected result in this scenario and solved my problem.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Yahia El-Tayeb