Throw IllegalArgumentException for null SQL String

Closes gh-31391

(cherry picked from commit 8b5d993e61)
This commit is contained in:
Juergen Hoeller
2023-10-10 21:55:12 +02:00
parent 12159b98a2
commit 288e255ce9

View File

@@ -436,6 +436,7 @@ public class NamedParameterJdbcTemplate implements NamedParameterJdbcOperations
* @return a representation of the parsed SQL statement
*/
protected ParsedSql getParsedSql(String sql) {
Assert.notNull(sql, "SQL must not be null");
return this.parsedSqlCache.get(sql);
}