tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marko Asplund <>
Subject Re: Servlet 3.1 asynchronous processing API
Date Wed, 09 Jul 2014 16:16:22 GMT
On Wed, 09 Jul 2014 09:59 Martin Grigorov wrote:

> Casting ServletResponse to HttpServletResponse is OK most of the time. You
> can check with "instanceof" before doing the cast.
> But casting AsyncContext to HttpServletResponse is way too brave.

Quite true, I'm not usually that courageous on purpose :-)

Meant to write asyncContext.getResponse().
And as you suggested, adding the type check using instanceof would
obviously make a lot of sense.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message