mirror of https://github.com/apache/nifi.git
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:
parent
dc6ba2541f
commit
2bf5d1a56d
|
@ -483,6 +483,8 @@ public class IndexDirectoryManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isParent(final File file, final File potentialParent) {
|
private boolean isParent(final File file, final File potentialParent) {
|
||||||
|
if (file == null) return false;
|
||||||
|
|
||||||
final File parentFile = file.getParentFile();
|
final File parentFile = file.getParentFile();
|
||||||
if (parentFile != null && parentFile.equals(potentialParent)) {
|
if (parentFile != null && parentFile.equals(potentialParent)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue