commit | a3fcf6754a23a46f2c7b7f856817ea8b4fc5cfb1 | [log] [tgz] |
---|---|---|
author | Jon Hall <jhall@ciena.com> | Tue Mar 28 16:53:22 2017 -0700 |
committer | Ray Milkey <ray@onlab.us> | Wed Apr 05 22:54:30 2017 +0000 |
tree | 2508a2f4bcff7c24cd4d9bcac29aa4e13bad48cd | |
parent | 634eb17ac5e522b94632e34fa797a8333f321892 [diff] [blame] |
Fix Sonar issue: Strings literals should be placed on the left side when checking for equality Change-Id: I4537e08936731ace55aeecb3ad941269ec1eb191
diff --git a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java index be921cc..f8d86f1 100644 --- a/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java +++ b/cli/src/main/java/org/onosproject/cli/app/ApplicationNameCompleter.java
@@ -63,9 +63,9 @@ // if (previousApps.contains(app.id().name())) { // continue; // } - if (cmd.equals("uninstall") || - (cmd.equals("activate") && state == INSTALLED) || - (cmd.equals("deactivate") && state == ACTIVE)) { + if ("uninstall".equals(cmd) || + ("activate".equals(cmd) && state == INSTALLED) || + ("deactivate".equals(cmd) && state == ACTIVE)) { strings.add(app.id().name()); } }