Fix jdbc template error messages generation

This commit is contained in:
anton0xf
2018-09-18 20:09:58 +05:00
committed by Juergen Hoeller
parent 5b25aaacb6
commit 0204b082b1

View File

@@ -114,7 +114,7 @@ public abstract class AbstractFallbackSQLExceptionTranslator implements SQLExcep
* @return the message {@code String} to use
*/
protected String buildMessage(String task, @Nullable String sql, SQLException ex) {
return task + "; " + (sql != null ? "SQL [" + sql : "]; " + "") + ex.getMessage();
return task + "; " + (sql != null ? ("SQL [" + sql + "]; ") : "") + ex.getMessage();
}
}