Automatic Resource Management, V.2

Joshua Bloch jjb at
Mon Apr 20 00:30:36 PDT 2009

Good question. We did it to eliminate the possibility of name clashes in
existing programs. JBoss actually uses the name AutoCloseable. Types in
java.lang are automatically imported, and putting AutoCloseable in avoids this issue. It doesn't make the construct any less
usable, as you don't have to mention AutoCloseable explicitly to use the


On Mon, Apr 20, 2009 at 12:11 AM, Rémi Forax <forax at> wrote:

> Joshua Bloch a écrit :
>> Fellow Coiners,
>> Thanks for all your feedback on the Automatic Resource Management
>> proposal.
>>  I have revised the proposal in light of these comments.  The new version
>> (V.2) can be seen at this URL:
>> . It is included below
>> for
>> archival purposes.
>>   Josh
> Hi josh,
> just a small question why AutoClosable is specified to be in
> and not java.lang.
> regards,
> Rémi

More information about the coin-dev mailing list