On Wed, 28 Sep 2022 09:38:06 GMT, Alexey Ivanov <[email protected]> wrote:
>> For negative values, the spec says "@throws IndexOutOfBoundsException if
>> either index is less than {@code -1}" which it does.
>
> Well, the spec says nothing about it for this method:
> https://github.com/openjdk/jdk/blob/096bca4a9c5e8ac2668dd965df92153ea1d80add/src/java.desktop/share/classes/javax/swing/DefaultListSelectionModel.java#L684-L690
>
> I guess it should be update to state it explicitly.
To remove an index, I guess we need to first do setSelection where we will
already throw IOOBE so I guess that's why this method does not mention or
handle it explicitly
-------------
PR: https://git.openjdk.org/jdk/pull/10409