Andrea we *do* ask that an Iterator get's closed when it falls off the 
end, but this does not
protect us in the event of IO Error.

It could be we have made a bad tradeoff, and should ask each iterator 
implementor to clean up everything as their throw an IOError (it force 
implementors to take on the "finally" pain once so all the client code 
does not have to).

Defined as is the implementors were "easy" to write, getting rid of 
close( Iterator ) would swing the library more in favour of the user 
community would be a large QA task, added to the list of FilterVisitor, 
FeatureBuilder and FeatureTypeBuilder QA tasks already slowing us down.

Cheers,
Jody
> Hi,
> I'd like to propose deprecating and then removing the above
> method. It's error prone and breaks the usual for(Iterator it...)
> idioms. Feature iterators should automatically close themselves
> once they reach the end, it should be as simple as that.
>
> What do you think?
> What's the reason to have that close around, why can't we
> assume FeatureIterator implementors are smart enough to close
> themselves once reached the end, or have the user call close()
> on the iterator if the end is not reached?
>
> Cheers
> Andrea
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>   


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to