public static ScopedResponse unwrapResponse ( ServletResponse response ) { while ( response instanceof ServletResponseWrapper ) { if ( response instanceof ScopedResponse ) { return ( ScopedResponse ) response ; } else { response = ( ( ServletResponseWrapper ) response ) . getResponse ( ) ; } } return null ; }
Unwraps the contained ScopedResponseImpl from the given ServletResponse which may be a ServletResponseWrapper .