Re: [Geotools-devel] How about adding AutoCloseable to GridCoverageReader

2014-06-30 Thread Andrea Aime
On Mon, Jun 30, 2014 at 12:48 PM, Jody Garnett wrote: > I am for it Andrea, a quick question - we did try and implement a close > method previously to prep for Java 7 try-with-resource. Did they change the > interface name on us - or am I missing something? > >From the java sources: public inte

Re: [Geotools-devel] How about adding AutoCloseable to GridCoverageReader

2014-06-30 Thread Jody Garnett
I am for it Andrea, a quick question - we did try and implement a close method previously to prep for Java 7 try-with-resource. Did they change the interface name on us - or am I missing something? - http://docs.codehaus.org/display/GEOTOOLS/Java+7+try-with-resource+compatibility In generally we

[Geotools-devel] How about adding AutoCloseable to GridCoverageReader

2014-06-30 Thread Andrea Aime
Hi, I'm wondering if it would be good to have GridCoverageReader implement AutoCloseable, so that it can be used in "try with resources", e.g.: try(GridCoverageReaader reader = new GeotiffReader(myFile)) { ... } The annoyance is that GridCoverageReader exposes a dispose() method, instead of a