From 409356f734cddcbc8c57782fbe3e243a5990c712 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 16 Nov 2015 15:05:56 -0200 Subject: [PATCH] KEYCLOAK-2065: Update the client via Admin REST API causes 500 Internal Server Error --- .../org/keycloak/services/resources/admin/ClientResource.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/resources/admin/ClientResource.java b/services/src/main/java/org/keycloak/services/resources/admin/ClientResource.java index 5d76778196..17a16f50c3 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/ClientResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/ClientResource.java @@ -50,6 +50,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import static java.lang.Boolean.TRUE; + /** * Base resource class for managing one particular client of a realm. @@ -103,7 +105,7 @@ public class ClientResource { auth.requireManage(); try { - if (rep.isServiceAccountsEnabled() && !client.isServiceAccountsEnabled()) { + if (TRUE.equals(rep.isServiceAccountsEnabled()) && !client.isServiceAccountsEnabled()) { new ClientManager(new RealmManager(session)).enableServiceAccount(client);; }