diff options
author | Pekka Enberg <penberg@kernel.org> | 2012-03-12 19:26:50 +0200 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2012-03-14 20:47:54 +0200 |
commit | ab9c8ecc26b873ccad20fb80323b1232c77cbcfd (patch) | |
tree | dfc85fe8867ffeeb7c829b5669ecf96c4234a7df | |
parent | 1a3ef22077261b1fbc757f7cd87d052adc9dfec0 (diff) | |
download | classpath-ab9c8ecc26b873ccad20fb80323b1232c77cbcfd.tar.gz |
Add missing java/lang/System.lineSeparator() method
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/lang/System.java | 12 |
2 files changed, 17 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2012-03-12 Pekka Enberg <penberg@kernel.org> + * java/lang/System.java: + (lineSeparator): Add missing method. + +2012-03-12 Pekka Enberg <penberg@kernel.org> + * java/lang/reflect/Member.java: (getDeclaringClass): Fix return type. diff --git a/java/lang/System.java b/java/lang/System.java index 51b3259fa..9d8699183 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 |