Sonar fixes
Change-Id: Id9209ef62897df0f70f0409053ed3ef90e5f18df
diff --git a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
index 121a6c0..ca5959d 100644
--- a/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
+++ b/apps/mcast/cli/src/main/java/org/onosproject/mcast/cli/McastHostDeleteCommand.java
@@ -83,10 +83,9 @@
print("Route is not present, store it first");
return;
}
- // Otherwise remove the entire host id
- if (host != null) {
- mcastRouteManager.removeSink(mRoute, hostId);
- }
+ // Remove the entire host id
+ mcastRouteManager.removeSink(mRoute, hostId);
+
// We have done
printMcastRoute(U_FORMAT_MAPPING, mRoute);
}
diff --git a/apps/odtn/src/main/java/org/onosproject/odtn/cli/impl/OdtnManualTestCommand.java b/apps/odtn/src/main/java/org/onosproject/odtn/cli/impl/OdtnManualTestCommand.java
index 604e9d0..1f72785 100644
--- a/apps/odtn/src/main/java/org/onosproject/odtn/cli/impl/OdtnManualTestCommand.java
+++ b/apps/odtn/src/main/java/org/onosproject/odtn/cli/impl/OdtnManualTestCommand.java
@@ -172,7 +172,7 @@
.newDocumentBuilder().newDocument();
} catch (ParserConfigurationException e) {
printlog("Unexpected error", e);
- throw new RuntimeException(e);
+ throw new IllegalStateException(e);
}
// netconf rpc boilerplate part without message-id
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/pwaas/L2TunnelHandler.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/pwaas/L2TunnelHandler.java
index 294134e..d3b95b4 100644
--- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/pwaas/L2TunnelHandler.java
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/pwaas/L2TunnelHandler.java
@@ -161,7 +161,7 @@
return nextId;
}
- public void setNextId(int nextId) {
+ protected void setNextId(int nextId) {
this.nextId = nextId;
}