Various small fixes
Change-Id: I83802169d0d968f7b88d4be2cedba74b15fdd7da
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
index b6816e8..883be89 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnEsi.java
@@ -16,7 +16,7 @@
package org.onosproject.bgpio.types;
-import java.util.Objects;
+import java.util.Arrays;
import org.jboss.netty.buffer.ChannelBuffer;
import com.google.common.base.MoreObjects;
@@ -78,7 +78,7 @@
@Override
public int hashCode() {
- return Objects.hash(ethernetSegmentidentifier);
+ return Arrays.hashCode(ethernetSegmentidentifier);
};
@Override
@@ -89,9 +89,7 @@
if (obj instanceof BgpEvpnEsi) {
BgpEvpnEsi that = (BgpEvpnEsi) obj;
- if (this.ethernetSegmentidentifier == that.ethernetSegmentidentifier) {
- return true;
- }
+ return Arrays.equals(this.ethernetSegmentidentifier, that.ethernetSegmentidentifier);
}
return false;
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
index 60348ac..b6a2e87 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/BgpEvpnLabel.java
@@ -16,7 +16,7 @@
package org.onosproject.bgpio.types;
-import java.util.Objects;
+import java.util.Arrays;
import org.jboss.netty.buffer.ChannelBuffer;
import com.google.common.base.MoreObjects;
@@ -87,9 +87,7 @@
BgpEvpnLabel that = (BgpEvpnLabel) obj;
- if (this.mplsLabel == that.mplsLabel) {
- return true;
- }
+ return Arrays.equals(this.mplsLabel, that.mplsLabel);
}
return false;
@@ -97,7 +95,7 @@
@Override
public int hashCode() {
- return Objects.hashCode(mplsLabel);
+ return Arrays.hashCode(mplsLabel);
}
@Override
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
index 5a009f9..2d48788 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/RouteTarget.java
@@ -17,7 +17,10 @@
package org.onosproject.bgpio.types;
import com.google.common.base.MoreObjects;
-import com.google.common.base.Objects;
+
+import java.util.Arrays;
+import java.util.Objects;
+
import org.jboss.netty.buffer.ChannelBuffer;
/**
@@ -107,7 +110,7 @@
if (obj instanceof RouteTarget) {
RouteTarget that = (RouteTarget) obj;
if (this.type == that.type
- && this.routeTarget == that.routeTarget) {
+ && Arrays.equals(this.routeTarget, that.routeTarget)) {
return true;
}
}
@@ -116,7 +119,7 @@
@Override
public int hashCode() {
- return Objects.hashCode(routeTarget);
+ return Objects.hash(type, Arrays.hashCode(routeTarget));
}
@Override
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispMapReplyTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispMapReplyTest.java
index e984ced..8bd7b2e 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispMapReplyTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispMapReplyTest.java
@@ -27,6 +27,8 @@
import org.onosproject.lisp.msg.exceptions.LispWriterException;
import org.onosproject.lisp.msg.protocols.DefaultLispMapReply.ReplyReader;
import org.onosproject.lisp.msg.protocols.DefaultLispMapReply.ReplyWriter;
+import org.onosproject.lisp.msg.protocols.LispMapRecord.MapRecordBuilder;
+import org.onosproject.lisp.msg.protocols.LispMapReply.ReplyBuilder;
import org.onosproject.lisp.msg.types.LispIpv4Address;
import java.util.List;
@@ -34,9 +36,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.onosproject.lisp.msg.protocols.DefaultLispMapRecord.DefaultMapRecordBuilder;
-import static org.onosproject.lisp.msg.protocols.DefaultLispMapRecord.MapRecordBuilder;
import static org.onosproject.lisp.msg.protocols.DefaultLispMapReply.DefaultReplyBuilder;
-import static org.onosproject.lisp.msg.protocols.DefaultLispMapReply.ReplyBuilder;
/**
* Unit tests for DefaultLispMapReply class.
diff --git a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
index d05acc3..3ebb982 100644
--- a/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
+++ b/protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfDeviceInfo.java
@@ -67,7 +67,7 @@
public NetconfDeviceInfo(String name, String password, IpAddress ipAddress,
int port) {
checkArgument(!name.equals(""), "Empty device username");
- checkNotNull(port > 0, "Negative port");
+ checkArgument(port > 0, "Negative port");
checkNotNull(ipAddress, "Null ip address");
this.name = name;
this.password = password;
@@ -96,7 +96,7 @@
public NetconfDeviceInfo(String name, String password, IpAddress ipAddress,
int port, String keyString) {
checkArgument(!name.equals(""), "Empty device name");
- checkNotNull(port > 0, "Negative port");
+ checkArgument(port > 0, "Negative port");
checkNotNull(ipAddress, "Null ip address");
this.name = name;
this.password = password;
@@ -116,7 +116,7 @@
*/
public NetconfDeviceInfo(NetconfDeviceConfig netconfConfig) {
checkArgument(!netconfConfig.username().isEmpty(), "Empty device name");
- checkNotNull(netconfConfig.port() > 0, "Negative port");
+ checkArgument(netconfConfig.port() > 0, "Negative port");
checkNotNull(netconfConfig.ip(), "Null ip address");
this.name = netconfConfig.username();
diff --git a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/ThirdPartyMessage.java b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/ThirdPartyMessage.java
index b00da85..dbb1d53 100644
--- a/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/ThirdPartyMessage.java
+++ b/protocols/openflow/api/src/main/java/org/onosproject/openflow/controller/ThirdPartyMessage.java
@@ -75,7 +75,7 @@
@Override
public int hashCodeIgnoreXid() {
- return payLoad.hashCode();
+ return Arrays.hashCode(payLoad);
}
@Override
diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
index c230af2..97d9197 100644
--- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
+++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelHandler.java
@@ -1446,7 +1446,7 @@
if (dispatcherHandle.isDone()) {
// dispatcher terminated for some reason, restart
- dispatcherHandle = dispatcher.submit(() -> {
+ dispatcherHandle = dispatcher.submit((Runnable) () -> {
try {
List<OFMessage> msgs = new ArrayList<>();
for (;;) {
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfInterfaceImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfInterfaceImpl.java
index 79b613a..7c1626b 100644
--- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfInterfaceImpl.java
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfInterfaceImpl.java
@@ -138,6 +138,7 @@
*
* @return OSPF area instance
*/
+ @Override
public OspfArea ospfArea() {
return ospfArea;
}
@@ -156,6 +157,7 @@
*
* @param ospfArea OSPF area instance
*/
+ @Override
public void setOspfArea(OspfArea ospfArea) {
this.ospfArea = ospfArea;
}
@@ -188,6 +190,7 @@
*
* @return network mask
*/
+ @Override
public Ip4Address ipNetworkMask() {
return ipNetworkMask;
}
@@ -207,6 +210,7 @@
*
* @param ospfNbr ospfNbr instance
*/
+ @Override
public void addNeighbouringRouter(OspfNbr ospfNbr) {
listOfNeighbors.put(ospfNbr.neighborId().toString(), ospfNbr);
}
@@ -217,6 +221,7 @@
* @param neighborId neighbors id
* @return ospfNbr neighbor instance
*/
+ @Override
public OspfNbr neighbouringRouter(String neighborId) {
return listOfNeighbors.get(neighborId);
}
@@ -224,6 +229,7 @@
/**
* Removes all the neighbors.
*/
+ @Override
public void removeNeighbors() {
Set<String> neighbors = listOfNeighbors.keySet();
for (String neighborId : neighbors) {
@@ -245,7 +251,7 @@
ospfNeighbor.stopRxMtDdTimer();
ospfNeighbor.stopRxMtLsrTimer();
- listOfNeighbors.remove(ospfNeighbor.neighborId());
+ listOfNeighbors.remove(ospfNeighbor.neighborId().toString());
}
@@ -274,6 +280,7 @@
*
* @param lsaKey key used to store LSA in map
*/
+ @Override
public void removeLsaFromNeighborMap(String lsaKey) {
listOfNeighborMap.remove(lsaKey);
}
@@ -284,6 +291,7 @@
* @param neighborId neighbors id
* @return true if neighbor in list else false
*/
+ @Override
public boolean isNeighborInList(String neighborId) {
return listOfNeighbors.containsKey(neighborId);
}
@@ -293,6 +301,7 @@
*
* @return listOfNeighbors as key value pair
*/
+ @Override
public Map<String, OspfNbr> listOfNeighbors() {
return listOfNeighbors;
}
@@ -311,6 +320,7 @@
*
* @return interface index
*/
+ @Override
public int interfaceIndex() {
return interfaceIndex;
}
@@ -320,6 +330,7 @@
*
* @param interfaceIndex interface index
*/
+ @Override
public void setInterfaceIndex(int interfaceIndex) {
this.interfaceIndex = interfaceIndex;
}
@@ -329,6 +340,7 @@
*
* @return IP address
*/
+ @Override
public Ip4Address ipAddress() {
return ipAddress;
}
@@ -338,6 +350,7 @@
*
* @param ipAddress interface IP address
*/
+ @Override
public void setIpAddress(Ip4Address ipAddress) {
this.ipAddress = ipAddress;
}
@@ -347,6 +360,7 @@
*
* @return routerPriority value
*/
+ @Override
public int routerPriority() {
return routerPriority;
}
@@ -356,6 +370,7 @@
*
* @param routerPriority value
*/
+ @Override
public void setRouterPriority(int routerPriority) {
this.routerPriority = routerPriority;
}
@@ -365,6 +380,7 @@
*
* @return hello interval time
*/
+ @Override
public int helloIntervalTime() {
return helloIntervalTime;
}
@@ -374,6 +390,7 @@
*
* @param helloIntervalTime an integer interval time
*/
+ @Override
public void setHelloIntervalTime(int helloIntervalTime) {
this.helloIntervalTime = helloIntervalTime;
}
@@ -383,6 +400,7 @@
*
* @return router dead interval time
*/
+ @Override
public int routerDeadIntervalTime() {
return routerDeadIntervalTime;
}
@@ -392,6 +410,7 @@
*
* @param routerDeadIntervalTime router dead interval time
*/
+ @Override
public void setRouterDeadIntervalTime(int routerDeadIntervalTime) {
this.routerDeadIntervalTime = routerDeadIntervalTime;
}
@@ -401,6 +420,7 @@
*
* @return interfaceType an integer represents interface type
*/
+ @Override
public int interfaceType() {
return interfaceType;
}
@@ -410,6 +430,7 @@
*
* @param interfaceType interface type
*/
+ @Override
public void setInterfaceType(int interfaceType) {
this.interfaceType = interfaceType;
}
@@ -419,6 +440,7 @@
*
* @return mtu an integer represents max transfer unit
*/
+ @Override
public int mtu() {
return mtu;
}
@@ -428,6 +450,7 @@
*
* @param mtu max transfer unit
*/
+ @Override
public void setMtu(int mtu) {
this.mtu = mtu;
}
@@ -437,6 +460,7 @@
*
* @return retransmit interval
*/
+ @Override
public int reTransmitInterval() {
return reTransmitInterval;
}
@@ -446,6 +470,7 @@
*
* @param reTransmitInterval retransmit interval
*/
+ @Override
public void setReTransmitInterval(int reTransmitInterval) {
this.reTransmitInterval = reTransmitInterval;
}
@@ -455,6 +480,7 @@
*
* @return dr designated routers IP address
*/
+ @Override
public Ip4Address dr() {
return dr;
}
@@ -464,6 +490,7 @@
*
* @param dr designated routers IP address
*/
+ @Override
public void setDr(Ip4Address dr) {
this.dr = dr;
}
@@ -473,6 +500,7 @@
*
* @return bdr backup designated routers IP address
*/
+ @Override
public Ip4Address bdr() {
return bdr;
}
@@ -482,6 +510,7 @@
*
* @param bdr backup designated routers IP address
*/
+ @Override
public void setBdr(Ip4Address bdr) {
this.bdr = bdr;
}
@@ -491,6 +520,7 @@
*
* @throws Exception might throws exception
*/
+ @Override
public void interfaceUp() throws Exception {
log.debug("OSPFInterfaceChannelHandler::interfaceUp...!!!");
if (interfaceType() == OspfInterfaceType.POINT_TO_POINT.value()) {
@@ -578,6 +608,7 @@
* All interface variables are reset, and interface timers disabled.
* Also all neighbor connections associated with the interface are destroyed.
*/
+ @Override
public void interfaceDown() {
log.debug("OSPFInterfaceChannelHandler::interfaceDown ");
stopHelloTimer();
@@ -594,6 +625,7 @@
* @param ctx channel handler context instance.
* @throws Exception might throws exception
*/
+ @Override
public void processOspfMessage(OspfMessage ospfMessage, ChannelHandlerContext ctx) throws Exception {
log.debug("OspfChannelHandler::processOspfMessage...!!!");
@@ -1078,7 +1110,7 @@
OspfUtil.LSA_HEADER_LENGTH; // subtract a normal IP header.
int noLsa = 0;
while (listItr.hasNext()) {
- LsRequestPacket lsRequest = (LsRequestPacket) listItr.next();
+ LsRequestPacket lsRequest = listItr.next();
// to verify length of the LSA
LsaWrapper wrapper = ospfArea.getLsa(lsRequest.lsType(), lsRequest.linkStateId(),
lsRequest.ownRouterId());
@@ -1168,7 +1200,7 @@
LsaHeader lsRequest = (LsaHeader) itr.next();
OspfLsa ospfLsa =
- (OspfLsa) nbr.getPendingReTxList().get(((OspfAreaImpl) ospfArea).getLsaKey(lsRequest));
+ nbr.getPendingReTxList().get(((OspfAreaImpl) ospfArea).getLsaKey(lsRequest));
if (ospfLsa != null) {
String isSame = ((OspfLsdbImpl) ospfArea.database()).isNewerOrSameLsa(
lsRequest, (LsaHeader) ospfLsa);
@@ -1206,6 +1238,7 @@
/**
* Starts the hello timer which sends hello packet every configured seconds.
*/
+ @Override
public void startHelloTimer() {
log.debug("OSPFInterfaceChannelHandler::startHelloTimer");
exServiceHello = Executors.newSingleThreadScheduledExecutor();
@@ -1217,6 +1250,7 @@
/**
* Stops the hello timer.
*/
+ @Override
public void stopHelloTimer() {
log.debug("OSPFInterfaceChannelHandler::stopHelloTimer ");
exServiceHello.shutdown();
@@ -1244,6 +1278,7 @@
/**
* Starts the timer which waits for configured seconds and sends Delayed Ack Packet.
*/
+ @Override
public void startDelayedAckTimer() {
if (!isDelayedAckTimerScheduled) {
log.debug("Started DelayedAckTimer...!!!");
@@ -1259,6 +1294,7 @@
/**
* Stops the delayed acknowledge timer.
*/
+ @Override
public void stopDelayedAckTimer() {
if (isDelayedAckTimerScheduled) {
log.debug("Stopped DelayedAckTimer...!!!");
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/lsdb/LsdbAgeImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/lsdb/LsdbAgeImpl.java
index 636e75c..794d623 100644
--- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/lsdb/LsdbAgeImpl.java
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/lsdb/LsdbAgeImpl.java
@@ -80,7 +80,7 @@
return Objects.equal(ageBins, that.ageBins) &&
Objects.equal(ageCounter, that.ageCounter) &&
Objects.equal(ageCounterRollOver, that.ageCounterRollOver) &&
- Objects.equal(lsaQueue, lsaQueue);
+ Objects.equal(lsaQueue, that.lsaQueue);
}
@Override
@@ -94,6 +94,7 @@
* @param binKey key to store in bin
* @param lsaBin LSA bin instance
*/
+ @Override
public void addLsaBin(Integer binKey, LsaBin lsaBin) {
if (!ageBins.containsKey(binKey)) {
ageBins.put(binKey, lsaBin);
@@ -106,6 +107,7 @@
* @param binKey key
* @return bin instance
*/
+ @Override
public LsaBin getLsaBin(Integer binKey) {
return ageBins.get(binKey);
@@ -117,6 +119,7 @@
* @param key key
* @param wrapper wrapper instance
*/
+ @Override
public void addLsaToMaxAgeBin(String key, LsaWrapper wrapper) {
maxAgeBin.addOspfLsa(key, wrapper);
}
@@ -126,6 +129,7 @@
*
* @param lsaWrapper wrapper instance
*/
+ @Override
public void removeLsaFromBin(LsaWrapper lsaWrapper) {
if (ageBins.containsKey(lsaWrapper.binNumber())) {
LsaBin lsaBin = ageBins.get(lsaWrapper.binNumber());
@@ -137,6 +141,7 @@
/**
* Starts the aging timer and queue consumer.
*/
+ @Override
public void startDbAging() {
startDbAgeTimer();
queueConsumer = new LsaQueueConsumer(lsaQueue, channel, ospfArea);
@@ -147,6 +152,7 @@
/**
* Gets called every 1 second as part of the timer.
*/
+ @Override
public void ageLsaAndFlood() {
//every 5 mins checksum validation
checkAges();
@@ -167,6 +173,7 @@
/**
* If the LSA have completed the MaxAge - they are moved called stop aging and flooded.
*/
+ @Override
public void maxAgeLsa() {
if (ageCounter == 0) {
return;
@@ -178,7 +185,7 @@
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
- LsaWrapper lsa = (LsaWrapper) lsaBinMap.get((String) key);
+ LsaWrapper lsa = (LsaWrapper) lsaBinMap.get(key);
if (lsa.currentAge() == OspfParameters.MAXAGE) {
lsa.setLsaProcessing(OspfParameters.MAXAGELSA);
log.debug("Lsa picked for maxage flooding. Age Counter: {}, AgeCounterRollover: {}, " +
@@ -198,7 +205,7 @@
//Get from maxAgeBin
Map lsaMaxAgeBinMap = maxAgeBin.listOfLsa();
for (Object key : lsaMaxAgeBinMap.keySet()) {
- LsaWrapper lsa = (LsaWrapper) lsaMaxAgeBinMap.get((String) key);
+ LsaWrapper lsa = (LsaWrapper) lsaMaxAgeBinMap.get(key);
lsa.setLsaProcessing(OspfParameters.MAXAGELSA);
log.debug("Lsa picked for maxage flooding. Age Counter: {}, LSA Type: {}, LSA Key: {}",
ageCounter, lsa.lsaType(), key);
@@ -217,6 +224,7 @@
/*
* If the LSA is in age bin of 1800 - it's pushed into refresh list.
*/
+ @Override
public void refreshLsa() {
int binNumber;
if (ageCounter < OspfParameters.LSREFRESHTIME) {
@@ -230,7 +238,7 @@
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
- LsaWrapper lsa = (LsaWrapper) lsaBinMap.get((String) key);
+ LsaWrapper lsa = (LsaWrapper) lsaBinMap.get(key);
try {
if (lsa.isSelfOriginated()) {
log.debug("Lsa picked for refreshLsa. binNumber: {}, LSA Type: {}, LSA Key: {}",
@@ -259,7 +267,7 @@
}
Map lsaBinMap = lsaBin.listOfLsa();
for (Object key : lsaBinMap.keySet()) {
- LsaWrapper lsa = (LsaWrapper) lsaBinMap.get((String) key);
+ LsaWrapper lsa = (LsaWrapper) lsaBinMap.get(key);
lsa.setLsaProcessing(OspfParameters.VERIFYCHECKSUM);
try {
lsaQueue.put(lsa);
@@ -319,6 +327,7 @@
*
* @return ageCounter
*/
+ @Override
public int getAgeCounter() {
return ageCounter;
}
@@ -328,6 +337,7 @@
*
* @return the age counter roll over value
*/
+ @Override
public int getAgeCounterRollOver() {
return ageCounterRollOver;
}
@@ -337,6 +347,7 @@
*
* @return lsa bin instance
*/
+ @Override
public LsaBin getMaxAgeBin() {
return maxAgeBin;
}
@@ -347,6 +358,7 @@
* @param x Can be either age or ageCounter
* @return bin number.
*/
+ @Override
public int age2Bin(int x) {
if (x <= ageCounter) {
return (ageCounter - x);
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressSubTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressSubTlv.java
index 657a553..d478b91 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressSubTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressSubTlv.java
@@ -80,7 +80,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressSubTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressSubTlv.java
index a318024..f0dcc52 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressSubTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressSubTlv.java
@@ -78,7 +78,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofLocalNodeSubTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofLocalNodeSubTlv.java
index fc34f99..f5e4fb7 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofLocalNodeSubTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofLocalNodeSubTlv.java
@@ -78,7 +78,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofRemoteNodeSubTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofRemoteNodeSubTlv.java
index 03291a7..09a76f9 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofRemoteNodeSubTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6RouterIdofRemoteNodeSubTlv.java
@@ -79,7 +79,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
index 2ef1309..0b88a83 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
@@ -130,7 +130,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
index d662b14..ce1d04d 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
@@ -99,7 +99,7 @@
boolean bFoundNoMask = true;
//value starts from 3rd byte.
for (int i = 5; i < 20; ++i) {
- if (0xFF != raw[i]) {
+ if ((byte) 0xFF != raw[i]) {
bFoundNoMask = false;
}
}
diff --git a/protocols/pcep/server/ctl/src/test/java/org/onosproject/pcelabelstore/util/TestEventuallyConsistentMap.java b/protocols/pcep/server/ctl/src/test/java/org/onosproject/pcelabelstore/util/TestEventuallyConsistentMap.java
index 6c34554..9184352 100644
--- a/protocols/pcep/server/ctl/src/test/java/org/onosproject/pcelabelstore/util/TestEventuallyConsistentMap.java
+++ b/protocols/pcep/server/ctl/src/test/java/org/onosproject/pcelabelstore/util/TestEventuallyConsistentMap.java
@@ -90,6 +90,7 @@
return map.get(key);
}
+ @SuppressWarnings("ReturnValueIgnored")
@Override
public void put(K key, V value) {
map.put(key, value);
diff --git a/protocols/snmp/ctl/src/main/java/org/onosproject/snmp/ctl/DefaultSnmpDevice.java b/protocols/snmp/ctl/src/main/java/org/onosproject/snmp/ctl/DefaultSnmpDevice.java
index 5e1f867..b15277c 100644
--- a/protocols/snmp/ctl/src/main/java/org/onosproject/snmp/ctl/DefaultSnmpDevice.java
+++ b/protocols/snmp/ctl/src/main/java/org/onosproject/snmp/ctl/DefaultSnmpDevice.java
@@ -50,7 +50,7 @@
public DefaultSnmpDevice(String snmpHost, int snmpPort, String username, String community) {
this.snmpHost = checkNotNull(snmpHost, "SNMP Device IP cannot be null");
- this.snmpPort = checkNotNull(snmpPort, "SNMP Device port cannot be null");
+ this.snmpPort = snmpPort;
this.username = username;
this.community = community;
this.deviceId = createDeviceId();