From b693a3ee47f522e2575658f6308511ad9270567e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C5=ABnas=20Kraujutis?= Date: Fri, 3 Feb 2017 11:24:30 +0200 Subject: [PATCH] In case of PKI validation exception HttpMethod throws NPE, because `bytes` value is null. --- .../java/org/keycloak/authorization/client/util/HttpMethod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authz/client/src/main/java/org/keycloak/authorization/client/util/HttpMethod.java b/authz/client/src/main/java/org/keycloak/authorization/client/util/HttpMethod.java index d132620bac..10d450e064 100644 --- a/authz/client/src/main/java/org/keycloak/authorization/client/util/HttpMethod.java +++ b/authz/client/src/main/java/org/keycloak/authorization/client/util/HttpMethod.java @@ -100,7 +100,7 @@ public class HttpMethod { } catch (HttpResponseException e) { throw e; } catch (Exception e) { - throw new RuntimeException("Error executing http method [" + builder + "]. Response : " + new String(bytes), e); + throw new RuntimeException("Error executing http method [" + builder + "]. Response : " + String.valueOf(bytes), e); } }