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.
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.