[Geoserver-devel] [jira] Created: (GEOS-3707) GeoServerLoader will fail with NPE if the "styles" subdirectory is missing

GeoServerLoader will fail with NPE if the "styles" subdirectory is missing
--------------------------------------------------------------------------

                 Key: GEOS-3707
                 URL: http://jira.codehaus.org/browse/GEOS-3707
             Project: GeoServer
          Issue Type: Bug
          Components: Configuration
            Reporter: Andrea Aime
            Assignee: Justin Deoliveira
             Fix For: 2.0.1

Following up a report from the users list I noticed the GeoServerLoader code will fail with an NPE if pointed to a data dir that does not have a styles subdirectory.

There is code such as:

{code}
File styles = resourceLoader.find( "styles" );
        for ( File sf : list(styles,new SuffixFileFilter(".xml") ) ) {
{code}

which is not guarded against the possibility the dir is not there.
Wondering if the proper fix would be to use findOrCreate or just add a guard.

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