Remove PPRResponseWriter._disableIfNeeded() hack ------------------------------------------------
Key: TRINIDAD-1709 URL: https://issues.apache.org/jira/browse/TRINIDAD-1709 Project: MyFaces Trinidad Issue Type: Task Affects Versions: 2.0.0-alpha Reporter: Andy Schwartz Priority: Minor PPRResponseWriter includes the following hack to work around some legacy Facelets behavior: // Facelets - as of version 1.1.11 - does something // very strange with its ResponseWriter stack. // It starts with an ordinary stack (which will have // a PPRResponseWriter around an HtmlResponseWriter). // Then it treats that *as an ordinary Writer*, and // wraps it in a "StateWriter" class, which merely // is used to switch between passing output through // and buffering it. Then it takes that StateWriter // and uses it to cloneWithWriter() a new ResponseWriter // stack! As a result, we have the following stack // outermost to innermost: // PPRResponseWriter // HtmlResponseWriter // StateWriter // PPRResponseWriter // HtmlResponseWriter // ServletResponse's Writer // In the end, we have to get that "inner" PPRResponseWriter // to just cut it out and pass everything through. Hence, // this hack! So If I get a "write" call while we're // inside of startDocument(), assume that I must be an // abused PPRResponseWriter, and just put myself in // pass-everything-through mode // private void _disableIfNeeded() { if (_state.documentStarting) { _state = new State(_state.pprContext); _state.forceInsideTarget = true; } } We should remove this hack once the underlying Facelets behavior is fixed in both MyFaces and Mojarra. The MyFaces issue is here: https://issues.apache.org/jira/browse/MYFACES-2500 The Mojarra issue is here: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1515 I just checked in a fix for Mojarra. Looking into a patch for the MyFaces side. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.