code: public Date parseDate(String str) {
          if (str == null)
              return null;
          try {
              return dateFormat.parse(str);
          } catch (ParseException e) {
              throw new RuntimeException(e);
          }
      }
docs: Parse the given date string into Date object.
  The default <code>dateFormat</code> supports these ISO 8601 date formats:
  2015-08-16
  2015-8-16
  @param str String to be parsed
  @return Date