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/HazelcastIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/HazelcastIntentStore.java
index 39255c8..667d2a8 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/HazelcastIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/HazelcastIntentStore.java
@@ -54,6 +54,7 @@
 import org.slf4j.Logger;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Map;
@@ -394,6 +395,10 @@
 
     @Override
     public List<Operation> batchWrite(BatchWrite batch) {
+        if (batch.isEmpty()) {
+            return Collections.emptyList();
+        }
+
         // Hazelcast version will never fail for conditional failure now.
         List<Operation> failed = new ArrayList<>();