Sonar fixes
- Missing break statement
- integer arithmetic for a long expression
Change-Id: If3d8ef43590cd81073029643057e21ff51b6a1e9
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHandler.java
index 5dc3f9b..61b4359 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHandler.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingHandler.java
@@ -180,6 +180,7 @@
setFlatJumpRules(instPort, false);
setUpstreamRulesForFlat(instPort, false);
setDownstreamRulesForFlat(instPort, false);
+ break;
default:
log.warn("Unsupported network type {}", type.name());
break;
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/StatsFlowRuleManager.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/StatsFlowRuleManager.java
index fddbdfa..f9dea2e 100644
--- a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/StatsFlowRuleManager.java
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/StatsFlowRuleManager.java
@@ -88,8 +88,8 @@
private static final byte FLOW_TYPE_SONA = 1; // VLAN
- private static final int MILLISECONDS = 1000;
- private static final int REFRESH_INTERVAL = 5;
+ private static final long MILLISECONDS = 1000L;
+ private static final long REFRESH_INTERVAL = 5L;
private ApplicationId appId;
@@ -328,7 +328,7 @@
// TODO: need to make the refresh interval configurable
sBuilder.withStartupTime(System.currentTimeMillis())
.withFstPktArrTime(System.currentTimeMillis())
- .withLstPktOffset(REFRESH_INTERVAL * MILLISECONDS)
+ .withLstPktOffset((int) (REFRESH_INTERVAL * MILLISECONDS))
.withCurrAccPkts((int) entry.packets())
.withCurrAccBytes(entry.bytes())
.withErrorPkts((short) 0)