8285445: Would it make sense to add an java.nio.channels.FileChannel::nullFileChannel()

Patrick Reinhart patrick at reini.net
Mon May 2 09:05:15 UTC 2022


Hi Brian & Alan,

I just run also into this issue and saw that that Alan suggested the use 
of OutputStream.nullOutputStream() that we implemented a while ago:

https://bugs.openjdk.java.net/browse/JDK-8285445?focusedCommentId=14490595&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14490595

In the specific case I ran into was, that this problem was also in the a 
widely used library org.jboss.xnio:xnio-nio where they actually would 
like to have a null FileChannel.I wonder if it make sense to create an 
according issune and start creating an according proposal for that 
relating to https://bugs.openjdk.java.net/browse/JDK-6852033

Regards

Patrick



More information about the core-libs-dev mailing list