On Wed, 8 Nov 2023 21:03:59 GMT, Viktor Klang <vkl...@openjdk.org> wrote:
>> src/java.base/share/classes/java/util/stream/Gatherer.java line 272: >> >>> 270: * Returns a combiner which is the default combiner of a Gatherer. >>> 271: * The returned combiner identifies that the owning Gatherer must >>> only >>> 272: * be evaluated sequentially. >> >> Should we specify that a single shared instance is guaranteed to be >> returned, so clients may use `combiner == defaultCombiner()`, rather than >> `combiner.equals(defaultCombiner())`? > > @amaembo Something to the effect of "This method always returns the same > instance."? @viktorklang-ora yes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1387727900