RFR(s): 8073923: Files.lines() documentation needs clarification
Stuart Marks
stuart.marks at oracle.com
Tue Mar 3 02:43:16 UTC 2015
Hi Joe,
Oh yes, good point. Revised webrev:
http://cr.openjdk.java.net/~smarks/reviews/8073923/webrev.1/
Thanks,
s'marks
On 3/2/15 6:14 PM, Joseph D. Darcy wrote:
> Hi Stuart,
>
> Since try-with-resources is "just" a desugaring, I think the statements like
>
> [The resource] must be opened as a resource within a try-with-resources
> 136 * statement to ensure that it is closed promptly after its operations
> have completed.
>
> should be replaced with the milder
>
> ... with a try-with-resources statement or similar control structure to
> ensure...
>
> Thanks,
>
> -Joe
>
> On 3/2/2015 5:57 PM, Stuart Marks wrote:
>> Hi all,
>>
>> Please review minor clarifications to Files.lines() and other Files methods
>> that return streams. The changes emphasize that try-with-resources should be
>> used. This also clarifies and strengthens a bit of the Stream class doc that
>> talks about when to use try-with-resources on streams.
>>
>> Bug:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8073923
>>
>> Webrev:
>>
>> http://cr.openjdk.java.net/~smarks/reviews/8073923/webrev.0/
>>
>> Thanks,
>>
>> s'marks
>
More information about the core-libs-dev
mailing list