diff --git a/core/src/main/java/org/keycloak/representations/adapters/config/PolicyEnforcerConfig.java b/core/src/main/java/org/keycloak/representations/adapters/config/PolicyEnforcerConfig.java index 67c3c594f4..26dc22005b 100644 --- a/core/src/main/java/org/keycloak/representations/adapters/config/PolicyEnforcerConfig.java +++ b/core/src/main/java/org/keycloak/representations/adapters/config/PolicyEnforcerConfig.java @@ -119,7 +119,7 @@ public class PolicyEnforcerConfig { private String type; private String path; private List methods = new ArrayList<>(); - private List scopes = Collections.emptyList(); + private List scopes = new ArrayList<>(); private String id; @JsonProperty("enforcement-mode") @@ -218,7 +218,7 @@ public class PolicyEnforcerConfig { public static class MethodConfig { private String method; - private List scopes = Collections.emptyList(); + private List scopes = new ArrayList<>(); @JsonProperty("scopes-enforcement-mode") private ScopeEnforcementMode scopesEnforcementMode = ScopeEnforcementMode.ALL;