geoserver/geoserver — pull request #107 by mbarto (2013-01-21 11:00:31+00:00)
Title: Fixed exception with generic Geometry type in WMS GetLegendGraphic

An exception was thrown using GetLegendGraphic WMS operation on a layer with a geometry type of GEOMETRY:

java.lang.IllegalArgumentException: class com.vividsolutions.jts.geom.Geometry is not supported by this method
at org.geotools.data.DataUtilities.defaultValue(DataUtilities.java:997)
at org.geotools.feature.simple.SimpleFeatureBuilder.convert(SimpleFeatureBuilder.java:316)
at org.geotools.feature.simple.SimpleFeatureBuilder.set(SimpleFeatureBuilder.java:297)
at org.geotools.feature.simple.SimpleFeatureBuilder.add(SimpleFeatureBuilder.java:220)
at org.geotools.feature.simple.SimpleFeatureBuilder.template(SimpleFeatureBuilder.java:502)
at org.geoserver.wms.legendgraphic.BufferedImageLegendGraphicBuilder.createSampleFeature(BufferedImageLegendGraphicBuilder.java:534