From 57380cc9d93b8d9b93569404f4e084151e6226a9 Mon Sep 17 00:00:00 2001 From: Vasyl Khrystiuk Date: Sat, 30 Nov 2024 04:04:15 +0200 Subject: [PATCH] [WIP] --- src/main/java/liqp/filters/date/FuzzyDateParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/liqp/filters/date/FuzzyDateParser.java b/src/main/java/liqp/filters/date/FuzzyDateParser.java index 0f8b3333..f2b65b79 100644 --- a/src/main/java/liqp/filters/date/FuzzyDateParser.java +++ b/src/main/java/liqp/filters/date/FuzzyDateParser.java @@ -136,11 +136,15 @@ private static String[] withoutNulls(String[] shortMonths) { return Arrays.stream(shortMonths) .filter(month -> month != null && !month.isEmpty()) .map(el -> { + // after jdk 9 it's normal (not counted as a bug) + // so here need to check version and work around + // https://bugs.openjdk.org/browse/JDK-8194289 while (el.endsWith(".")) { el = el.substring(0, el.length() - 1); } return el; }) + .map(Pattern::quote) .toArray(String[]::new); } }