On Tue, Apr 12, 2011 at 11:46 AM, <[email protected]> wrote: > > IMappingFeatureIterator extends Iterator<Feature>, FeatureIterator<Feature> > > > > This might be the cause but I am unsure why it would cause an error casting > to FeatureIterator.
The issue is indeed caused by your class implementing those two interfaces at the same time. The current security wrapping code thinks it's possible to know if something is an iterator _or_ a feature iterator by "instanceof" inspection on the object that has to be wrapped. Once wrapped the object will only implement one of the two interfaces to the caller. Unfortunately due to the fact you're implementing both we're guessing wrong 50% of the time. Justin suggestion goes along the lines of "don't get, have someone tell you". Along this line the SecuredObjects.secure(...) caller should also provide a param telling you what interface is the desired one. This would work and it would be probably clearn, but it would require quite a bit of changes around the code My suggestion was more hacky, create a new security wrappers that also implements both interfaces, and if you find an object that implement both iterators use that specific wrapper. Hope this helps Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
