From 870d90d05583f44e16376d305c8b4ed89dcb38f4 Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Sat, 17 Jun 2023 11:35:51 +1200 Subject: [PATCH] Followup to #3113, remove unused first BatchControl queue --- .../java/io/ebeaninternal/server/persist/BatchControl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java b/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java index 009a6781b6..220842cf22 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/persist/BatchControl.java @@ -81,10 +81,10 @@ public final class BatchControl { */ private int bufferMax; - private final Queue[] queues = new Queue[3]; + private final Queue[] queues = new Queue[2]; - static final int DELETE_QUEUE = 1; - static final int INSERT_QUEUE = 2; + static final int DELETE_QUEUE = 0; + static final int INSERT_QUEUE = 1; /** * Create for a given transaction, PersistExecute, default size and getGeneratedKeys. @@ -268,7 +268,6 @@ public void clear() { } private void flushBuffer(boolean reset) throws BatchedSqlException { - flushQueue(queues[0]); flushInternal(reset); flushQueue(queues[DELETE_QUEUE]); flushQueue(queues[INSERT_QUEUE]);