On Tue, 24 Jun 2025 11:34:04 GMT, Abhishek Kumar <abhis...@openjdk.org> wrote:

> I think the check is to ensure the passed index parameter is to verify the 
> boundary of text length.

Yes, but the index passed to the method is `an index within the text`, so it 
should be from 0 to length - 1. You can take a look at the opposite case when 
the index is outside the range, for example at the beginning of the text and 
getAfterIndex:
>  result = at.getAfterIndex(AccessibleText.CHARACTER, -1);
>  verifyResult("T", result);

Is that expectation correct or not? I think we should first decide whether this 
is actually a bug or not.

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

PR Comment: https://git.openjdk.org/jdk/pull/25941#issuecomment-3002102230

Reply via email to