Return Collections.emptyList() instead of null to avoid NullPointerException

Change-Id: I763a6d8993e32e2203c9e3be317d3db3e893d886
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
index 698c77c..ee51e7d 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowModBuilderVer13.java
@@ -186,11 +186,12 @@
     }
 
     private List<OFAction> buildActions(List<Instruction> treatments) {
-        List<OFAction> actions = new LinkedList<>();
-        boolean tableFound = false;
         if (treatment == null) {
-            return actions;
+            return Collections.emptyList();
         }
+
+        boolean tableFound = false;
+        List<OFAction> actions = new LinkedList<>();
         for (Instruction i : treatments) {
             switch (i.type()) {
                 case DROP:
@@ -230,7 +231,7 @@
         if (tableFound && actions.isEmpty()) {
             // handles the case where there are no actions, but there is
             // a goto instruction for the next table
-            return null;
+            return Collections.emptyList();
         }
         return actions;
     }