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

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

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

Andrea Aime
March 15, 2016, 7:26 AM

It certainly seems suitable for backport to me

Stefano Costa
March 15, 2016, 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.

Ben Caradoc-Davies
March 15, 2016, 7:41 PM
Stefano Costa
March 15, 2016, 9:16 PM

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

Assignee

Stefano Costa

Reporter

Stefano Costa

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure