getPorts() never returns null, and it returns an empty set if no port is
mapped to the VLAN mapping.
Change-Id: Idce2f6ac0f2b2f66f20d0b92e234312f7968612b
Signed-off-by: Shigeru Yasuda <s-yasuda@da.jp.nec.com>
*/
void transmit(VTNManagerImpl mgr, PacketContext pctx, Set<PortVlan> sent) {
Set<NodeConnector> ports = getPorts(mgr);
- if (ports == null) {
+ if (ports.isEmpty()) {
LOG.trace("{}:{}: transmit: No port is available",
mgr.getContainerName(), mapPath);
return;
*
* @param mgr VTN Manager service.
* @return A set of node connectors.
- * Node that {@code null} may be returned.
+ * An empty set is returned if no node connector is available.
*/
private Set<NodeConnector> getPorts(VTNManagerImpl mgr) {
Node node = vlanMapConfig.getNode();