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

Roger Riggs Roger.Riggs at Oracle.com
Tue Sep 5 21:51:56 UTC 2017


Hi Brian,

On 9/5/2017 5:47 PM, Brian Burkhalter wrote:
> Hi Roger,
>
> On Sep 5, 2017, at 2:28 PM, Roger Riggs <Roger.Riggs at oracle.com 
> <mailto:Roger.Riggs at oracle.com>> wrote:
>
>> Can the function to close and invalidate the FileDescriptor be 
>> encapsulated
>> in FileDescriptor itself?   It would be another method on 
>> JavaIOFileDescriptorAccess
>> but would bring the handling of close together in one place.
>
> Yes, I have thought about that also. Currently 
> JavaIOFileDescriptorAccess only contains accessor and mutator methods. 
> I do not know whether this implies that it would be unsafe to add 
> methods there which actually perform some function such as closing.
Adding public methods would increase the chance of mis-use and potential 
incompatibilities so
they can/should only be introduced as package private to be used in the 
java.io package
or via the SharedSecrets interface/mechanism.

Thanks, Roger

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


More information about the nio-dev mailing list