Skip to content
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

NumberFormatException caused by property paths from JSR-303 based validation with no index into a collection [SPR-16177] #20725

Closed
spring-projects-issues opened this issue Nov 9, 2017 · 2 comments

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 9, 2017

Ricardo Malikoski opened SPR-16177 and commented

When a I have a custom validator to child collection that can't be indexed, (example attached with Set.class), fails. The problem is the same with #13276.


Affects: 4.3.12, 5.0.1

Reference URL: #13276

Attachments:

Issue Links:

  • #13970 SpringValidatorAdapter is incorrectly resolving rejected value for bean based field level constraints
  • #14876 GenericConversionService.convert() throws IllegalArgumentException after updating to Spring 3.2.1
  • #13276 NumberFormatException caused by property paths from JSR-303 based validation with no index into a collection
  • #19648 Spring validation crashes with Hibernate Validation 5 style list constraint violations

Referenced from: commits 9779b8b, 3091fee

Backported to: 4.3.13

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 13, 2017

Juergen Hoeller commented

Good catch! I've revised the condition in SpringValidatorAdapter.getRejectedValue to always skip field paths with a "[]" inside (rather than just behind the invalidValue==leafBean condition).

This will be available in the upcoming 5.0.2.BUILD-SNAPSHOT, and backported to 4.3.13 later today.

Loading

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 13, 2017

Ricardo Malikoski commented

Thanks Juergen.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants