Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,9 @@ private static String doSubstVars(
// Using the start and stop delimiter indices, extract
// the first, deepest nested variable placeholder.
String variable = val.substring(startDelim + DELIM_START.length(), stopDelim);
String org = variable;

String substValue = processSubstitution(
variable, org, cycleMap, configProps, callback, postprocessor, defaultsToEmptyString);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems its currently renaming not removal.

String substValue =
processSubstitution(variable, cycleMap, configProps, callback, postprocessor, defaultsToEmptyString);

// Append the leading characters, the substituted value of
// the variable, and the trailing characters to get the new
Expand All @@ -285,7 +284,6 @@ private static String doSubstVars(

private static String processSubstitution(
String variable,
String org,
Set<String> cycleMap,
Map<String, String> configProps,
UnaryOperator<String> callback,
Expand Down Expand Up @@ -327,8 +325,8 @@ private static String processSubstitution(
String opValue = variable.substring(idx + 2, nextIdx >= 0 ? nextIdx : variable.length());

// Process the operator value through substitution if it contains variables
String processedOpValue =
doSubstVars(opValue, org, cycleMap, configProps, callback, postprocessor, defaultsToEmptyString);
String processedOpValue = doSubstVars(
opValue, variable, cycleMap, configProps, callback, postprocessor, defaultsToEmptyString);

// Apply the operator
if (":+".equals(op)) {
Expand All @@ -344,7 +342,7 @@ private static String processSubstitution(
break;
}
} else {
throw new InterpolatorException("Bad substitution operator in: ${" + org + "}");
throw new InterpolatorException("Bad substitution operator in: ${" + variable + "}");
}

startIdx = nextIdx >= 0 ? nextIdx : variable.length();
Expand Down