summaryrefslogtreecommitdiffstats
path: root/auth/auth-core
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-04-04 21:42:19 -0500
committerInstrumental <jonathan.gathman@att.com>2019-04-05 07:54:42 -0500
commitbe7e0d14765b8fb1520c457ab99ddedf0f7ab65e (patch)
treecb2c544275dbb905d07239798bdbef8dbcb8c8df /auth/auth-core
parent08755cae37030d74d8fcadf38f9919c9d9fd21c0 (diff)
Refine Helm Client Charts
Issue-ID: AAF-802 Change-Id: Ie00cd2919eeecef00aac1dae139c7ef80092589a Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/common/Define.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/common/Define.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/common/Define.java
index 7bc1fdc6..e9c36017 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/common/Define.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/common/Define.java
@@ -35,6 +35,7 @@ public class Define {
private final static String MSG = ".set(Access access) must be called before use";
public static final CharSequence ROOT_NS_TAG = "AAF_NS"; // use for certain Replacements in Location
+ private static final int ROOT_NS_TAG_LEN=ROOT_NS_TAG.length();
private static final String ROOT_NS_TAG_DOT = ROOT_NS_TAG +".";
public static String ROOT_NS() {
@@ -74,10 +75,15 @@ public class Define {
}
public static String varReplace(final String potential) {
- if (potential.startsWith(ROOT_NS_TAG_DOT)) {
- return ROOT_NS + potential.substring(6);
+ int idx = potential.indexOf(ROOT_NS_TAG_DOT);
+ if(idx<0) {
+ return potential;
+ } else if(idx==0) {
+ return ROOT_NS + potential.substring(ROOT_NS_TAG_LEN);
+ } else if('.'==potential.charAt(idx)) {
+ return potential.replace(ROOT_NS_TAG, ROOT_NS);
} else {
- return potential;
+ return potential;
}
}