Skip to content

NamedParameterUtils.isParameterSeparator throws ArrayIndexOutOfBoundsException for non ASCII characters [SPR-16472] #21017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Feb 6, 2018 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Feb 6, 2018

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:

Referenced from: commits ac7a699

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants