Skip to content

Commit f7ca834

Browse files
authored
Use system line separator rather then \n (#90)
Signed-off-by: David Kornel <kornys@outlook.com>
1 parent 000ace1 commit f7ca834

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

flink-sql-runner/src/main/java/com/github/streamshub/flink/SqlRunner.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class SqlRunner {
3636
private static final String CUSTOM_SQL_ENV_VAR_KEY = "SQL_STATEMENTS";
3737

3838
private static final String STATEMENT_DELIMITER = ";"; // a statement should end with `;`
39-
private static final String LINE_DELIMITER = "\n";
4039

4140
private static final Pattern SET_STATEMENT_PATTERN =
4241
Pattern.compile("SET\\s+'(\\S+)'\\s+=\\s+'(.*)';", Pattern.CASE_INSENSITIVE);
@@ -126,7 +125,7 @@ private static String formatSqlStatements(String content) {
126125
if (!content.endsWith(STATEMENT_DELIMITER)) {
127126
formatted.append(STATEMENT_DELIMITER);
128127
}
129-
formatted.append(LINE_DELIMITER);
128+
formatted.append(System.lineSeparator());
130129
return formatted.toString();
131130
}
132131
}

0 commit comments

Comments
 (0)