Revision: 1388
http://stripes.svn.sourceforge.net/stripes/?rev=1388&view=rev
Author: bengunter
Date: 2011-01-06 14:10:47 +0000 (Thu, 06 Jan 2011)
Log Message:
-----------
Changed to use the LinkedList methods addFirst, peek, and poll instead of
addLast, isEmpty, getLast, and removeLast
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-01-04 16:52:48 UTC (rev 1387)
+++
branches/1.5.x/stripes/src/net/sourceforge/stripes/tag/layout/LayoutWriter.java
2011-01-06 14:10:47 UTC (rev 1388)
@@ -48,12 +48,12 @@
*/
public LayoutWriter(JspWriter out) {
log.debug("Create layout writer wrapped around ", out);
- this.writers.add(out);
+ this.writers.addFirst(out);
}
/** Get the writer to which output is currently being written. */
protected Writer getOut() {
- return writers.isEmpty() ? null : writers.getLast();
+ return writers.peek();
}
/** If true, then discard all output. If false, then resume sending output
to the JSP writer. */
@@ -80,7 +80,7 @@
public void openBuffer(PageContext pageContext) {
log.trace("Open buffer");
tryFlush(pageContext);
- writers.add(new StringWriter(1024));
+ writers.addFirst(new StringWriter(1024));
}
/**
@@ -91,7 +91,7 @@
*/
public String closeBuffer(PageContext pageContext) {
if (getOut() instanceof StringWriter) {
- String contents = ((StringWriter) writers.removeLast()).toString();
+ 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.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development