[ https://issues.apache.org/jira/browse/FLINK-26488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502662#comment-17502662 ]
Yao Zhang commented on FLINK-26488: ----------------------------------- Hi [~mapohl] , I looked into some references to this method and suggest it would be better to throw a FileNotFoundException instead of simply returning a null value, by doing which the code would be null safe. Correct me if I am wrong. > FileSystem.listFiles is not implemented consistently > ---------------------------------------------------- > > Key: FLINK-26488 > URL: https://issues.apache.org/jira/browse/FLINK-26488 > Project: Flink > Issue Type: Bug > Components: Connectors / FileSystem > Affects Versions: 1.15.0, 1.13.6, 1.14.3 > Reporter: Matthias Pohl > Priority: Major > > {{LocalFileSystem.listStatus}} returns {{null}} if the passed path refers to > a not-existing file. {{HadoopFileSystem.listStatus}} doesn't do that. > The {{FileSystem.listStatus}} JavaDoc is not specifying any behavior. -- This message was sent by Atlassian Jira (v8.20.1#820001)