GetLegendGraphic fails if SCALE is greater than MaxScaleDenominator

Description

If a style has a Rule with <MaxScaleDenominator> and no other rule to match scales over it, the GetLegendGraphic fails with an Exception when a greater scale is requested.

Example, all the rules in the style "poi" have <MaxScaleDenominator>32000</MaxScaleDenominator>

If the requested scale matches the limit, it gives you an image:
http://demo.geo-solutions.it/geoserver/wms?service=WMS&request=GetLegendGraphic&format=image%2Fpng&height=12&width=12&layer=tiger%3Apoi&style=&version=1.3.0&SLD_VERSION=1.1.0&SCALE=32000

Otherwise an Exception:
http://demo.geo-solutions.it/geoserver/wms?service=WMS&request=GetLegendGraphic&format=image%2Fpng&height=12&width=12&layer=tiger%3Apoi&style=&version=1.3.0&SLD_VERSION=1.1.0&SCALE=32001

Logs the following:

Maybe related to and

Environment

Linux 64bit, Java Oracle 1.8.0, Tomcat 7, GeoServer 2.10-snapshot ( 70b43aa9e8d6d3f6576a73620a9dc5821febb2ad )
DuctusRenderingEngine
No JAI

Status

Assignee

Andrea Aime

Reporter

Gnafu

Triage

Fix versions

Affects versions

Priority

Medium
Configure