Skip to content

Commit f442a17

Browse files
Use String#replace instead of String#replaceAll.
String#replace does not use a regular expression for the replacement on Java 9+ and is therefore faster.
1 parent 6bd16e1 commit f442a17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/ibatis/jdbc/ScriptRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private void executeStatement(String command) throws SQLException {
234234
statement.setEscapeProcessing(escapeProcessing);
235235
String sql = command;
236236
if (removeCRs) {
237-
sql = sql.replaceAll("\r\n", "\n");
237+
sql = sql.replace("\r\n", "\n");
238238
}
239239
try {
240240
boolean hasResults = statement.execute(sql);

0 commit comments

Comments
 (0)