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

SpringValidatorAdapter.validateValue() is wrong [SPR-6557] #11223

Closed
spring-projects-issues opened this issue Dec 12, 2009 · 1 comment
Closed
Assignees
Labels
type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Juergen Zimmermann opened SPR-6557 and commented

In org.springframework.validation.beanvalidation.SpringValidatorAdapter the methode validateValue() is wrong. Without the fix "bean validation" is useable only in part.

Current implementation:
public <T> Set<ConstraintViolation<T>> validateValue(Class<T> beanType, String propertyName, Object value, Class<?>... groups) {
return this.targetValidator.validateValue(beanType, propertyName, groups);
}

However, the argument "value" is lost inside the method body, and should be:
return this.targetValidator.validateValue(beanType, propertyName, value, groups);


Affects: 3.0 RC3

Referenced from: commits b497f6c

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Ouch, that was an embarrassing mistake when creating those delegating methods.

Fixed for 3.0 GA. Thanks for raising this!

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants