GeoServer loader can NPE on missing folders in the data directory
-----------------------------------------------------------------
Key: GEOS-3748
URL: http://jira.codehaus.org/browse/GEOS-3748
Project: GeoServer
Issue Type: Bug
Affects Versions: 2.0.0
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Fix For: 2.0.2
Looking at an NPE reported by a user against 2.0 it seems GeoServerLoader.list can NPE when the directory whose file contents need to be listed is missing or cannot be accessed due to any reason. By the javadoc of File.listFiles():
{panel}
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 null if this abstract pathname does not denote a directory, or if an I/O error occurs.
{panel}
The code calling GeoServerLoader.list() does not check in fact that the directory exists or that it can be accessed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira