Skip to content

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

Closed

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

Activity

  1. spring-projects-issues commented on Mar 29, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Good catch! Merged for 5.0.5 now; I'll backport it to 4.3.15 later today.

  2. spring-projects-issues commented on Mar 30, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Zhang Jie commented

    Thanks for responsing so quickly, I have added some text formating in description.
    PS: If I could preview the description, I will not have edited the description so much times.

  3. added
    type: bug
    in: data
    status: backported
    on Jan 11, 2019
  4. added this to the 5.0.5 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datastatus: backportedtype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions