fix for JIRA issue ONOS-6161.Possible null pointer reference on portchain-list object in file 'SfcManager.java' at line no 394

Change-Id: I5c01c8c19b67b31005ddd892419d0aedfe262e8c
This commit is contained in:
nitinanand 2017-03-24 18:03:14 +05:30 committed by Ray Milkey
parent b28d5dd544
commit c97ff689b6

View File

@ -379,7 +379,7 @@ public class SfcManager implements SfcService {
* Find the port chain for the received packet. * Find the port chain for the received packet.
* *
* @param fiveTuple five tuple info from the packet * @param fiveTuple five tuple info from the packet
* @return portChainId id of port chain * @return portChainId id of port chain, null if portChain is not found
*/ */
private PortChainId findPortChainFromFiveTuple(FiveTuple fiveTuple) { private PortChainId findPortChainFromFiveTuple(FiveTuple fiveTuple) {
@ -388,6 +388,7 @@ public class SfcManager implements SfcService {
Iterable<PortChain> portChains = portChainService.getPortChains(); Iterable<PortChain> portChains = portChainService.getPortChains();
if (portChains == null) { if (portChains == null) {
log.error("Could not retrive port chain list"); log.error("Could not retrive port chain list");
return null;
} }
// Identify the port chain to which the packet belongs // Identify the port chain to which the packet belongs