maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r398038 - /maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
Date Fri, 28 Apr 2006 23:32:30 GMT
Author: carlos
Date: Fri Apr 28 16:32:29 2006
New Revision: 398038

URL: http://svn.apache.org/viewcvs?rev=398038&view=rev
Log:
[DOXIA-59] Doxia creates files with inconsistent new lines. Use system line separator instead
of \n

Modified:
    maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java

Modified: maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
URL: http://svn.apache.org/viewcvs/maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java?rev=398038&r1=398037&r2=398038&view=diff
==============================================================================
--- maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
(original)
+++ maven/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
Fri Apr 28 16:32:29 2006
@@ -26,6 +26,8 @@
 {
     public static final int DEFAULT_MAX_LINE_LENGTH = 78;
 
+    private static final String EOL = System.getProperty( "line.separator" );
+
     private Writer destination;
 
     private BufferedWriter writer;
@@ -88,7 +90,7 @@
 
                     case '\n':
                         writeWord();
-                        writer.write( '\n' );
+                        writer.write( EOL );
                         lineLength = 0;
                         break;
 
@@ -126,7 +128,7 @@
             {
                 if ( lineLength + 1 + length > maxLineLength )
                 {
-                    writer.write( '\n' );
+                    writer.write( EOL );
                     lineLength = 0;
                 }
                 else



Mime
View raw message