title: Parsing date with DateFormat, why does it work?
body: <p>I have this code to parse a big-endian-date String to a Date :</p>
  
  <pre><code>public static final Date fromBigEndian(String dateBigEndian) {
      DateFormat bigEndianFormat = new SimpleDateFormat("yyyy-MM-dd");
      try {
          return bigEndianFormat.parse(dateBigEndian);
      } catch (ParseException e) {
          return null;
      }
  }
  </code></pre>
  
  <p>and this test case:</p>
  
  <pre><code>@Test
  public void returnNullIfDoesNotMatchBigEndianFormat() {
      String nonBigEndianDate = "01-06-2016";
      Date parsedDate = DateUtil.fromBigEndian(nonBigEndianDate);    
      assertNull(parsedDate);
  }
  </code></pre>
  
  <p>But it fails. It is returning a Date instead of null, but format of <code>"01-06-2016"</code> doesn't match with the pattern <code>"yyyy-MM-dd"</code>. Why doesn't the method throw <code>ParseException</code>?</p>