The following change has recently been made to TomahawkFacesContextWrapper:

Old code:
           if (addResource.requiresBuffer())
           {
extensionsResponseWrapper = new ExtensionsResponseWrapper(httpResponse);
               extendedResponse = extensionsResponseWrapper;
           }


New Code:
           if (addResource.requiresBuffer())
           {
               //If the request requires buffer, this was already
//wrapped (on TomahawkFacesContextFactory.getFacesContext(...) ),
               //but we need to save the wrapped response value
               //on a local variable to then reference it on release()
               //method and parse the old response.
extensionsResponseWrapper = (ExtensionsResponseWrapper) extendedResponse;
           }

Casting the "extendedResponse" object to a tomahawk-specific type doesn't work if something else has wrapped the ResponseWrapper too. And orchestra does exactly that.

So some other solution will be needed here.

PS: "extendedResponse" is no longer an appropriate name for this variable. It was true in the filter approach, where the filter knows exactly what the object is because it just created it. But in the FacesContext approach, it can be any object that implements ServletResponse.

Regards,
Simon

Reply via email to