mirror of
https://codeberg.org/PGPainless/cert-d-java.git
synced 2024-12-22 13:47:59 +01:00
Prevent NPEs in file walker
This commit is contained in:
parent
2758c3efb8
commit
3ec7b082be
1 changed files with 8 additions and 0 deletions
|
@ -217,6 +217,10 @@ public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirec
|
|||
}
|
||||
});
|
||||
|
||||
if (subdirectories == null) {
|
||||
subdirectories = new File[0];
|
||||
}
|
||||
|
||||
for (File subdirectory : subdirectories) {
|
||||
File[] files = subdirectory.listFiles(new FileFilter() {
|
||||
@Override
|
||||
|
@ -225,6 +229,10 @@ public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirec
|
|||
}
|
||||
});
|
||||
|
||||
if (files == null) {
|
||||
files = new File[0];
|
||||
}
|
||||
|
||||
for (File certFile : files) {
|
||||
certificateQueue.add(new Lazy<Certificate>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue