On Wed, 23 Jul 2025 19:44:44 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> Ok, let's step away from the documentation and try to focus on the use case 
> of this method. Method is supposed to expose navigation within the text 
> component to the assistive technology devices and programs.

I agree with @azuev-java here, we should focus on the purpose of the API and 
how this API is supposed to be used.

I think it is reasonable to expect that `Document.getLength()` is a valid index 
for text APIs, and `getBeforeIndex` should return the last character of the 
text in this case.

I said it a few times now, _“an index within the text”_ is a vague condition, 
we should update the specification so that it is clear which indexes are valid.

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

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

Reply via email to