aboutsummaryrefslogtreecommitdiffstats
path: root/certServiceClient/src/main
diff options
context:
space:
mode:
authorPaweł Baniewski <pawel.baniewski@nokia.com>2020-03-24 07:37:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-24 07:37:59 +0000
commit884280dab675f13c48d19b8bda504555b8602a59 (patch)
treedd6b0f65093e306e80e0ac8fa22f5ee96292fdd0 /certServiceClient/src/main
parent2d8221140ce7d57892e94bc87ada96a0900f9fcc (diff)
parentc2d5c19d4bd5b98ae0f8bd7e6bbc415890dfbb48 (diff)
Merge "Improve code coverage"
Diffstat (limited to 'certServiceClient/src/main')
-rw-r--r--certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvProvider.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvProvider.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvProvider.java
index 25a152bf..1b8c3606 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvProvider.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvProvider.java
@@ -23,10 +23,14 @@ import java.util.Optional;
public class EnvProvider {
public Optional<String> readEnvVariable(String envVariableName) {
- return Optional.ofNullable(System.getenv(envVariableName))
+ return Optional.ofNullable(getSystemEnv(envVariableName))
.filter(EnvProvider::isEnvPresent);
}
+ String getSystemEnv(String envVariableName) {
+ return System.getenv(envVariableName);
+ }
+
private static Boolean isEnvPresent(String envValue) {
return !"".equals(envValue);
}