Fix an NPE in modified when calling hostHandler

Change-Id: Ifa8799875f8de8c5b322e773748b5f8caee8f97a
This commit is contained in:
Charles Chan 2020-02-26 15:04:44 -08:00 committed by Charles Chan
parent 32c9696d28
commit a40ecbbee1

View File

@ -473,6 +473,18 @@ public class SegmentRoutingManager implements SegmentRoutingService {
.withTimestampProvider((k, v) -> new WallClockTimestamp())
.build();
processor = new InternalPacketProcessor();
linkListener = new InternalLinkListener();
deviceListener = new InternalDeviceListener();
appCfgHandler = new AppConfigHandler(this);
mcastHandler = new McastHandler(this);
hostHandler = new HostHandler(this);
linkHandler = new LinkHandler(this);
routeHandler = new RouteHandler(this);
neighbourHandler = new SegmentRoutingNeighbourDispatcher(this);
l2TunnelHandler = new DefaultL2TunnelHandler(this);
topologyHandler = new TopologyHandler(this);
compCfgService.preSetProperty("org.onosproject.net.group.impl.GroupManager",
"purgeOnDisconnection", "true", false);
compCfgService.preSetProperty("org.onosproject.net.flow.impl.FlowRuleManager",
@ -503,18 +515,6 @@ public class SegmentRoutingManager implements SegmentRoutingService {
compCfgService.registerProperties(getClass());
modified(context);
processor = new InternalPacketProcessor();
linkListener = new InternalLinkListener();
deviceListener = new InternalDeviceListener();
appCfgHandler = new AppConfigHandler(this);
mcastHandler = new McastHandler(this);
hostHandler = new HostHandler(this);
linkHandler = new LinkHandler(this);
routeHandler = new RouteHandler(this);
neighbourHandler = new SegmentRoutingNeighbourDispatcher(this);
l2TunnelHandler = new DefaultL2TunnelHandler(this);
topologyHandler = new TopologyHandler(this);
cfgService.addListener(cfgListener);
cfgService.registerConfigFactory(deviceConfigFactory);
cfgService.registerConfigFactory(appConfigFactory);