On Tue, 6 Dec 2022 16:47:05 GMT, Roger Riggs <[email protected]> wrote:
>> Sergey Tsypanov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8298033: Fix Character.codePointBefore()
>
> src/java.base/share/classes/java/lang/Character.java line 9480:
>
>> 9478: */
>> 9479: public static int codePointBefore(char[] a, int index, int start) {
>> 9480: if (index <= start || start < 0 || start >= a.length || index
>> > a.length) {
>
> Since `index > start` it is sufficient to throw `index > a.length`.
> The check `start >= a.length` is redundant.
>
> `0 <= start < index <= a.length`
Done. I think we should rename the ticket as soon as we modify two methods now
-------------
PR: https://git.openjdk.org/jdk/pull/11480