title: Jackson and empty string
body: <p>I have the following code:</p>
  
  <pre><code>import javax.xml.datatype.XMLGregorianCalendar;
      import com.fasterxml.jackson.databind.ObjectMapper;
      import com.fasterxml.jackson.databind.SerializationFeature;
  
      public class Test {
  
          public static void main(String[] args) {
              print("");//Prints null
              print("2013-06-14T01:23:47.547+0000"); //Prints the date
              print("&amp;&amp;&amp;&amp;AD");//Throws error
          }
  
          private static void print(String dateString) {
              ObjectMapper mapper = new ObjectMapper();
              mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false );
              try {
                  String x = "{\"dateTime\": \""+dateString+"\"}";
                  Foo type = mapper.readValue(x, Foo.class);
                  System.out.println("Datetime is " + type.getDateTime());
              } catch (Exception e) {
                  e.printStackTrace();
              } 
          }
  
          private static class Foo {
  
              private XMLGregorianCalendar dateTime;
              public XMLGregorianCalendar getDateTime() {
                  return dateTime;
              }
              public void setDateTime(XMLGregorianCalendar dateTime) {
                  this.dateTime = dateTime;
              }
  
          }
  
      }
  </code></pre>
  
  <p>When the String value is blank "", then Jackson treats the value as null, but when I put some invalid value such as "&amp;&amp;&amp;&amp;AD", it tries to convert it to XML date Time and throws error.</p>
  
  <p>The error I get is:</p>
  
  <pre><code>com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of javax.xml.datatype.XMLGregorianCalendar from String value '&amp;&amp;&amp;&amp;AD': not a valid representation (error: Failed to parse Date value '&amp;&amp;&amp;&amp;AD': Can not parse date "&amp;&amp;&amp;&amp;AD": not compatible with any of standard forms ("yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd"))
  </code></pre>
  
  <p>I would like to see the same behavior for blank value. How do I do it?</p>
  
  <p>Is there a way to configure Jackson to fail for blank value?</p>