[infinispan-issues] [JBoss JIRA] (ISPN-1914) Add hints for when File.listFiles() returns null
Galder Zamarreño (JIRA)
jira-events at lists.jboss.org
Mon Mar 19 06:07:47 EDT 2012
[ https://issues.jboss.org/browse/ISPN-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreño updated ISPN-1914:
-----------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/1007
> Add hints for when File.listFiles() returns null
> ------------------------------------------------
>
> Key: ISPN-1914
> URL: https://issues.jboss.org/browse/ISPN-1914
> Project: Infinispan
> Issue Type: Enhancement
> Components: Loaders and Stores
> Affects Versions: 5.1.2.FINAL
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 5.1.3.CR1, 5.1.3.FINAL
>
>
> Under some circumstances, File.listFiles() can return null as shown by AS7-3808:
> {code}
> @return An array of abstract pathnames denoting the files and
> directories in the directory denoted by this abstract
> pathname. The array will be empty if the directory is
> empty. Returns <code>null</code> if this abstract pathname
> does not denote a directory, or if an I/O error occurs.
> {code}
> In order to get more information, if listFiles() returns null, add some checks to see if File.exists() and if File.isDirectory(). This might give us more of a clue of what happened. Also, although not likely, it might be worth to check permissions via File.canRead() and File.canWrite() too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list