You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2004/03/12 16:14:20 UTC

cvs commit: cocoon-2.1/src/java/org/apache/cocoon/reading AbstractReader.java

cziegeler    2004/03/12 07:14:19

  Modified:    .        status.xml
               src/java/org/apache/cocoon/reading AbstractReader.java
  Log:
     <action dev="CZ" type="fix" fixes-bug="27602" due-to="Gunnar Brand" due-to-email="g.brand@interface-business.de">
       Improvement for AbstractReader: Don't wrap an already buffered stream.
     </action>
  
  Revision  Changes    Path
  1.277     +4 -1      cocoon-2.1/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/status.xml,v
  retrieving revision 1.276
  retrieving revision 1.277
  diff -u -r1.276 -r1.277
  --- status.xml	12 Mar 2004 14:57:58 -0000	1.276
  +++ status.xml	12 Mar 2004 15:14:19 -0000	1.277
  @@ -212,6 +212,9 @@
     <changes>
   
    <release version="@version@" date="@date@">
  +   <action dev="CZ" type="fix" fixes-bug="27602" due-to="Gunnar Brand" due-to-email="g.brand@interface-business.de">
  +     Improvement for AbstractReader: Don't wrap an already buffered stream.
  +   </action>
      <action dev="CZ" type="fix" fixes-bug="25437" due-to="Marco Rolappe" due-to-email="m_rolappe@web.de">
        ForwardEnvironmentWrapper delegates isResponseModified/setResponseIsNotModified to wrapped environment.
      </action>
  
  
  
  1.3       +7 -2      cocoon-2.1/src/java/org/apache/cocoon/reading/AbstractReader.java
  
  Index: AbstractReader.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/reading/AbstractReader.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractReader.java	5 Mar 2004 13:02:57 -0000	1.2
  +++ AbstractReader.java	12 Mar 2004 15:14:19 -0000	1.3
  @@ -65,7 +65,12 @@
        * Set the <code>OutputStream</code>
        */
       public void setOutputStream(OutputStream out) {
  -          this.out = new BufferedOutputStream(out);
  +        if ( out instanceof BufferedOutputStream 
  +             || out instanceof org.apache.cocoon.util.BufferedOutputStream ) {
  +            this.out = out;
  +        } else {
  +            this.out = new BufferedOutputStream(out, 1536);
  +        }
       }
   
       /**