When we tried to get effectiveAttributes from an AbstractRouteEntry
which is null will cause a NPE, since it doesnt contain any attribute.
Fix by check this case.
Change-Id: I311743a165373ee2da4bd4f73e2d468023e445ad
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
}
ContainerNode effectiveAttributes(final PeerId sourcePeerId, final ContainerNode attributes) {
- return policy.effectiveAttributes(peerRoles.get(sourcePeerId), attributes);
+ return attributes == null ? null : policy.effectiveAttributes(peerRoles.get(sourcePeerId), attributes);
}
Collection<Entry<PeerId, YangInstanceIdentifier>> getPeers() {