String[] (final CompilerMessage message) { String text = message.getMessage(); if (!text.contains("\n")) { return new String[]{text}; } final List<String> lines = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(text, "\n", false); while (tokenizer.hasMoreTokens()) { lines.add(tokenizer.nextToken()); } return ArrayUtilRt.toStringArray(lines); }