From f66a4f9b083cf8cf59cce160a5109677d4ea6009 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Wed, 20 Apr 2022 23:20:22 +0300 Subject: [PATCH] Use System.lineSeparator() instead of hand-crafted method --- .../main/java/org/aspectj/util/LangUtil.java | 18 +----------------- 1 file changed, 1 insertion(+), 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"; @@ -54,22 +54,6 @@ public class LangUtil { return vmVersion; } - 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" -- 2.39.5