diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-20 23:20:22 +0300 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-04-21 10:45:31 +0700 |
commit | f66a4f9b083cf8cf59cce160a5109677d4ea6009 (patch) | |
tree | ada047c6bb883baaa28a895511058da05fe4f8a5 /util | |
parent | ee9d532b1ad6bad267ce2d796f3979074e6122cd (diff) | |
download | aspectj-f66a4f9b083cf8cf59cce160a5109677d4ea6009.tar.gz aspectj-f66a4f9b083cf8cf59cce160a5109677d4ea6009.zip |
Use System.lineSeparator() instead of hand-crafted method
Diffstat (limited to 'util')
-rw-r--r-- | util/src/main/java/org/aspectj/util/LangUtil.java | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index 7e1c2a253..d916002b6 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -37,7 +37,7 @@ import java.util.StringTokenizer; */ public class LangUtil { - public static final String EOL; + public static final String EOL = System.lineSeparator(); public static final String JRT_FS = "jrt-fs.jar"; @@ -55,22 +55,6 @@ public class LangUtil { } static { - StringWriter buf = new StringWriter(); - PrintWriter writer = new PrintWriter(buf); - writer.println(""); - String eol = "\n"; - try { - buf.close(); - StringBuffer sb = buf.getBuffer(); - if (sb != null) { - eol = buf.toString(); - } - } catch (Throwable t) { - } - EOL = eol; - } - - static { // http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html // http://openjdk.java.net/jeps/223 "New Version-String Scheme" try { |