JDK 10 RFR of 8147615: (fc) FileChannelImpl has no finalizer

Brian Burkhalter brian.burkhalter at oracle.com
Sat Oct 7 16:22:50 UTC 2017


Hi Roger,

On Oct 7, 2017, at 8:57 AM, Roger Riggs <Roger.Riggs at Oracle.com> wrote:

> I wonder if lambda is preferring this.fd instead of the argument fd.  (I imagine the JLS says that somewhere)
> Try creating a new (final) local variable with the value of argument fd and using that in the lambda.

This also timed out:

        final FileDescriptor fdl = fd;
        this.cleanable = parent != null ? null : () -> fdAccess.close(fdl);

as did this:

        final FileDescriptor fdl = fd;
        final JavaIOFileDescriptorAccess fda = fdAccess;
        this.cleanable = parent != null ? null : () -> fda.close(fdl);

I’ll look into the JLS next week.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20171007/fbaa7355/attachment.html>


More information about the nio-dev mailing list