The name is derived from java.io.Closeable.  The fact an object is
Closeable tells you it needs to be closed, but it doesn't tell you *who*
should close it.  The API still has to make it clear who has the
responsibility of closing it.


On 2013-08-01 10:06, David Mason wrote:
> In zanata-war/src/main/java/org/zanata/dao/TextFlowStreamingDAO.java:
> 
>>     }
>>  
>>     /**
>>      * Returns all HTextFlows in all projects, eagerly fetches targets, document, iteration and project.  
>>      * Obsolete projects, iterations, documents and textflows are skipped.
>> +    * <p>
>> +    * NB: caller must close the iterator, or call next() until the iterator is exhausted,
>> +    * or else a database connection will be leaked.
> 
> It looks like we have one of these comments everywhere that a
> |CloseableIterator| is returned, suggesting that it is /always/ the
> responsibility of someone using such an iterator to close it. If so,
> perhaps we can rename |CloseableIterator| to make the closing sound more
> imperative than optional.
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/78/files#r5519652>.
> 


-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat