mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-26 05:41:08 +01:00
argument should be checked for null before dereferencing
Change-Id: I3f13d924727a0e522f149d0e1842a730fe7d0e14
This commit is contained in:
parent
9bf01a1d39
commit
a8e1bfa725
@ -62,6 +62,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
/**
|
||||
@ -151,6 +152,7 @@ public class IsisTopologyProvider extends AbstractProvider implements DeviceProv
|
||||
* @return link description
|
||||
*/
|
||||
private LinkDescription buildLinkDes(IsisLink isisLink) {
|
||||
checkNotNull(isisLink);
|
||||
long srcAddress = 0;
|
||||
long dstAddress = 0;
|
||||
boolean localPseduo = false;
|
||||
@ -185,9 +187,8 @@ public class IsisTopologyProvider extends AbstractProvider implements DeviceProv
|
||||
ConnectPoint src = new ConnectPoint(srcId, PortNumber.portNumber(srcAddress));
|
||||
ConnectPoint dst = new ConnectPoint(dstId, PortNumber.portNumber(dstAddress));
|
||||
DefaultAnnotations.Builder annotationBuilder = DefaultAnnotations.builder();
|
||||
if (isisLink != null) {
|
||||
annotationBuilder = buildAnnotations(annotationBuilder, isisLink);
|
||||
}
|
||||
|
||||
annotationBuilder = buildAnnotations(annotationBuilder, isisLink);
|
||||
|
||||
return new DefaultLinkDescription(src, dst, Link.Type.DIRECT, false, annotationBuilder.build());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user