Issue Type: Bug Bug
Affects Versions: 10.2
Assignee: Unassigned
Components: imagemosaic plugin
Created: 03/Dec/13 3:34 AM
Description:

The code in RasterManager.createStore only initializes the typeName variable in one specific case, in the other case the typename is not initialized:

 public void createStore (SimpleFeatureType indexSchema) throws IOException {
        final String typeName = indexSchema.getTypeName();

        final SimpleFeatureType type = typeName != null ? granuleCatalog.getType(typeName) : null;
        if (type == null) {
            this.typeName = typeName;
            granuleCatalog.createType(indexSchema);
        } else {
            // remove them all, assuming the schema has not changed
            final Query query = new Query(type.getTypeName());
            query.setFilter(Filter.INCLUDE);
            granuleCatalog.removeGranules(query);
        }
    }

This results in an NPE later on. I suggest to set this.typeName to typeName in all cases, or certainly when it has not yet been set.

Project: GeoTools
Priority: Major Major
Reporter: Jeroen Dries
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
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to