Merge branch '6.2.x'

This commit is contained in:
Stéphane Nicoll
2024-12-23 12:31:31 +01:00
2 changed files with 43 additions and 4 deletions

View File

@@ -512,7 +512,7 @@ final class PlaceholderParser {
@Override
public String resolve(PartResolutionContext resolutionContext) {
String value = resolveRecursively(resolutionContext, this.key);
String value = resolveRecursively(resolutionContext);
if (value != null) {
return value;
}
@@ -521,6 +521,17 @@ final class PlaceholderParser {
}
return resolutionContext.handleUnresolvablePlaceholder(this.key, text());
}
@Nullable
private String resolveRecursively(PartResolutionContext resolutionContext) {
if (!this.text().equals(this.key)) {
String value = resolveRecursively(resolutionContext, this.text());
if (value != null) {
return value;
}
}
return resolveRecursively(resolutionContext, this.key);
}
}