|
If you run the SelectionLab in the map tutorial and select something the following section of code throws a NPE (bbox).
Envelope bbox = new ReferencedEnvelope(); if (q.getFilter() != null) { bbox = (Envelope) q.getFilter().accept(ExtractBoundsFilterVisitor.BOUNDS_VISITOR, bbox); }
// see if we can use indexing to speedup the data access Filter filter = q != null ? q.getFilter() : null; IndexManager indexManager = getDataStore().indexManager; CloseableIterator<Data> goodRecs = null; if (getDataStore().isFidIndexed() && filter instanceof Id && indexManager.hasFidIndex(false)) { Id fidFilter = (Id) filter; List<Data> records = indexManager.queryFidIndex(fidFilter); if (records != null) { goodRecs = new CloseableIteratorWrapper<Data>(records.iterator()); }
} else if (getDataStore().isIndexed() && !bbox.isNull() && !Double.isInfinite(bbox.getWidth()) && !Double.isInfinite(bbox.getHeight())) {
It seems there are circumstances where ExtractBoundsFilterVisitor can return null and this is unexpected. The incoming query looks like: Query: feature type: countries filter: [ the_geom intersects ReferencedEnvelope[41.53846153846152 : 44.54849498327758, 21.19306899871316 : 24.203102443529218] ] [properties: ALL ]
|