On Tue, 11 Nov 2025 14:32:20 GMT, Viktor Klang <[email protected]> wrote:

>> Patrick Strawderman has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update src/java.base/share/classes/java/util/stream/StreamOpFlag.java
>>   
>>   Simplify comparison
>>   
>>   Co-authored-by: Viktor Klang <[email protected]>
>
> src/java.base/share/classes/java/util/stream/SortedOps.java line 64:
> 
>> 62:                                 Comparator<? super T> comparator) {
>> 63:         return Comparator.naturalOrder().equals(comparator) ?
>> 64:                 new OfRef<>(upstream) : new OfRef<>(upstream, 
>> comparator);
> 
> I think it would be better to address this directly in the OfRef constructor, 
> and let the 1-arg constructor delegate to the 2-arg constructor.

I had originally tried that approach, let me go back to it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28226#discussion_r2514896974

Reply via email to