diff options
author | mharazin <mateusz.harazin@nokia.com> | 2019-12-17 15:08:19 +0100 |
---|---|---|
committer | mharazin <mateusz.harazin@nokia.com> | 2019-12-17 16:47:01 +0100 |
commit | bab2a8e1cfcd575d4e049ae811ab4795b2112a7c (patch) | |
tree | b19bb14d616ded3cfc97f70cdcf5806379f20ac5 /rest-services/cbs-client/src/main/java/org/onap | |
parent | 709414c63b6f95e0d63a06c4a535d6871f8576db (diff) |
Fix CbsClientConfiguration fromEnviroment
Logic returning correct with previous conditions
Issue-ID: DCAEGEN2-2003
Signed-off-by: Mateusz Harazin <mateusz.harazin@nokia.com>
Change-Id: Idb214e95b3f857d26f3065f80e9bc2e1f2700f23
Diffstat (limited to 'rest-services/cbs-client/src/main/java/org/onap')
-rw-r--r-- | rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java index 2fb07501..36555c2b 100644 --- a/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java +++ b/rest-services/cbs-client/src/main/java/org/onap/dcaegen2/services/sdk/rest/services/cbs/client/model/CbsClientConfiguration.java @@ -141,7 +141,7 @@ public interface CbsClientConfiguration { .appName(getEnv(ENV_APP_NAME)); return Optional.ofNullable(pathToCaCert).filter(certPath -> !"".equals(certPath)) .map(certPath -> createSslHttpConfig(configBuilder, certPath)) - .orElse(createPlainHttpConfig(configBuilder)); + .orElseGet(() -> createPlainHttpConfig(configBuilder)); } static CbsClientConfiguration createPlainHttpConfig(ImmutableCbsClientConfiguration.Builder configBuilder) { |