On Mon, 25 May 2026 12:25:08 GMT, Per Minborg <[email protected]> wrote:
> This PR proposes to remove the word "may" as if computation fails, the > `Object` methods are obliged to throw. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.base/share/classes/java/util/List.java line 1248: > 1246: * {@linkplain NoSuchElementException}, and the {@linkplain > List#equals(Object)} > 1247: * <em>may</em> throw {@linkplain NoSuchElementException} depending > on which > 1248: * elements (if any) are compared. > depending on which * elements (if any) are compared. This reads a bit strange for me—in what way does it change depending of which elements are compared? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31274#discussion_r3348849297
