diff --git a/libs/grok/src/main/java/org/opensearch/grok/Grok.java b/libs/grok/src/main/java/org/opensearch/grok/Grok.java index fc2325a367afb..96e79e0189300 100644 --- a/libs/grok/src/main/java/org/opensearch/grok/Grok.java +++ b/libs/grok/src/main/java/org/opensearch/grok/Grok.java @@ -245,11 +245,11 @@ private static void throwExceptionForCircularReference(String patternName, Strin throwExceptionForCircularReference(patternName, pattern, null, null); } - private static void throwExceptionForCircularReference(String patternName, String pattern, String originPatterName, List path) { + private static void throwExceptionForCircularReference(String patternName, String pattern, String originPatternName, List path) { StringBuilder message = new StringBuilder("circular reference in pattern ["); message.append(patternName).append("][").append(pattern).append("]"); - if (originPatterName != null) { - message.append(" back to pattern [").append(originPatterName).append("]"); + if (originPatternName != null) { + message.append(" back to pattern [").append(originPatternName).append("]"); } if (path != null && path.size() > 1) { message.append(" via patterns [").append(String.join("=>", path)).append("]");