From 5ca50840f547ceef44ecdf5f6205f9fc7a087439 Mon Sep 17 00:00:00 2001 From: David Leifker Date: Fri, 13 Sep 2024 05:56:32 -0500 Subject: [PATCH] fix(NPE): fix NPE in EntityService * On some database failures null is found in the stream, filter it to avoid red herring stacktrace --- .../java/com/linkedin/metadata/entity/EntityServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java b/metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java index c584b8ac4d7a2..69135a8a64805 100644 --- a/metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java +++ b/metadata-io/src/main/java/com/linkedin/metadata/entity/EntityServiceImpl.java @@ -1041,6 +1041,7 @@ private List ingestAspectsToLocalDB( inputBatch, DEFAULT_MAX_TRANSACTION_RETRY) .stream() + .filter(Objects::nonNull) .flatMap(List::stream) .collect(Collectors.toList()); }