NIFI-13731 Fixed null handling for Provenance Lineage Submission (#9525)

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
Pierre Villard 2024-11-15 23:18:56 +01:00 committed by GitHub
parent 3fd3957b83
commit a856ffc241
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -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) {