RFR: 8360070: AccessibleText.getBeforeIndex returns null for last character [v3]
Alexey Ivanov
aivanov at openjdk.org
Wed Aug 6 14:32:03 UTC 2025
On Wed, 23 Jul 2025 19:44:44 GMT, Alexey Ivanov <aivanov at 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
More information about the client-libs-dev
mailing list