summaryrefslogtreecommitdiff
path: root/eaaf_core_utils
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-09-18 07:10:32 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-09-18 07:10:32 +0200
commit8b0a2f1632f8fff485dbab0455f11a8ea1e8b857 (patch)
treeee6e3a9e909e7d344402c65c6c0d907e178ca3dc /eaaf_core_utils
parent4671767699179a16d099ca105ce9bf4307c30d9b (diff)
downloadEAAF-Components-8b0a2f1632f8fff485dbab0455f11a8ea1e8b857.tar.gz
EAAF-Components-8b0a2f1632f8fff485dbab0455f11a8ea1e8b857.tar.bz2
EAAF-Components-8b0a2f1632f8fff485dbab0455f11a8ea1e8b857.zip
fix possible NullPointerException in HttpClientFactory.java
Diffstat (limited to 'eaaf_core_utils')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/HttpClientFactory.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/HttpClientFactory.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/HttpClientFactory.java
index 73f2c518..bfbe6ae2 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/HttpClientFactory.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/HttpClientFactory.java
@@ -200,11 +200,16 @@ public class HttpClientFactory implements IHttpClientFactory {
//set pool connection if required
injectConnectionPoolIfRequired();
- final ClientAuthMode clientAuthMode = ClientAuthMode.fromString(
+ ClientAuthMode clientAuthMode = ClientAuthMode.fromString(
basicConfig.getBasicConfiguration(PROP_CONFIG_CLIENT_MODE, ClientAuthMode.NONE.getMode()));
- log.info("Client authentication-mode is set to: {}", clientAuthMode);
-
+ if (clientAuthMode == null) {
+ log.warn("Can Not parse ClientAuthMode! Set mode to default value");
+ clientAuthMode = ClientAuthMode.NONE;
+
+ }
+
//inject basic http authentication if required
+ log.info("Client authentication-mode is set to: {}", clientAuthMode);
injectBasicAuthenticationIfRequired(clientAuthMode);
//inject authentication if required