INT-1591 avoiding NPEs when returning file entry names
This commit is contained in:
@@ -39,7 +39,7 @@ public class FtpPatternMatchingFileListFilter extends AbstractPatternMatchingFil
|
||||
|
||||
@Override
|
||||
protected String getFilename(FTPFile file) {
|
||||
return file.getName();
|
||||
return (file != null) ? file.getName() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class SftpPatternMatchingFileListFilter extends AbstractPatternMatchingFi
|
||||
|
||||
@Override
|
||||
protected String getFilename(LsEntry entry) {
|
||||
return entry.getFilename();
|
||||
return (entry != null) ? entry.getFilename() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user