aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/common/src')
-rw-r--r--sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java2
-rw-r--r--sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/util/Environment.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
index 198fb920c..937e2d898 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/http/BaseHTTPClient.java
@@ -71,7 +71,7 @@ public class BaseHTTPClient {
private static final int SSLCERT_PCKS = 0;
private static final int SSLCERT_PEM = 1;
private static final int BUFSIZE = 1024;
- private static final Charset CHARSET = StandardCharsets.UTF_8;
+ public static final Charset CHARSET = StandardCharsets.UTF_8;
private static final String SSLCONTEXT = "TLSv1.2";
private static final int DEFAULT_HTTP_TIMEOUT_MS = 30000; // in ms
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/util/Environment.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/util/Environment.java
index 050152f50..89e926654 100644
--- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/util/Environment.java
+++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/util/Environment.java
@@ -28,6 +28,9 @@ import java.util.Map;
public class Environment {
public static String getVar(String v) {
+ return getVar(v, null);
+ }
+ public static String getVar(String v, String defaultValue) {
if (v.equals("$HOSTNAME")) {
String s = null;
try {
@@ -43,6 +46,6 @@ public class Environment {
if (envName != null && envName.equals(v))
return env.get(envName);
}
- return null;
+ return defaultValue;
}
}