Fixing FlowRule priority in intent compilers

Change-Id: I13998e88d2a116017e87c019f4829101db6c6b6b
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index cd7200a..76c5736 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -24,7 +24,6 @@
 import org.apache.felix.scr.annotations.ReferenceCardinality;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.core.DefaultGroupId;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.Link;
@@ -123,9 +122,14 @@
                 treatment = defaultTreatment;
             }
 
-            DefaultFlowRule rule = new DefaultFlowRule(deviceId, selector, treatment, 123, appId,
-                    new DefaultGroupId((short) (intent.id().fingerprint() & 0xffff)), 0, true, null);
-
+            FlowRule rule = DefaultFlowRule.builder()
+                                .forDevice(deviceId)
+                                .withSelector(selector)
+                                .withTreatment(treatment)
+                                .withPriority(intent.priority())
+                                .fromApp(appId)
+                                .makePermanent()
+                                .build();
             rules.add(rule);
         }