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

Document null input requirements in Converter [SPR-12780] #17378

spring-issuemaster opened this issue Mar 3, 2015 · 1 comment


None yet
2 participants
Copy link

commented Mar 3, 2015

M. Justin opened SPR-12780 and commented

Looking at the JavaDocs for Converter, I see no mention about whether an implementation of the interface should expect to handle null values. However, the Spring Framework documentation indicates that "for each call to convert(S), the source argument is guaranteed to be NOT null."

It would be therefore useful if the expected null input behavior was called out explicitly in the Javadoc, so that implementors of the interface would know they should not put in null checks. Instead, they currently have to look in another source of documentation (not linked from the JavaDoc) to determine how they are expected to implement the interface.

Affects: 3.2.13, 4.1.5

Referenced from: commits ff76be2, 5f30575, dcb1145

Backported to: 3.2.14


This comment has been minimized.

Copy link
Collaborator Author

commented Mar 4, 2015

Juergen Hoeller commented

I've added a not-null hint to the parameter javadoc, and also clarified that a converter may potentially (even if rarely) return null for any given value.


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