HttpProblem extends RuntimeException but is used as a structured error container, not for diagnostics. Every construction fills in a stack trace, which is wasted CPU - especially for high-volume 4xx responses representing expected client mistakes.
Overriding fillInStackTrace() to return this would eliminate this overhead. The existing JMH benchmark can measure the improvement.
HttpProblem extends RuntimeException but is used as a structured error container, not for diagnostics. Every construction fills in a stack trace, which is wasted CPU - especially for high-volume 4xx responses representing expected client mistakes.
Overriding fillInStackTrace() to return this would eliminate this overhead. The existing JMH benchmark can measure the improvement.