/** * @since 7.4 */ public String processText(String text) { if (text == null) { return null; } boolean doneProcessing = false; int recursionLevel = 0; while (!doneProcessing) { doneProcessing = true; String processedText = processString(vars, text); if (!processedText.equals(text)) { doneProcessing = false; text = processedText; } recursionLevel++; // Avoid infinite replacement loops if (!doneProcessing && recursionLevel > MAX_RECURSION_LEVEL) { log.warn("Detected potential infinite loop when processing the following text\n" + text); break; } } return unescape(text); }
String replacementValue = processString(newVars, newVarsValue); if (!replacementValue.equals(newVarsValue)) { doneProcessing = false;