Fix sql statement escaping

This commit is contained in:
Travis Burtrum 2017-08-03 09:46:34 -04:00
parent 6fef6f284f
commit c1b8b2e705

View File

@ -338,7 +338,7 @@ public class JdbcMapperProcessor extends AbstractProcessor {
w.write("conn.prepareStatement(");
}
w.write('"');
w.write(sqlStatement.replaceAll("\n", "\\n").replaceAll("\"", "\\\""));
w.write(sqlStatement.replace("\n", "\\n").replace("\"", "\\\""));
w.write("\");\n");
// now bind parameters