/** * Returns the original runtime exception iff the joda-time being used * at runtime behaves as expected. * * @throws IllegalStateException if the joda-time being used at runtime * doens't appear to be of the right version. */ private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }
/** * Returns the original runtime exception iff the joda-time being used * at runtime behaves as expected. * * @throws IllegalStateException if the joda-time being used at runtime * doens't appear to be of the right version. */ private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }
/** * Returns the original runtime exception iff the joda-time being used * at runtime behaves as expected. * * @throws IllegalStateException if the joda-time being used at runtime * doens't appear to be of the right version. */ private static <E extends RuntimeException> E handleException(E ex) { if (JodaTime.hasExpectedBehavior()) return ex; throw new IllegalStateException("Joda-time 2.2 or later version is required, but found version: " + JodaTime.getVersion(), ex); }