You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/02/17 16:03:41 UTC
[jira] [Resolved] (FLINK-5687) Missing null check for return value
from listFiles() in JarListHandler
[ https://issues.apache.org/jira/browse/FLINK-5687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu resolved FLINK-5687.
---------------------------
Resolution: Not A Problem
> Missing null check for return value from listFiles() in JarListHandler
> ----------------------------------------------------------------------
>
> Key: FLINK-5687
> URL: https://issues.apache.org/jira/browse/FLINK-5687
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> Here is related code:
> {code}
> File[] list = jarDir.listFiles(new FilenameFilter() {
> @Override
> public boolean accept(File dir, String name) {
> return name.endsWith(".jar");
> }
> });
> for (File f : list) {
> {code}
> Return value from listFiles() may be null.
> Common practice is to check before iterating over the Files:
> {code}
> if (files == null) {
> LOG.warn("Failed to get files from " + ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)