@Test public void testIssue233Overflows() throws ParseException { String[] cases = { "292278994-08-17T07:12:55.808Z", "292278995-01-17T07:12:55.807Z", }; for (String edgeCase : cases) { try { Date parsed = DateUtils.parseISO8601Date(edgeCase); fail("Unexpected success: " + parsed); } catch (IllegalArgumentException ex) { String msg = ex.getMessage(); assertTrue(msg .contains("must be in the range [-292275054,292278993]")); } } }
public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }
DateUtils { public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } } }
DateUtils { public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }  }
DateUtils { public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }  static Date parseISO8601Date(String dateString); static String formatISO8601Date(Date date); static String formatISO8601Date(DateTime date); static Date parseRFC822Date(String dateString); static String formatRFC822Date(Date date); static Date parseCompressedISO8601Date(String dateString); static Date parseServiceSpecificDate(String dateString); static Date parseUnixTimestampInMillis(String dateString); static String formatServiceSpecificDate(Date date); static String formatUnixTimestampInMills(Date date); static Date cloneDate(Date date); static long numberOfDaysSinceEpoch(long milliSinceEpoch); }
DateUtils { public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }  static Date parseISO8601Date(String dateString); static String formatISO8601Date(Date date); static String formatISO8601Date(DateTime date); static Date parseRFC822Date(String dateString); static String formatRFC822Date(Date date); static Date parseCompressedISO8601Date(String dateString); static Date parseServiceSpecificDate(String dateString); static Date parseUnixTimestampInMillis(String dateString); static String formatServiceSpecificDate(Date date); static String formatUnixTimestampInMills(Date date); static Date cloneDate(Date date); static long numberOfDaysSinceEpoch(long milliSinceEpoch);  }