On Mon, 20 Feb 2023 13:16:09 GMT, liach <d...@openjdk.org> wrote: >> Tingjun Yuan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize `EnumSet.copyOf` and `Set.copyOf` > > src/java.base/share/classes/java/util/EnumSet.java line 186: > >> 184: } else { >> 185: while (i.hasNext()) >> 186: result.add(i.next()); > > Can't we just use addAll in all cases?
I wonder why the original code didn't use `addAll`, so I didn't change it. 😂 ------------- PR: https://git.openjdk.org/jdk/pull/12498