On 05/06/18 20:05, Ian Turton wrote:
On Tue, 5 Jun 2018 at 00:25, Ben Caradoc-Davies <b...@transient.nz> wrote:
- Should we add AutoCloseable to interfaces, and if so which ones? We
could make a list.
This is an obvious first step, is there an easy way to do it? grep for
dispose?

I found many interfaces and classes with:
find . -name "*.java" -exec grep -H 'void dispose()' {} \;

With context:
find . -name "*.java" -exec grep -H -B2 'void dispose()' {} \;

Names only:
find . -name "*.java" -exec grep -l 'void dispose()' {} \; | sort

Nuno also made a list.

- Should we rename dispose() to close() in implementers and add a
deprecated dispose() that wraps close(), or just add a close() that
wraps dispose()?
I'd favour deprecating a dispose() that wraps close() - makes it clearer
what we intend.

This was my first thought, but now I prefer Nuno and Erik's suggestion of a default method. I am contemplating adding a Disposable interface.

Kind regards,

--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to