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-issuemaster opened this issue Nov 9, 2017 · 2 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster 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-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster 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.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 13, 2017

Ricardo Malikoski commented

Thanks Juergen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.