In talking at work about possible solutions to some problems we are having in a Java EE environment, the suggestion to use a HttpServletResponseWrapper to solve the problems (largely involving verifying that certain headers are or are not being set, tracking e.g. redirect URLs, contents of certain headers or cookies) is being rejected due to unspecified drawbacks (largely it seems centered around performance concerns). We need to support servlet 2.4, so cannot use e.g. the new Servlet 3.0 capabilities to examine headers etc.
Are there any specific drawbacks to using HttpServletResponseWrapper (aside from a slight overhead of additional method calls), if you are not e.g. filtering or copying the actual response data?
HttpServletResponseWrapperimplements the decorator pattern without adding any functionality. Negligible overhead is the only side-effect.