On Tue, 27 Sep 2022 18:10:39 GMT, Harshitha Onkar <[email protected]> wrote:
>> DefaultListSelectionModel.removeIndexInterva accepts `int` value which
>> allows it to take in Integer.MAX_VALUE theoratically but it does calculation
>> with that value which can results in IOOBE.
>> Fix is to make sure the calculation stays within bounds.
>
> test/jdk/javax/swing/TestDefListModelExcpn.java line 33:
>
>> 31:
>> 32: public class TestDefListModelExcpn {
>> 33: public static void main(String[] args) throws Exception {
>
> @prsadhuk A more descriptive exception message using try catch block would be
> more helpful than a generic throws Exception on the main method.
I am not sure it will, it is throwing IOOBE with the statcktrace by default and
we normally relied on that for such exceptions AIOBE, IOOBE, CCE etc, not
needed to catch and rethrow
-------------
PR: https://git.openjdk.org/jdk/pull/10409