commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [1/3] [text] use System.lineSeparator() instead of System.getProperty("line.separator")
Date Thu, 04 May 2017 11:01:44 GMT
Repository: commons-text
Updated Branches:
  refs/heads/master 4d84a33e4 -> d4890a893


use System.lineSeparator() instead of System.getProperty("line.separator")


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/1dd427b4
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/1dd427b4
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/1dd427b4

Branch: refs/heads/master
Commit: 1dd427b46a6f13fdf92eab328aa79b77a0dbc0cb
Parents: 4d84a33
Author: Pascal Schumacher <pascalschumacher@gmx.net>
Authored: Thu May 4 12:43:02 2017 +0200
Committer: Pascal Schumacher <pascalschumacher@gmx.net>
Committed: Thu May 4 12:43:02 2017 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/text/AlphabetConverter.java | 7 +------
 src/main/java/org/apache/commons/text/StrBuilder.java        | 2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/1dd427b4/src/main/java/org/apache/commons/text/AlphabetConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/AlphabetConverter.java b/src/main/java/org/apache/commons/text/AlphabetConverter.java
index a216305..dcc2eee 100644
--- a/src/main/java/org/apache/commons/text/AlphabetConverter.java
+++ b/src/main/java/org/apache/commons/text/AlphabetConverter.java
@@ -88,11 +88,6 @@ public final class AlphabetConverter {
      * Arrow constant, used for converting the object into a string.
      */
     private static final String ARROW = " -> ";
-    /**
-     * Line separator, used for converting the object into a string.
-     */
-    private static final String LINE_SEPARATOR =
-            System.getProperty("line.separator");
 
     /**
      * Hidden constructor for alphabet converter. Used by static helper methods.
@@ -284,7 +279,7 @@ public final class AlphabetConverter {
                 : originalToEncoded.entrySet()) {
             sb.append(codePointToString(entry.getKey()))
                     .append(ARROW)
-                    .append(entry.getValue()).append(LINE_SEPARATOR);
+                    .append(entry.getValue()).append(System.lineSeparator());
         }
 
         return sb.toString();

http://git-wip-us.apache.org/repos/asf/commons-text/blob/1dd427b4/src/main/java/org/apache/commons/text/StrBuilder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/StrBuilder.java b/src/main/java/org/apache/commons/text/StrBuilder.java
index a3bc429..bb6e55e 100644
--- a/src/main/java/org/apache/commons/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/text/StrBuilder.java
@@ -472,7 +472,7 @@ public class StrBuilder implements CharSequence, Appendable, Serializable,
Build
      */
     public StrBuilder appendNewLine() {
         if (newLine == null)  {
-            append(System.getProperty("line.separator"));
+            append(System.lineSeparator());
             return this;
         }
         return append(newLine);


Mime
View raw message