code: private Date convertToDate(String dateInString) throws IOException {
          Date date = null;
          if (dateInString != null) {
              try {
                  date = LibraryUtils.getUtcSdf().parse(dateInString);
              } catch (ParseException e) {
                  throw new IOException("Cannot parse " + dateInString + " as Date", e);
              }
          }
          return date;
      }
docs: This method convert a String to Date type. When parse error happened return current date.
  
  @param dateInString the String to convert to Date
  @return Date the date and time in coordinated universal time
  @throws IOException