RFR: 8266571: Sequenced Collections
    Stuart Marks 
    smarks at openjdk.org
       
    Mon Mar 20 23:45:08 UTC 2023
    
    
  
On Fri, 17 Mar 2023 07:30:12 GMT, ExE Boss <duke at openjdk.org> wrote:
>> PR for Sequenced Collections implementation.
>
> src/java.base/share/classes/java/util/SequencedMap.java line 343:
> 
>> 341:         return new SeqEntrySet();
>> 342:     }
>> 343: }
> 
> Missing trailing newline:
> Suggestion:
> 
> }
will fix
> src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java line 554:
> 
>> 552:     public E removeLast() {
>> 553:         synchronized (lock) {
>> 554:            int size = getArray().length;
> 
> Wrong indentation:
> Suggestion:
> 
>             int size = getArray().length;
> 
> (this would be avoided if the JDK was using the more accessible tabs[^1])
> 
> [^1]: prettier/prettier#7475
Thanks, will fix.
> src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java line 1803:
> 
>> 1801:         public Spliterator<E> spliterator() {
>> 1802:             // TODO can probably improve this
>> 1803:             return Spliterators.spliteratorUnknownSize(new DescendingIterator(), 0);
> 
> Suggestion:
> 
>             var it = new DescendingIterator();
>             return Spliterators.spliterator(
>                     it, it.size,
>                     Spliterator.IMMUTABLE | Spliterator.ORDERED);
Thanks, but I have some pending work to redo most if not all of the spliterators.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r1140749575
PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r1104931273
PR Review Comment: https://git.openjdk.org/jdk/pull/7387#discussion_r1104931560
    
    
More information about the client-libs-dev
mailing list