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!
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 inSecuredDataStoreInfo
return aDataAccess<? extends FeatureType, ? extends Feature>
instead of a simpleDataStore
. Note that this is already the case inDecoratingDataStoreInfo
, which isSecuredDataStoreInfo
's parent class.