[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-awt-dev
Subject:    Re: <AWT Dev> RFR: 8270058: Use Objects.check{Index, FromIndexSize} for java.desktop [v3]
From:       Jayathirth D V <jdv () openjdk ! java ! net>
Date:       2021-07-30 9:02:32
Message-ID: Sj1ctbhJEOMTbZQwEdJmjz28i0AAbwNoUnXm9a6fOxA=.90f0249c-06f9-40fb-8fcf-40351a82b919 () github ! com
[Download RAW message or body]

On Fri, 30 Jul 2021 08:40:34 GMT, Pankaj Bansal <pbansal@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic