Long term code


code-fun java

Sometimes you discover code which excels in thinking really long-term:

if (val.get(Calendar.YEAR) > 280000000) {
    throw new ArithmeticException("Calendar value too large for accurate calculations");
}

org.apache.commons.lang.time.DateUtils

I still wonder about the exact reasons for this code!