Skip to content

Commit

Permalink
sonar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aktaskaan committed Dec 12, 2024
1 parent 12b3de6 commit 9c9545c
Show file tree
Hide file tree
Showing 2 changed files with 240 additions and 447 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
@Service
public class RestrictedFieldProcessor {

private static final String VALUE = "value";

private final CaseAccessService caseAccessService;

public RestrictedFieldProcessor(CaseAccessService caseAccessService) {
Expand Down Expand Up @@ -146,8 +148,8 @@ private JsonNode processCollectionFields(CaseFieldDefinition subFieldDefinition,
sanitizedArray.add(existingItem);
}
} else {
JsonNode newValueField = matchingNewItem.get().get("value");
JsonNode existingValueField = existingItem.get("value");
JsonNode newValueField = matchingNewItem.get().get(VALUE);
JsonNode existingValueField = existingItem.get(VALUE);

if (existingValueField != null) {
JsonNode processedValueField;
Expand All @@ -162,7 +164,7 @@ private JsonNode processCollectionFields(CaseFieldDefinition subFieldDefinition,
subFieldDefinition, newValueField, existingValueField, accessProfileNames);
}

((ObjectNode) matchingNewItem.get()).set("value", processedValueField);
((ObjectNode) matchingNewItem.get()).set(VALUE, processedValueField);
}
}
}
Expand Down
Loading

0 comments on commit 9c9545c

Please sign in to comment.