This is a quick question for Jeremy, but anyone please feel free to chime in
if you want.

I noticed that WebUtils.getServletRequest and getServletResponse were
changed to throw an exception if either weren't bound to the ThreadContext.
I'm not quite sure I feel this is totally appropriate.  I see those methods
as convenient web-utility wrappers around the ThreadContext only, which
itself does not throw exceptions when something doesn't exist.

What do you think of adding a WebUtils.getRequiredServletRequest and
getRequiredServletResponse that do what you expect (throw an exception), and
the regular get* methods don't?

This seems a tad more in line with how the ThreadContext works to me, with
the added benefit of being more self documenting as well.  Would that be ok?

Reply via email to