diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index 203bbb777..776623dd5 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -181,13 +181,13 @@ public List getConfiguredDefaultPolicies() { public Map> getAllStoredPolicies() { final Map> bpnToPolicies = persistence.readAll(); - if (containsNoDefaultPolicyAvailable(bpnToPolicies)) { + if (containsNoDefaultPolicy(bpnToPolicies)) { bpnToPolicies.put(DEFAULT, allowedPoliciesFromConfig); } return bpnToPolicies; } - private static boolean containsNoDefaultPolicyAvailable(final Map> bpnToPolicies) { + private static boolean containsNoDefaultPolicy(final Map> bpnToPolicies) { return bpnToPolicies.keySet().stream().noneMatch(key -> StringUtils.isEmpty(key) || DEFAULT.equals(key)); }