On 06/06/18 13:48, Ben Caradoc-Davies wrote:
I would also remove the exception specification because it can never be
thrown, and for consistency with dispose().
Although I should note that there are several classes with a dispose()
that throws. While this is ugly, it can be a necessary guard required
for data integrity. We might need two interfaces ThrowingDisposable and
Disposable:
public interface ThrowingDisposable extends AutoCloseable {
/**
* @see java.lang.AutoCloseable#close()
*/
@Deprecated
@Override
default void close() throws Exception {
dispose();
}
void dispose() throws Exception;
}
public interface Disposable extends ThrowingDisposable {
/**
* @see java.lang.AutoCloseable#close()
*/
@Deprecated
@Override
default void close() {
dispose();
}
@Override
void dispose();
}
Kind regards,
--
Ben Caradoc-Davies <[email protected]>
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel