From 5599d3efe5dc1ee0e8bb738e040f375e3adc5cf6 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) {