RFR: 8329760: Add indexOf(Predicate<? super E> filter) to java.util.List interface [v12]
Chen Liang
liach at openjdk.org
Tue Apr 23 13:54:44 UTC 2024
On Sat, 20 Apr 2024 23:11:48 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Evemose has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Added Objects import to sun List
>> - Replaced on-demand import in com.sun....List
>> - added non-null assertions
>
> src/java.base/share/classes/java/util/LinkedList.java line 1507:
>
>> 1505:
>> 1506: public int findLastIndex(Predicate<? super E> filter) {
>> 1507: return rlist.findLastIndex(filter);
>
> Hmm, this view is supposed to be reversed... so last and first need a swap. This is a bug in the current codebase, a good bug to fix indeed.
Ignore my fault, it's just delegating methods to 2 different, already reversed views...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18639#discussion_r1573458008
More information about the core-libs-dev
mailing list