Skip to content

Commit e052125

Browse files
committed
refactor(batch): remove redundant condition
By definition, send() will only send data if the batch is full.
1 parent 8e4780b commit e052125

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/main/java/io/weaviate/client6/v1/api/collections/batch/BatchContext.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,7 @@ private void trySend() {
643643
awaitState(State::canPrepareNext, "can prepare next");
644644

645645
while (!Thread.currentThread().isInterrupted()) {
646-
// TODO(dyma): this check is redundant, send will only send while batch is full;
647-
if (batch.isFull()) {
648-
send();
649-
}
646+
send(); // Only sends if the batch is full.
650647

651648
TaskHandle task = queue.take();
652649

0 commit comments

Comments
 (0)