RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

David Holmes dholmes at openjdk.java.net
Thu Jun 17 05:19:11 UTC 2021


On Wed, 16 Jun 2021 08:08:47 GMT, Yi Yang <yyang at openjdk.org> wrote:

> After JDK-8265518(#3615), it's possible to replace all variants of checkIndex by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in the whole JDK codebase.

Class loading order is different to class initialization order.

There are a lot more tests than just tier1. :) I don't expect many, if any, tests to be looking for a specific IOOBE message, and I can't see an easy way to find such tests without running them.  If core-libs folk are okay with this update then I guess we can just handle any test failures if they arise. But I'll run this through our tier 1-3 testing.

Thanks,
David

-------------

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


More information about the serviceability-dev mailing list