trivial patch to reduce allocations in nio open* methods

Brian Burkhalter brian.burkhalter at oracle.com
Fri Mar 30 15:15:33 UTC 2018


On Mar 30, 2018, at 1:27 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> You can use an immutable set to avoid wrapping the EnumSet, e.g.
>     private static final Set<OpenOption> DEFAULT_CREATE_OPTIONS = Set.of(CREATE_NEW, WRITE);

I was wondering whether the DEFAULT_*_OPTIONS constants should be created at all, i.e., kept around as static finals.

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


More information about the nio-dev mailing list