title: Converting empty String to null Date object with Spring
body: <p>I have a form field that should be converted to a Date object, as follows:</p>
  
  <pre><code>&lt;form:input path="date" /&gt;
  </code></pre>
  
  <p>But I want to get a null value when this field is empty, instead of that I receive:</p>
  
  <pre><code>Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'date';
  org.springframework.core.convert.ConversionFailedException: Unable to convert value "" from type 'java.lang.String' to type 'java.util.Date';
  </code></pre>
  
  <p>Is there an easy way to indicate that empty Strings should be converted to null? Or should I write my own <strong>PropertyEditor</strong>?</p>
  
  <p>Thanks!</p>