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.
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
I was writing my own
EmailTypeConverter
(which uses Commons Validation for validating e-mail addresses), and got confused by the javadoc of Stripes' pre-definedEmailTypeConverter
class. Specifically, it says that the return value of theconvert
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 thatconvert
should return