Sho SHIMIZU
Committed by Jonathan Hart

Avoid empty check of BatchWrite in the caller side

Change-Id: I5672b2d6fab719ab9a5c642a942bf4a6191e808d
...@@ -1151,7 +1151,7 @@ public class IntentManager ...@@ -1151,7 +1151,7 @@ public class IntentManager
1151 1151
1152 // Write batch information 1152 // Write batch information
1153 BatchWrite batchWrite = createBatchWrite(updates); 1153 BatchWrite batchWrite = createBatchWrite(updates);
1154 - writeBatch(batchWrite); 1154 + store.batchWrite(batchWrite);
1155 1155
1156 new IntentBatchApplyFirst(ops, processIntentUpdates(updates), endTime, 0, null).run(); 1156 new IntentBatchApplyFirst(ops, processIntentUpdates(updates), endTime, 0, null).run();
1157 } catch (Exception e) { 1157 } catch (Exception e) {
...@@ -1200,9 +1200,7 @@ public class IntentManager ...@@ -1200,9 +1200,7 @@ public class IntentManager
1200 } 1200 }
1201 1201
1202 protected void writeBatch(BatchWrite batchWrite) { 1202 protected void writeBatch(BatchWrite batchWrite) {
1203 - if (!batchWrite.isEmpty()) { 1203 + store.batchWrite(batchWrite);
1204 - store.batchWrite(batchWrite);
1205 - }
1206 } 1204 }
1207 } 1205 }
1208 1206
...@@ -1242,7 +1240,7 @@ public class IntentManager ...@@ -1242,7 +1240,7 @@ public class IntentManager
1242 // there are no flow rule batches; finalize the intent update 1240 // there are no flow rule batches; finalize the intent update
1243 BatchWrite batchWrite = createFinalizedBatchWrite(updates); 1241 BatchWrite batchWrite = createFinalizedBatchWrite(updates);
1244 1242
1245 - writeBatch(batchWrite); 1243 + store.batchWrite(batchWrite);
1246 return null; 1244 return null;
1247 } 1245 }
1248 } 1246 }
......