> This PR proposes to add a new `default` method `List::removeAtIndex`. > > There are two overloads of the method `List::remove`, and if the list is of > type `List<Integer>`, the overload resolution could pick a surprising variant. > > Hence, it is better to add a separate method that removes an element based on > its index. > > It is proposed that the `E remove(int index)` method is _not_ `@Deprecated`. > Instead, we add verbiage to promote the new method over the old one. > > --------- > - [X] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision: - Merge branch 'master' into rfe-list-remove-at-index - Add @apiNote - Add List::removeAtIndex ------------- Changes: - all: https://git.openjdk.org/jdk/pull/31064/files - new: https://git.openjdk.org/jdk/pull/31064/files/d5fa4ee4..e401f3ef Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=31064&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31064&range=00-01 Stats: 23494 lines in 468 files changed: 18838 ins; 1870 del; 2786 mod Patch: https://git.openjdk.org/jdk/pull/31064.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31064/head:pull/31064 PR: https://git.openjdk.org/jdk/pull/31064
