before using object, check for null is necessary. Till spring 4.3.x we have this check and in spring 5.x.x its missing
Comment From: pivotal-issuemaster
@dnyaneshwar Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-issuemaster
@dnyaneshwar Thank you for signing the Contributor License Agreement!
Comment From: dnyaneshwar
What is the process of merge this change in master
Comment From: snicoll
@dnyaneshwar the comment above yours as a link to request you sign the CLA. Please do that.
Comment From: dnyaneshwar
@dnyaneshwar the comment above yours as a link to request you sign the CLA. Please do that.
already signed.
Comment From: dnyaneshwar
Whats the next process to submit my change in master branch
Comment From: snicoll
@dnyaneshwar please be patient, you can see right above your comment that I requested a review. Once that happens we can figure out what to do with your contribution.
Comment From: jhoeller
@dnyaneshwar, have you got existing code calling ValidationUtils.invokeValidator
potentially with a null
target? A Validator was never meant to deal with null
values, so 5.0 simply tightened that assumption (missing a not-null assertion on the target argument though). If your target is potentially null, you should check for not-null before invoking the validator to begin with.
We generally tightened nullability assumptions 5.0, very much by design and not by accident. Validator.validate(Object, Errors)
is one of those places where the incoming target object really needs to non-null from a design perspective, and ValidationUtils
inherits that design notion as a helper around it. That check in ValidationUtils
is really just as a symptom, not the root cause.
Comment From: dnyaneshwar
Thanks a lot jhoeller
Comment From: snicoll
From the history, it looks like the last comment from Juergen makes this PR irrelevant.