Skip to content

Commit 0a576bd

Browse files
committed
Remove check that isn't required.
1 parent 6c244fa commit 0a576bd

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

lib/shared/internal/src/main/java/com/launchdarkly/sdk/internal/events/DefaultEventProcessor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,7 @@ private void triggerFlush(EventBuffer outbox, BlockingQueue<FlushPayload> payloa
624624
} else {
625625
logger.debug("Skipped flushing because all workers are busy");
626626
// All the workers are busy so we can't flush now; keep the events in our state
627-
if (!payload.summaries.isEmpty()) {
628-
outbox.summarizer.restoreTo(payload.summaries);
629-
}
627+
outbox.summarizer.restoreTo(payload.summaries);
630628
synchronized(busyFlushWorkersCount) {
631629
busyFlushWorkersCount.decrementAndGet();
632630
busyFlushWorkersCount.notify();

lib/shared/internal/src/test/java/com/launchdarkly/sdk/internal/events/PerContextEventSummarizerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class PerContextEventSummarizerTest {
2323

2424
@Test
2525
public void summarizeEventCreatesNewSummarizerForNewContext() {
26-
PerContextEventSummarizer mcs = new PerContextEventSummarizer();
26+
PerContextEventSummarizer mcs = new PerContextEventSummarizer();
2727

2828
mcs.summarizeEvent(1000, "flag1", 11, 1, LDValue.of("value1"), LDValue.of("default1"), context1);
2929

0 commit comments

Comments
 (0)