RFR: 8216403: Allocate fewer EnumSets in JavacFileManager#list
cushon at google.com
Wed Jan 9 16:50:00 UTC 2019
On Wed, Jan 9, 2019 at 1:42 AM Claes Redestad <claes.redestad at oracle.com>
> not really a langtools reviewer, but I generally avoid using raw
> static EnumSets due their mutable nature (not saying there's a bug
> here - just that we should consider all possible futures and treat them
> Set.of() / Set.of(FOLLOW_LINKS) is a compact, performant and safer
Done, thanks: http://cr.openjdk.java.net/~cushon/8216403/webrev.01/ (I also
gave 'sourceOrClass' the same treatment.)
I used EnumSet initially because it usually performs better than
general-purpose sets, but I suppose it doesn't have much of an advantage
over Set.of for a one-element set.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the compiler-dev