Revision: 1426
http://stripes.svn.sourceforge.net/stripes/?rev=1426&view=rev
Author: bengunter
Date: 2011-04-21 20:04:33 +0000 (Thu, 21 Apr 2011)
Log Message:
-----------
There should have been a flush in LayoutWriter#closeBuffer(..) before popping
the buffer off the stack. The potential ill effects of not having that flush
were eliminated as a side-effect of the flush in LayoutWriter#setSilent(..). (I
didn't think the latter should have been necessary, but I left it simply
because things worked when it was there and broke when it was absent.) This
patch removes the flush from #setSilent and adds a flush in #closeBuffer.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/layout/LayoutWriter.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/layout/LayoutWriter.java
===================================================================
---
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/layout/LayoutWriter.java
2011-04-21 19:54:53 UTC (rev 1425)
+++
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/layout/LayoutWriter.java
2011-04-21 20:04:33 UTC (rev 1426)
@@ -75,7 +75,6 @@
public void setSilent(boolean silent, PageContext pageContext) throws
IOException {
if (silent != this.silent) {
pageContext.getOut().write(TOGGLE);
- tryFlush(pageContext);
this.silent = silent;
log.trace("Output is ", (silent ? "DISABLED" : "ENABLED"));
}
@@ -99,6 +98,7 @@
*/
public String closeBuffer(PageContext pageContext) {
if (getOut() instanceof StringWriter) {
+ tryFlush(pageContext);
String contents = ((StringWriter) writers.poll()).toString();
log.trace("Closed buffer: \"", contents, "\"");
return contents;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development