On Tue, 27 Jul 2021 02:46:53 GMT, Yi Yang wrote:
>> I meant
>>
>> if (imageIndex < minIndex)
>> throw new IndexOutOfBoundsException();
>>
>> can't it be replaced with Objects.checkFromToIndex(minIndex, imageIndex, ..
>
> Hi, sorry for the late response. checkFromToIndex
On Thu, 22 Jul 2021 06:35:07 GMT, Prasanta Sadhukhan
wrote:
>> checkFromToIndex​ has different semantice with checkIndex:
>>
>> - checkFromToIndex
>>
>> *
>> * {@code fromIndex < 0}
>> * {@code fromIndex > toIndex}
>> * {@code toIndex > length}
>> * {@code length
On Thu, 22 Jul 2021 06:23:43 GMT, Yi Yang wrote:
>> test/jdk/javax/imageio/ImageReaderReadAll.java line 94:
>>
>>> 92: if (seekForwardOnly) {
>>> 93: if (imageIndex < minIndex)
>>> 94: throw new IndexOutOfBoundsException();
>>
>> Can't we use
On Thu, 22 Jul 2021 05:48:44 GMT, Prasanta Sadhukhan
wrote:
>> Yi Yang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> checkFromIndexSize(off, len,...)
>
> test/jdk/javax/imageio/ImageReaderReadAll.java line 94:
>
>> 92:
On Wed, 21 Jul 2021 09:58:23 GMT, Yi Yang 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.
>>
>> As Mandy suggested, I create this PR for