Closed
Description
Torsten Kuhnhenne opened SPR-16472 and commented
If you use non ASCII characters as a name (e.g german umlauts) then NamedParameterUtils.isParameterSeparator will throw an ArrayIndexOutOfBoundsException because the character-code is taken as array index for the boolean array
private static final boolean[] separatorIndex = new boolean[128];
This bug was introduced in version 5.3.0 with this commit b2322e5
Example query to reproduce the problem:
INSERT INTO csv2sql (Geplantes_Auslaufdatum, Einführungsjahr, Neueinführung) VALUES (:Geplantes_Auslaufdatum, :Einführungsjahr, :Neueinführung)
Affects: 5.0.3
Issue Links:
- [Regression] NamedParameterUtils::parseSqlStatement cannot parse chinese param name [SPR-16473] #21018 [Regression] NamedParameterUtils::parseSqlStatement cannot parse chinese param name ("is duplicated by")
- NamedParameterJdbcTemplate fails on PostgreSQL array [SPR-16340] #20887 NamedParameterJdbcTemplate fails on PostgreSQL array
Referenced from: commits ac7a699