LineSeparator (@NotNull String string) { for (LineSeparator separator : values()) { if (separator.getSeparatorString().equals(string)) { return separator; } } Logger.getInstance(LineSeparator.class).error("Invalid string for line separator: " + StringUtil.escapeStringCharacters(string)); return getSystemLineSeparator(); }