On 09/07/2010, at 12:10 AM, Mauricio Pazos wrote: > Hello: > We have solved and tested this bug. > http://jira.codehaus.org/browse/UDIG-1686 > > But, we did have to modify Interceptor behavior. Could someone does a > codereview please. The modified lines are commented in the referred issue.
I will review now; two months ago I modified some of the interceptor code and asked for a code review as well. > We have a doubt because, right now, the unit test ShowViewIntercept .... looks like you are checking that the view being returned is actually appropriate to the requestedType. FeatureSource<SimpleFeatureType, SimpleFeature> view = ds.getView(query); if (view != null) { if (requestedType.isAssignableFrom(FeatureSource.class)) { return view; } else { return null; } } So there are some problems with that - not with your code; with the GeoTools definition of getView: - getView( Query ) - can return a FeatureSource or a FeatureStore, or null - depending on the implementation of the DataStore - indeed it is such a poorly defined method it has been removed from GeoTools 2.7 - there is a DefaultView( featureSource, query ) "wrapper" that was used by 90% of the implementations anyways - I will update the code and ask for your review... > ShowViewInterceptorTest fail in testGetFeatureStore. > It expects a resource null! As noted above the getView should not really be returning null; so the test is bad. Jody
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel