private static Date parseDate ( @ SuppressWarnings ( "SameParameterValue" ) String stringDate ) { try { return formatter . parse ( stringDate ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; return null ; } }
Helper method used to parse a date in string format . Meant to encapsulate the error handling .