NIFI-8017 NPEx at org.apache.nifi.provenance.index.lucene. IndexDirectoryManager:486

Added an extra null-check to avoid NullPointerException
This commit is contained in:
Denes Arvay 2020-11-19 15:31:53 +01:00 committed by markap14
parent dc6ba2541f
commit 2bf5d1a56d
1 changed files with 2 additions and 0 deletions

View File

@ -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;