diff --git a/projects/Lang/9/org/apache/commons/lang3/time/FastDateParser.java b/projects/Lang/9/org/apache/commons/lang3/time/FastDateParser.java index 8df302f..38857c7 100644 --- a/projects/Lang/9/org/apache/commons/lang3/time/FastDateParser.java +++ b/projects/Lang/9/org/apache/commons/lang3/time/FastDateParser.java @@ -141,6 +141,9 @@ private void init() { currentFormatField= nextFormatField; currentStrategy= nextStrategy; } + if (patternMatcher.regionStart() != patternMatcher.regionEnd()) { + throw new IllegalArgumentException("Failed to parse \""+pattern+"\" ; gave up at index "+patternMatcher.regionStart()); + } if(currentStrategy.addRegex(this, regex)) { collector.add(currentStrategy); }