Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ikasarov committed Aug 2, 2024
1 parent 603f82d commit 7abf5ab
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private boolean isSimpleReference(String value, List<Reference> references) {
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;
Expand All @@ -113,7 +113,7 @@ protected Object resolveReferenceInContext(String key, Reference reference, bool
resolutionContextWasCreated = true;
} else if (shouldBackupContext) {
// if multiple refs are resolved sequentially in a value - backup and revert context after each ref
contextKeysBackup = new HashSet<String>(resolutionContext.referencedKeys);
contextKeysBackup = new HashSet<>(resolutionContext.referencedKeys);
}
Object resolvedValue = resolveReference(reference);
if (resolutionContextWasCreated) {
Expand Down Expand Up @@ -181,8 +181,7 @@ protected Object resolveReferenceInDepth(Reference reference, Map<String, Object
currentProperty = resolveKeyInIterable(keyPart, (Collection<?>) currentProperty, deepReferenceKey);
keyPart = "";
} else if (currentProperty instanceof Map) {
@SuppressWarnings("unchecked")
Object subProperty = MapUtils.getObject((Map<Object, ?>) currentProperty, keyPart);
@SuppressWarnings("unchecked") Object subProperty = MapUtils.getObject((Map<Object, ?>) currentProperty, keyPart);
if (subProperty != null) {
currentProperty = subProperty;
keyPart = "";
Expand Down Expand Up @@ -243,8 +242,8 @@ public void addToReferencedKeys(String key) {
}
referencedKeys.add(key);
}
public void setReferencedKeys(HashSet<String> keys) {

public void setReferencedKeys(Set<String> keys) {
this.referencedKeys = keys;
}

Expand Down

0 comments on commit 7abf5ab

Please sign in to comment.