<AWT Dev> RFR: 8270058: Use Objects.check{Index, FromIndexSize} for java.desktop [v3]

Jayathirth D V jdv at openjdk.java.net
Fri Jul 30 09:02:32 UTC 2021

On Fri, 30 Jul 2021 08:40:34 GMT, Pankaj Bansal <pbansal at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/JTabbedPane.java line 1793:
>>> 1791: 
>>> 1792:     private void checkIndex(int index) {
>>> 1793:         Objects.checkIndex(index, pages.size());
>> I think we should not replace IOOBE checks with messages. Its better to keep it old way.
> Objects.checkIndex itself throws exceptions for wrong values. So this should be ok. No?

We have specific message here like "Tab count" which we are not passing and will be helpful for debugging in future.


PR: https://git.openjdk.java.net/jdk/pull/4718

More information about the awt-dev mailing list