From 518824e41b6e8cf599ec202f073e5a185c6b8222 Mon Sep 17 00:00:00 2001 From: cadimmek Date: Thu, 9 Nov 2017 10:43:50 +0100 Subject: [PATCH] KEYCLOAK-5134 UnsupportedOperationException when using policy-enforcer-config with keycloak-spring-boot-adapter --- .../representations/adapters/config/PolicyEnforcerConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;