Securing an app-schema data store may result in ClassCastException being thrown

Description

When trying to access a secured layer backed by an app-schema data store, or, more generally, any secured layer backed by a data store serving non-simple features, the following exception may be thrown:

Simplest solution would be to make the getDataStore method in SecuredDataStoreInfo return a DataAccess<? extends FeatureType, ? extends Feature> instead of a simple DataStore. Note that this is already the case in DecoratingDataStoreInfo, which is SecuredDataStoreInfo's parent class.

Environment

None

Activity

Stefano Costa 
March 15, 2016 at 9:16 PM

Many thanks to Ben for thoroughly testing and merging this patch!

Ben Caradoc-Davies 
March 15, 2016 at 7:41 PM

Stefano Costa 
March 15, 2016 at 8:16 AM

By all means, I intend to backport this to 2.8.x, and also to 2.7.x, if there are no objections. I'll submit PRs before end-of-today.

Andrea Aime 
March 15, 2016 at 7:26 AM

It certainly seems suitable for backport to me

Ben Caradoc-Davies 
March 15, 2016 at 1:01 AM

Stefano, do you wish to backport this fix? I have left this issue open until you decide.

Fixed

Details

Assignee

Reporter

Affects versions

Components

Priority

Created March 14, 2016 at 4:52 PM
Updated March 15, 2016 at 9:16 PM
Resolved March 15, 2016 at 9:16 PM