RFR: 8017513: Support for closeable streams
Henry Jen
henry.jen at oracle.com
Wed Aug 28 14:10:43 PDT 2013
Hi,
Please review the webrev at
http://cr.openjdk.java.net/~henryjen/ccc/8017513/1/webrev/
Based on the feedback/discussion from last time, the EG decided to
weaken AutoCloseable contract(see RFR 8022176[1]), and have Stream
extend AutoCloseable.
A quick briefing of the webrev,
- Remove CloseableStream and DelegatingStream, which was previous used
to implement close of resource
- BaseStream extends AutoCloseable, thus all Stream implementation will
implements close()
- onClose() method allows to chain up close handlers which are invoked
by close()
- Change use of CloseableStream to Stream, mainly java.nio.file.Files
and various tests.
The specdiff is also available at
http://cr.openjdk.java.net/~henryjen/ccc/8017513/1/specdiff/overview-summary.html
Cheers,
Henry
[1]
http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-August/020236.html
More information about the lambda-dev
mailing list