Skip to content

Commit

Permalink
chore(cleanup): [eclipse-tractusx#734] correct method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed Jul 17, 2024
1 parent 68a5eab commit 76d4114
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ public List<AcceptedPolicy> getConfiguredDefaultPolicies() {

public Map<String, List<Policy>> getAllStoredPolicies() {
final Map<String, List<Policy>> bpnToPolicies = persistence.readAll();
if (containsNoDefaultPolicyAvailable(bpnToPolicies)) {
if (containsNoDefaultPolicy(bpnToPolicies)) {
bpnToPolicies.put("default", allowedPoliciesFromConfig);
}
return bpnToPolicies;
}

private static boolean containsNoDefaultPolicyAvailable(final Map<String, List<Policy>> bpnToPolicies) {
private static boolean containsNoDefaultPolicy(final Map<String, List<Policy>> bpnToPolicies) {
return bpnToPolicies.keySet().stream().noneMatch(key -> StringUtils.isEmpty(key) || DEFAULT.equals(key));
}

Expand Down

0 comments on commit 76d4114

Please sign in to comment.