aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-optimizer/src
diff options
context:
space:
mode:
authoranushadasari <danush10@in.ibm.com>2019-11-20 15:57:35 +0530
committeranushadasari <danush10@in.ibm.com>2019-11-20 15:57:52 +0530
commit614f8f9a33ade5b523003c9f5aa7299f11fcfc19 (patch)
tree9c58ddcb249eea46e2f5e552f11c25f437543b66 /cmso-optimizer/src
parent3cb2719257562283d9f90308ae71531e79522108 (diff)
Move "*" string literal on left side of string
It is preferable to place string literals on the left-hand side of an equals() or equalsIgnoreCase() method call. Issue-ID: OPTFRA-647 Change-Id: Idd9ac257f96553a00f8a455a48d678adb167a382 Signed-off-by: anushadasari <danush10@in.ibm.com>
Diffstat (limited to 'cmso-optimizer/src')
-rwxr-xr-xcmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java
index 295221c..cda740f 100755
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java
@@ -158,7 +158,7 @@ public class AafUserRole {
while (!inNodes.isEmpty() && !matchNodes.isEmpty()) {
String inNode = inNodes.remove(0);
String matchNode = matchNodes.get(0);
- if (matchNode.equals(inNode) || matchNode.equals("*")) {
+ if (matchNode.equals(inNode) || "*".equals(matchNode)) {
matchNodes.remove(0);
} else {
if (!matchNode.equals("**")) {
@@ -174,10 +174,10 @@ public class AafUserRole {
// We have incoming nodes remaining, see if we can wildcard them
if (matchNodes.size() == 1) {
- if (matchNodes.get(0).equals("**")) {
+ if ("**".equals(matchNodes.get(0))) {
return true;
}
- if (inNodes.size() == 1 && matchNodes.get(0).equals("*")) {
+ if (inNodes.size() == 1 && "*".equals(matchNodes.get(0))) {
return true;
}
}