maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ltheu...@apache.org
Subject svn commit: r628850 - /maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
Date Mon, 18 Feb 2008 19:41:51 GMT
Author: ltheussl
Date: Mon Feb 18 11:41:50 2008
New Revision: 628850

URL: http://svn.apache.org/viewvc?rev=628850&view=rev
Log:
[DOXIA-223] Decouple end-of-line detection from OS
Submitted by: Benjamin Bentmann

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

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java?rev=628850&r1=628849&r2=628850&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/util/LineBreaker.java
Mon Feb 18 11:41:50 2008
@@ -114,7 +114,6 @@
             for ( int i = 0; i < length; ++i )
             {
                 char c = text.charAt( i );
-                String os = System.getProperty( "os.name" ).toLowerCase();
 
                 switch ( c )
                 {
@@ -131,7 +130,7 @@
 
                     case '\r':
                         // if \r\n (windows) then just pass along \n
-                        if ( os.indexOf( "windows" ) != -1 )
+                        if ( i + 1 < length && text.charAt( i + 1 ) == '\n' )
                         {
                             break;
                         }



Mime
View raw message