Skip to content

NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly [SPR-16663] #21204

@spring-projects-issues

Description

@spring-projects-issues

Zhang Jie opened SPR-16663 and commented

In my opinion, we should parse :{x} style parameter as x is parameter using NamedParameterUtils.parseSqlStatement,
so the condition j - i > 2 is the correct condition, not j - i > 3, because if i is the index of : in :{x}, and j is the index of } in :{x},
j - i == 3 is true.


Affects: 4.3.14, 5.0.4

Issue Links:

Referenced from: pull request #1758, and commits 82cb5db, f3dd22d

Backported to: 4.3.15

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions