JDK 9 RFR of JDK-8146668: Replace custom check/range functionality with check index/range methods in java.util.Objects
Amy Lu
amy.lu at oracle.com
Thu Jan 12 02:10:53 UTC 2017
8135248 and 8155794 introduced utility methods for checking indexes and
ranges. Existing code with custom checkIndex/checkRange can be updated
to use these methods. Please review the patch for this purpose:
bug: https://bugs.openjdk.java.net/browse/JDK-8146668
webrev: http://cr.openjdk.java.net/~amlu/8146668/webrev.01
The type of exception thrown are preserved. Custom checkIndex/checkRange
functions that throw IOOBE are now using ‘check’ utility methods
provided by java.lang.Objects (which also throws IOOBE), functions that
throw other exceptions use jdk.internal.util.Preconditions to preserve
exception types, with the help of new BiFunction vars.
I'd like to get this in JDK 9 if it's not too late, otherwise, JDK 10.
Thanks,
Amy
More information about the core-libs-dev
mailing list