Author: awiner
Date: Tue Jan  2 23:10:44 2007
New Revision: 492061

URL: http://svn.apache.org/viewvc?view=rev&rev=492061
Log:
Fix IndentingResponseWriter failure to properly detect some versions of write() 
calls.  A sequence of write(char[]) followed by write(char[], int, int) could 
put the new line in the wrong place.

Modified:
    
incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/IndentingResponseWriter.java

Modified: 
incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/IndentingResponseWriter.java
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/IndentingResponseWriter.java?view=diff&rev=492061&r1=492060&r2=492061
==============================================================================
--- 
incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/IndentingResponseWriter.java
 (original)
+++ 
incubator/adffaces/branches/faces-1_2-070102/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/IndentingResponseWriter.java
 Tue Jan  2 23:10:44 2007
@@ -110,6 +110,16 @@
    * Writes a String, escaped properly for this method.
    */
   @Override
+  public void writeText(Object text, UIComponent component, String 
componentPropertyName) throws IOException
+  {
+    _seeIfJustEndedElement();
+    super.writeText(text, component, componentPropertyName);
+  }
+
+  /**
+   * Writes a String, escaped properly for this method.
+   */
+  @Override
   public void writeText(Object text, String componentPropertyName) throws 
IOException
   {
     _seeIfJustEndedElement();
@@ -140,6 +150,14 @@
     super.write(text);
   }
 
+  @Override
+  public void write(String str, int off, int len)
+    throws IOException
+  {
+    _seeIfJustEndedElement();
+    super.write(str, off, len);
+  }
+
   /**
    * Writes a character array, without performing any escaping.
    */
@@ -151,6 +169,17 @@
   {
     _seeIfJustEndedElement();
     super.write(text, start, length);
+  }
+
+  /**
+   * Writes a character array, without performing any escaping.
+   */
+  @Override
+  public void write(
+    char[]      text) throws IOException
+  {
+    _seeIfJustEndedElement();
+    super.write(text);
   }
 
   /**


Reply via email to