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