[Geoserver-devel] AbstractDecorator missimpliments Wrapper

I just came across an annoying difference between documented and actual
behaviour.

The docs for org.geoserver.catalog.Wrapper.unwrap says it should drill
down through a stack of nested Wrappers until it comes across an
implementation of the specified class. Its implementation in
org.geoserver.catalog.impl.AbstractDecorator drills all the way to the
non-wrapper class at the bottom, regardless of whether any of the
intervening wrappers implemented the given class, then returns that if
it implements the given class.

Both behaviours obviously have uses. Right now it's used to find the
real Catalog behind a stack of decorators, but it would also be useful
to be able to pull a specific decorator like AdvertisedCatalog out of
the stack.

--
  Kevin Michael Smith
  smithkm@anonymised.com