On Fri, Jul 19, 2013 at 2:23 AM, Brett Walker
<brett.wal...@geometryit.com>wrote:
> Just a bit more regarding this.****
>
> ** **
>
> I’m more interested in why a TreeSet was used for Objects that don’t
> implement Comparable when a HashSet could have done. This implementation
> detail is not immediately obvious.
>
By the looks of it I'm pretty sure your patch will break the netcdf reader
once we stumble against real world data.
Readers have two well known dimensions, time and elevation, if you look at
those, the treesets are already setting
up the proper comparator.
And then there are the "additional domains", which are extra dimension
found in the NetCDF/Grib that can be
String, numbers, dates, that is, normally, comparables, for which the
existing code should work, and your patched
version will surely fail.
The real question imho is why are we getting a range as an additional
dimension... it's not impossible, but seems
a bit unlikely, I'll check the build and see why we are getting them in.
Generally speaking, the comparator for those two treeset of Object there
should take care first of the case Comparable
against Comparable, and then try to do comparisons of date and number
ranges as a fallback.
If the contents of the set are mixed type is most certainly an error, that
should throw an exception.
Anyways, this is my opinion after a cursory look, let me give it a spin
with Java 7 and see
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel