From a856ffc2414f5db2ea29457804e4c8fb8f73fd9d Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Fri, 15 Nov 2024 23:18:56 +0100 Subject: [PATCH] NIFI-13731 Fixed null handling for Provenance Lineage Submission (#9525) Signed-off-by: David Handermann --- .../nifi/provenance/index/lucene/LuceneEventIndex.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nifi-framework-bundle/nifi-framework-extensions/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/LuceneEventIndex.java b/nifi-framework-bundle/nifi-framework-extensions/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/LuceneEventIndex.java index d137ee5fcd..63a5401ac0 100644 --- a/nifi-framework-bundle/nifi-framework-extensions/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/LuceneEventIndex.java +++ b/nifi-framework-bundle/nifi-framework-extensions/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/LuceneEventIndex.java @@ -758,6 +758,11 @@ public class LuceneEventIndex implements EventIndex { @Override public AsyncLineageSubmission retrieveLineageSubmission(final String lineageIdentifier, final NiFiUser user) { final AsyncLineageSubmission submission = lineageSubmissionMap.get(lineageIdentifier); + + if (submission == null) { + throw new AccessDeniedException("Cannot retrieve Provenance Lineage Submission. It has already been deleted or submitted to another NiFi node in the cluster."); + } + final String userId = submission.getSubmitterIdentity(); if (user == null && userId == null) {