UomRescaleStyleVisitor should handle gracefully ConstExpression.NULL

Description

Was testing JAI error logging using ImageLab - and noticed this example is broken:
1. Run ImageLab
2. Fill in raster with natural earth GeoTIFF
3. Fill in shapefile with natural earth countries

The resulting stack trace is:

SEVERE: Invalid empty measure '', was expecting a number, eventually followed by px, m or ft
java.lang.IllegalArgumentException: Invalid empty measure '', was expecting a number, eventually followed by px, m or ft
at org.geotools.styling.visitor.Measure.processLiteralExpression(Measure.java:97)
at org.geotools.styling.visitor.Measure.<init>(Measure.java:63)
at org.geotools.styling.visitor.UomRescaleStyleVisitor.rescale(UomRescaleStyleVisitor.java:92)
at org.geotools.styling.visitor.UomRescaleStyleVisitor.rescale(UomRescaleStyleVisitor.java:170)
at org.geotools.styling.visitor.UomRescaleStyleVisitor.rescaleFill(UomRescaleStyleVisitor.java:211)
at org.geotools.styling.visitor.UomRescaleStyleVisitor.visit(UomRescaleStyleVisitor.java:204)
at org.geotools.styling.PolygonSymbolizerImpl.accept(PolygonSymbolizerImpl.java:140)
at org.geotools.styling.visitor.DuplicatingStyleVisitor.copy(DuplicatingStyleVisitor.java:471)
at org.geotools.styling.visitor.DuplicatingStyleVisitor.visit(DuplicatingStyleVisitor.java:278)
at org.geotools.renderer.lite.StreamingRenderer.rescaleFeatureTypeStyle(StreamingRenderer.java:2281)
at org.geotools.renderer.lite.StreamingRenderer.applyUnitRescale(StreamingRenderer.java:2142)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1958)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:813)
at org.geotools.swing.RenderingTask.call(RenderingTask.java:106)
at org.geotools.swing.RenderingTask.call(RenderingTask.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure