diff options
Diffstat (limited to 'cadi')
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java | 7 | ||||
-rw-r--r-- | cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java index 5b092740..3e8d6f97 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/PermEval.java @@ -30,7 +30,6 @@ public class PermEval { public static final char ALT_START_INST_KEY_CHAR='/'; public static final char LIST_SEP = ','; - public static final String INST_KEY_REGEX = new StringBuilder().append(START_INST_KEY_CHAR).toString(); public static final String ASTERIX = "*"; /** @@ -47,7 +46,7 @@ public class PermEval { if (sInst == null || pInst == null) { return false; } - if (sInst == "" || pInst == "") { + if (sInst.equals("") || pInst.equals("")) { return false; } if (ASTERIX.equals(sInst)) { @@ -137,8 +136,8 @@ public class PermEval { * Action is not quite as complex. But we write it in this function so it can be consistent */ public static boolean evalAction(String sAction,String pAction) { - if (ASTERIX.equals(sAction))return true; // If Server's String is "*", then it accepts every Action - if (pAction == "") return false; + if (ASTERIX.equals(sAction)) return true; // If Server's String is "*", then it accepts every Action + if (pAction.equals("")) return false; for (String sItem : Split.split(LIST_SEP,sAction)) { // allow for "," definition in Action if (pAction.charAt(0)==START_REGEX_CHAR? // First char sItem.matches(pAction.substring(1)): // Evaluate as Regular Expression diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java index 65202940..308fcc80 100644 --- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java +++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/aaf/client/Examples.java @@ -302,15 +302,16 @@ public class Examples { Ns ns; Nss nss = new Nss(); - nss.getNs().add(ns = new Nss.Ns()); + ns = new Nss.Ns(); + nss.getNs().add(ns); ns.setName("org.osaaf.myns"); ns.getResponsible().add("ab1234@people.osaaf.org"); ns.getResponsible().add("cd5678@people.osaaf.org"); ns.getAdmin().add("zy9876@people.osaaf.org"); ns.getAdmin().add("xw5432@people.osaaf.org"); ns.setDescription("This is my Namespace to set up"); - - nss.getNs().add(ns = new Nss.Ns()); + ns = new Nss.Ns(); + nss.getNs().add(ns); ns.setName("org.osaaf.myOtherNs"); ns.getResponsible().add("ab1234@people.osaaf.org"); ns.getResponsible().add("cd5678@people.osaaf.org"); |