Skip to content

Commit

Permalink
improve exception message in DateTimeFormatter (#731)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephen Colebourne <[email protected]>
  • Loading branch information
cyrilou242 and jodastephen authored Jan 6, 2024
1 parent 8186a31 commit a804c5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/joda/time/format/DateTimeFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ private static boolean isNumericToken(String token) {
*/
private static DateTimeFormatter createFormatterForPattern(String pattern) {
if (pattern == null || pattern.length() == 0) {
throw new IllegalArgumentException("Invalid pattern specification");
throw new IllegalArgumentException("Invalid pattern specification. Pattern is null or empty.");
}
DateTimeFormatter formatter = cPatternCache.get(pattern);
if (formatter == null) {
Expand Down

0 comments on commit a804c5e

Please sign in to comment.