From b13904a2e93fd869b0be4ad728fe7814d6028255 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Tue, 14 May 2024 21:33:05 +0200 Subject: [PATCH] fix NPE when no custom_headers in properties --- .../secretserverclient/SecretServerClientConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sts-spring/src/main/java/de/adorsys/sts/secretserverclient/SecretServerClientConfiguration.java b/sts-spring/src/main/java/de/adorsys/sts/secretserverclient/SecretServerClientConfiguration.java index d64a641d..bbc50617 100644 --- a/sts-spring/src/main/java/de/adorsys/sts/secretserverclient/SecretServerClientConfiguration.java +++ b/sts-spring/src/main/java/de/adorsys/sts/secretserverclient/SecretServerClientConfiguration.java @@ -18,6 +18,7 @@ import org.springframework.context.annotation.Import; import org.springframework.stereotype.Component; +import java.util.HashMap; import java.util.Map; @Configuration @@ -66,6 +67,6 @@ public SecretServerClient secretServerClient( @Component @ConfigurationProperties(prefix = "sts.secret-server-client") public static class CustomHeadersProperties { - private Map customHeaders; + private Map customHeaders = new HashMap<>(); } }