SONAR Suggestion - use .equals() on strings, not '=='
Change-Id: I2dfca0b67c0f25abadf6c9a9b5317c9e90c6d297
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
index 41f0253..0839cf9 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
+++ b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricL2Forward.java
@@ -384,7 +384,7 @@
// Dump command handler
private void dump(String subject, PrintStream out) {
- if (subject == "intents") {
+ if ("intents".equals(subject)) {
out.println("L2Forward Broadcast Intents:\n");
for (SinglePointToMultiPointIntent intent: bctIntentsMap.values()) {
out.println(" " + intent.key().toString()
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
index 2bb53c9..b1e6c96 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
+++ b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricManager.java
@@ -510,7 +510,7 @@
// Dump handler
protected void dump(String subject, PrintStream out) {
- if (subject == "show") {
+ if ("show".equals(subject)) {
out.println("Static Configuration Flag:");
out.println(" ALLOW_ETH_ADDRESS_SELECTOR="
+ SimpleFabricService.ALLOW_ETH_ADDRESS_SELECTOR);
diff --git a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
index 10148c8..4ce0480 100644
--- a/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
+++ b/apps/simplefabric/src/main/java/org/onosproject/simplefabric/SimpleFabricReactiveRouting.java
@@ -897,7 +897,7 @@
// Dump Cli Handler
private void dump(String subject, PrintStream out) {
- if (subject == "intents") {
+ if ("intents".equals(subject)) {
out.println("Reactive Routing Route Intents:\n");
for (Intent entry : intentService.getIntents()) {
if (reactiveAppId.equals(entry.appId())) {
@@ -931,7 +931,7 @@
}
out.println("");
- } else if (subject == "reactive-intents") {
+ } else if ("reactive-intents".equals(subject)) {
for (Intent entry : intentService.getIntents()) {
if (reactiveAppId.equals(entry.appId())) {
MultiPointToSinglePointIntent intent = (MultiPointToSinglePointIntent) entry;
diff --git a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/utils/CeVlanMapUtils.java b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/utils/CeVlanMapUtils.java
index 8b9309c..76534d0 100644
--- a/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/utils/CeVlanMapUtils.java
+++ b/drivers/microsemi/src/main/java/org/onosproject/drivers/microsemi/yang/utils/CeVlanMapUtils.java
@@ -155,7 +155,7 @@
public static String removeZeroIfPossible(String existingMap) {
if (existingMap == null || existingMap.isEmpty()) {
return "0";
- } else if (existingMap == "0") {
+ } else if ("0".equals(existingMap)) {
return existingMap;
}
return removeFromCeVlanMap(existingMap, (short) 0);