Skip to content

Commit

Permalink
fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies committed Jan 22, 2025
1 parent 05852d8 commit d8f9788
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.iotdb.db.subscription.event.batch.SubscriptionPipeTabletEventBatch;

import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

import static com.google.common.base.MoreObjects.toStringHelper;
Expand Down Expand Up @@ -72,6 +73,9 @@ public String toString() {

private static String formatEnrichedEvents(
final List<EnrichedEvent> enrichedEvents, final int threshold) {
if (Objects.isNull(enrichedEvents) || enrichedEvents.isEmpty()) {
return "";
}
final List<String> eventMessageList =
enrichedEvents.stream()
.limit(threshold)
Expand Down

0 comments on commit d8f9788

Please sign in to comment.