[
https://issues.apache.org/jira/browse/FLUME-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481036#comment-13481036
]
Brock Noland commented on FLUME-1652:
-------------------------------------
OK thanks. I think we should remove the if(!logDir.isDirectory()) check. The
reason being under normal circumstances listFiles() should never return null.
Either the directory does not exist or an io error occurred. If the directory
had logs but an io error occurred, we would just return as if nothing was there
possibly losing data.
Thoughts?
> Logutils.getLogs could NPE
> --------------------------
>
> Key: FLUME-1652
> URL: https://issues.apache.org/jira/browse/FLUME-1652
> Project: Flume
> Issue Type: Improvement
> Affects Versions: v1.2.0
> Reporter: Brock Noland
> Assignee: Brock Noland
> Priority: Minor
> Fix For: v1.4.0
>
> Attachments: FLUME-1652-0.patch
>
>
> It shouldn't happen since the directories are checked on startup to ensure
> they exist, but if an IO error occurred or if something changed underneath
> it, LogUtils.getLogs could throw an NPE in the for loop.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira