From 2bf5d1a56d0e0803020df859dff616f88db4c3cd Mon Sep 17 00:00:00 2001 From: Denes Arvay Date: Thu, 19 Nov 2020 15:31:53 +0100 Subject: [PATCH] NIFI-8017 NPEx at org.apache.nifi.provenance.index.lucene. IndexDirectoryManager:486 Added an extra null-check to avoid NullPointerException --- .../nifi/provenance/index/lucene/IndexDirectoryManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/IndexDirectoryManager.java b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/IndexDirectoryManager.java index e9c94c3e67..9f59d07608 100644 --- a/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/IndexDirectoryManager.java +++ b/nifi-nar-bundles/nifi-provenance-repository-bundle/nifi-persistent-provenance-repository/src/main/java/org/apache/nifi/provenance/index/lucene/IndexDirectoryManager.java @@ -483,6 +483,8 @@ public class IndexDirectoryManager { } private boolean isParent(final File file, final File potentialParent) { + if (file == null) return false; + final File parentFile = file.getParentFile(); if (parentFile != null && parentFile.equals(potentialParent)) { return true;