From 07b930e073c1616f70fbc1419420b49f1d2d0686 Mon Sep 17 00:00:00 2001 From: Nicholas Walter Knize Date: Mon, 13 Nov 2023 09:00:46 -0600 Subject: [PATCH] add original forPattern method to preserve interface. Signed-off-by: Nicholas Walter Knize --- .../main/java/org/opensearch/common/time/DateFormatter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/main/java/org/opensearch/common/time/DateFormatter.java b/server/src/main/java/org/opensearch/common/time/DateFormatter.java index 35f38f37968db..66ebca4010e6c 100644 --- a/server/src/main/java/org/opensearch/common/time/DateFormatter.java +++ b/server/src/main/java/org/opensearch/common/time/DateFormatter.java @@ -137,6 +137,10 @@ default String formatMillis(long millis) { */ DateMathParser toDateMathParser(); + static DateFormatter forPattern(String input, String printPattern, Boolean canCacheFormatter) { + return forPattern(input, printPattern, canCacheFormatter, Version.CURRENT); + } + static DateFormatter forPattern(String input, String printPattern, Boolean canCacheFormatter, final Version supportedVersion) { if (Strings.hasLength(input) == false) {