From a804c5e4316b7f883d8aa0c689b431ea8cfb5d32 Mon Sep 17 00:00:00 2001 From: Cyril de Catheu Date: Sun, 7 Jan 2024 00:11:31 +0100 Subject: [PATCH] improve exception message in DateTimeFormatter (#731) Co-authored-by: Stephen Colebourne --- src/main/java/org/joda/time/format/DateTimeFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/joda/time/format/DateTimeFormat.java b/src/main/java/org/joda/time/format/DateTimeFormat.java index 89bb54d31..b3f7ab681 100644 --- a/src/main/java/org/joda/time/format/DateTimeFormat.java +++ b/src/main/java/org/joda/time/format/DateTimeFormat.java @@ -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) {