Fix NPE caused by RoutingRulePopulator not initiated before linkHandler.init()

Change-Id: If21a2628c9d4e7687c26fda467240093dbc723c8
diff --git a/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java b/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java
index 63473a7..948124d 100644
--- a/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java
+++ b/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java
@@ -71,7 +71,6 @@
                 .withTimestampProvider((k, v) -> new WallClockTimestamp())
                 .build();
         log.trace("Current size {}", downedPortStore.size());
-        init();
     }
 
     /**
@@ -88,10 +87,9 @@
     /**
      * Initialize LinkHandler.
      */
-    private void init() {
+    void init() {
         log.info("Loading stored links");
-        srManager.linkService.getActiveLinks()
-                .forEach(link -> processLinkAdded(link));
+        srManager.linkService.getActiveLinks().forEach(this::processLinkAdded);
     }
 
     /**
diff --git a/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 1f035d7..0e4373b 100644
--- a/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -440,6 +440,7 @@
         routeService.addListener(routeListener);
         topologyService.addListener(topologyListener);
 
+        linkHandler.init();
         l2TunnelHandler.init();
 
         log.info("Started");