Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove method overload #271

Merged
merged 1 commit into from
Aug 9, 2024
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 @@ -73,7 +73,7 @@ public Object visit(String key, String value) {
private Object resolveReferences(String key, String value) {
List<Reference> references = detectReferences(value);
if (isSimpleReference(value, references)) {
return resolveReferenceInContext(key, references.get(0));
return resolveReferenceInContext(key, references.get(0), false);
}
StringBuilder result = new StringBuilder(value);
for (Reference reference : references) {
Expand Down Expand Up @@ -101,18 +101,14 @@ private boolean isSimpleReference(String value, List<Reference> references) {
.length();
}

protected Object resolveReferenceInContext(String key, Reference reference) {
return resolveReferenceInContext(key, reference, false);
}

protected Object resolveReferenceInContext(String key, Reference reference, boolean shouldBackupContext) {
boolean resolutionContextWasCreated = false;
HashSet<String> contextKeysBackup = null;
if (resolutionContext == null) {
resolutionContext = new ResolutionContext(NameUtil.getPrefixedName(prefix, key));
resolutionContextWasCreated = true;
} else if (shouldBackupContext) {
// if multiple refs are resolved sequentially in a value - backup and revert context after each ref
// if multiple refs are resolved sequentially in a value - backup and revert context after each resolution
contextKeysBackup = new HashSet<>(resolutionContext.referencedKeys);
}
Object resolvedValue = resolveReference(reference);
Expand Down
Loading