A NullPointerException is thrown in StreamingRenderer when a MapLayer contains 
no features
------------------------------------------------------------------------------------------

                 Key: GEOT-1254
                 URL: http://jira.codehaus.org/browse/GEOT-1254
             Project: GeoTools
          Issue Type: Bug
          Components: core render
         Environment: Java 6, Windows Vista
            Reporter: Teodor Baciu
            Assignee: Jesse Eichar
         Attachments: EmptyLayerBugTestCase.java, patch-teodorbaciu.txt

The problem occurs in GeoTools 2.3.1 (but is also present in the trunk), when 
rendering a map context that has an empty layer.
In this situation a NullPointerException is thrown in the StreamingRenderer 
class, in the processStylers(...) method, because
"geometryAttribute" variable is null, see code below:

final GeometryAttributeType geometryAttribute = schema.getDefaultGeometry();
final CoordinateReferenceSystem sourceCrs = 
geometryAttribute.getCoordinateSystem(); 

Attached you can find a testcase for replicating the problem and patch for the 
trunk version.

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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to