Bah that email got away from me - lets try again.
> - commented out code:
> https://github.com/geotools/geotools/commit/c0fd151d0265aa53b696010d0d995344c6533104#L6R1149
>
>
Yes this was a utility method when we removed the FeatureResults class; time
for it to die (now removed).
> - given how generics work, isn't this method redundand with respect
> the one right below it?
> https://github.com/geotools/geotools/commit/c0fd151d0265aa53b696010d0d995344c6533104#L6R1277
>
>
I was not sure, let me try with a test case … yep.
> And also some things that I can see now that I noticed the pull request has
> been updated:
> - several places where the DataUtilities.collectionCast method could still be
> used,
> just look for "throw new IllegalStateException" in the diffs provided by
> github:
> https://github.com/geotools/geotools/pull/44/files
Done.
> - in the streamign renderer can't we have a single loop by calling
> DataUtilities.iterator over the
> feature collection, and then calling DataUtiltiies.close(iterator)
> once the loop is done?
> Wouldn't this allow to preserve most of the original code intact?
Good thought, I was trying to take it the other way (i.e. FeatureIterator), but
as it stands
the renderer is set up to work with Collection<Object> as well.
Yep that worked.
Also found some dead code checking arguments for the paint method - now reads:
// ////////////////////////////////////////////////////////////////////
//
// Check for null arguments, recompute missing ones if possible
//
// ////////////////////////////////////////////////////////////////////
if (graphics == null) {
LOGGER.severe("renderer passed null graphics argument");
throw new NullPointerException("renderer requires graphics");
} else if (paintArea == null) {
LOGGER.severe("renderer passed null paintArea argument");
throw new NullPointerException("renderer requires paintArea");
} else if (mapArea == null) {
LOGGER.severe("renderer passed null mapArea argument");
throw new NullPointerException("renderer requires mapArea");
} else if (worldToScreen == null) {
worldToScreen = RendererUtilities.worldToScreenTransform(mapArea,
paintArea);
if (worldToScreen == null)
return;
}
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel