StripesFramework / stripes

Stripes is a Java framework with the goal of making Servlet/JSP based web development in Java as easy, intuitive and straight-forward as it should be. It's stripey and it doesn't suck.
http://www.stripesframework.org/
171 stars 73 forks source link

Fix javadoc in EmailTypeConverter #65

Closed mwiehl closed 5 months ago

mwiehl commented 7 years ago

I was writing my own EmailTypeConverter (which uses Commons Validation for validating e-mail addresses), and got confused by the javadoc of Stripes' pre-defined EmailTypeConverter class. Specifically, it says that the return value of the convert method will be "null if there are no errors".

However, in fact the code returns the parsed address if there are no errors. The documentation of the TypeConverter interface confirms that this is the desired behavior. It says that convert should return

an instance of the converted type, or null if the input cannot be converted