ClassCastException with WrappedSampleDimension

Description

I have a mosaic layer which ends up using WrappedSampleDimension for some reason.
I also have a custom style, which invokes OperationJAI#deriveSampleDimension at some point. (stack trace below)
Now this second operation assumes that SampleDimension#getCategories()#toArray()
returns a Category[], which is true for the default GridSampleDimension implementation, but not for WrappedSampleDimension. Hence the ClassCastException below occurs. Of course, this could also be fixed in OperationJAI.

Environment

None

Attachments

1

Activity

Andrea Aime 
February 15, 2017 at 11:47 AM

Mass closing all resolved issues not modified in the last 4 weeks

Daniele Romagnoli 
February 24, 2016 at 11:05 AM

Done

Daniele Romagnoli 
February 22, 2016 at 8:39 AM

Fixed on master. Going to backport on 2.8.x

Daniele Romagnoli 
February 17, 2016 at 3:23 PM

Hi Jeroen,
could I include the attached tif file to the pull request's test?
Or is it somehow licensed / copyright protected so that I can't do that?

Please, let me know.
Daniele

Daniele Romagnoli 
February 16, 2016 at 2:52 PM

Thanks a lot.
Going to check.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Components

Priority

Created February 2, 2016 at 3:48 PM
Updated February 15, 2017 at 11:47 AM
Resolved February 24, 2016 at 11:05 AM