wisdom-framework / wisdom

A modular and dynamic web framework
http://wisdom-framework.org
Apache License 2.0
88 stars 42 forks source link

@Nullable form parameters? #522

Open Kricket opened 9 years ago

Kricket commented 9 years ago

We have a form that sends it data to the wisdom server. One of the fields (@FormParameter) sent represents a Date. Currently, if the date is not provided, wisdom does not even complete the request. This is because the constructor for java.util.Date throws an exception when asked to parse a null String.

I noticed the @DefaultValue annotation, but this only accepts the String that the request "should have" sent. Wouldn't it be cool to recognize @Nullable so that we could receive a null Date instead?

cescoffier commented 9 years ago

I agree, that would be nice !