boolean strict = request.isStrict();
final boolean buildRasterLegend = (!strict && layer == null && LegendUtils
.checkRasterSymbolizer(gt2Style))
|| LegendUtils.checkGridLayer(layer);
if (buildRasterLegend) {
final RasterLayerLegendHelper rasterLegendHelper = new RasterLayerLegendHelper(request);
this.legendGraphic = rasterLegendHelper.getLegend();
return;
}
final SimpleFeature sampleFeature;
if (layer == null) {