RFR 8080225: FileInputStream cleanup should be improved
Alan Bateman
Alan.Bateman at oracle.com
Thu Oct 12 12:35:54 UTC 2017
On 04/10/2017 15:35, Roger Riggs wrote:
> Hi Mandy,
>
> Updated the webrev in place:
> http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/
I skimmed the latest webrev.
The @apiNote in FIS is copied from FOS so it needs
s/FileOutputStream/FileInputStream/.
I assume in FIS that we should skip registerCleanup when the fd is
FileDescriptor.in, ditto in FOS and RAF where we shouldn't register for
cleanup when the fd is one of the standard streams. Alternatively handle
this in FileDescriptor.
I'm curious why registerCleaner invoke clears and create a new cleanup.
There are cases where we create a FileDescriptor and set the fd or
handle lazily but these won't be registered until set.
Otherwise I think this looks quite good.
-Alan
More information about the core-libs-dev
mailing list