Signed-off-by: Pekka Enberg <penb...@kernel.org>
---
 ChangeLog             |    5 +++++
 java/lang/System.java |   12 ++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8282cfe..75081f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-03-12  Pekka Enberg  <penb...@kernel.org>
 
+       * java/lang/System.java:
+       (lineSeparator): Add missing method.
+
+2012-03-12  Pekka Enberg  <penb...@kernel.org>
+
        * java/lang/reflect/Member.java:
        (getDeclaringClass): Fix return type.
 
diff --git a/java/lang/System.java b/java/lang/System.java
index 51b3259..9d86991 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
@@ -97,6 +97,8 @@ public final class System
    */
   public static final PrintStream out = VMSystem.makeStandardOutputStream();
 
+  private static final String LINE_SEPARATOR = 
SystemProperties.getProperty("line.separator");
+
   /**
    * The standard output PrintStream.  This is assigned at startup and
    * starts its life perfectly valid. Although it is marked final, you can
@@ -713,6 +715,16 @@ public final class System
   }
 
   /**
+   * Returns the system-dependent line separator.
+   *
+   * @return the system-dependent line separator.
+   */
+  public static String lineSeparator()
+  {
+    return LINE_SEPARATOR;
+  }
+
+  /**
    * This is a specialised <code>Collection</code>, providing
    * the necessary provisions for the collections used by the
    * environment variable map.  Namely, it prevents
-- 
1.7.7.6


Reply via email to