Return immediately when the given BatchWrite is empty

This revision aims to remove empty check of BatchWrite in the caller
side of this method

Change-Id: Ic0d659a6da221a052ad135eba18a783caa81ec42
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/DistributedIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/DistributedIntentStore.java
index 556f4cb..ef6d086 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/DistributedIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/DistributedIntentStore.java
@@ -54,6 +54,7 @@
 import org.slf4j.Logger;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
@@ -416,6 +417,9 @@
 
     @Override
     public List<Operation> batchWrite(BatchWrite batch) {
+        if (batch.isEmpty()) {
+            return Collections.emptyList();
+        }
 
         List<Operation> failed = new ArrayList<>();
         final Builder builder = BatchWriteRequest.newBuilder();