commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCI-68) FilesystemAlterationMonitor NullPointerException when directory not readable
Date Mon, 19 Aug 2013 11:38:47 GMT

    [ https://issues.apache.org/jira/browse/JCI-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743740#comment-13743740
] 

Sebb commented on JCI-68:
-------------------------

The problem is the line:

final File[] childs = file.listFiles();

This can be null, e.g. of the file does not denote a directory, or some IOError (which presumably
includes protection issues)

It would be easy to detect this and return an empty array.
Should the problem be logged?
                
> FilesystemAlterationMonitor NullPointerException when directory not readable
> ----------------------------------------------------------------------------
>
>                 Key: JCI-68
>                 URL: https://issues.apache.org/jira/browse/JCI-68
>             Project: Commons JCI
>          Issue Type: Bug
>          Components: fam
>    Affects Versions: 1.1
>         Environment: Linux
>            Reporter: Jan
>              Labels: fam, permissions
>             Fix For: 1.1
>
>         Attachments: FileAlteration.java
>
>
> When one of the directories monitored by the FilesystemAlterationMonitor is not readable
by the proess, the monitoring crashes with a NullPointerException

--
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

Mime
View raw message