maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r554727 - /maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java
Date Mon, 09 Jul 2007 18:12:16 GMT
Author: dkulp
Date: Mon Jul  9 11:12:15 2007
New Revision: 554727

URL: http://svn.apache.org/viewvc?view=rev&rev=554727
Log:
[MRELEASE-93] indent after \r as well as \n

Modified:
    maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java

Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java
URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java?view=diff&rev=554727&r1=554726&r2=554727
==============================================================================
--- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java
(original)
+++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/exec/TeeOutputStream.java
Mon Jul  9 11:12:15 2007
@@ -46,7 +46,15 @@
     {
         for ( int x = 0; x < len; x++ )
         {
-            if ( b[off + x] == '\n' )
+            if ( b[off + x] == '\r' 
+                && x < (len - 1)
+                && b[off + x + 1] == '\n' )
+            {
+                x++;
+            }
+            
+            if ( b[off + x] == '\n' 
+                || b[off + x] == '\r' )
             {
                 super.write( b, off, x + 1);
                 bout.write( b, off, x + 1);



Mime
View raw message