if (dateStyle == DF_NONE && timeStyle == DF_NONE
|| dateStyle < 0 || dateStyle >= DF_LIMIT
|| timeStyle < 0 || timeStyle >= DF_LIMIT) {
throw new IllegalArgumentException("Illegal date format style arguments");
}
DateFormat result = null;
if (dateFormats != null) {
result = dateFormats[dateStyle][timeStyle];
}
if (result != null) {
result = (DateFormat) result.clone(); // clone for safety
// Not sure overriding configuration is what we really want...
result.setTimeZone(getTimeZone());
} else {
result = guessDateFormat(dateStyle, timeStyle);
}
return result;
}