RFR: 8360070: AccessibleText.getBeforeIndex returns null for last character [v2]
Abhishek Kumar
abhiscxk at openjdk.org
Tue Jun 24 11:14:50 UTC 2025
> `AccessibleText.getBeforeIndex` method returns `null for last characte`r due to the **wrong boundary value condition check**.
> This method returns `null` when the `passed index parameter` is equal to `text's length` which is incorrect.
> `getBeforeIndex` method should return `null` only if the **passed index parameter is less than 0 and greater than the text's length**.
>
> After modifying the condition check, expected character is returned. Test is added to verify the check,
Abhishek Kumar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge
- TextComponent's getBeforeIndex boundary value check fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25941/files
- new: https://git.openjdk.org/jdk/pull/25941/files/6e5eef63..b7852974
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25941&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25941&range=00-01
Stats: 52056 lines in 1209 files changed: 35231 ins; 10992 del; 5833 mod
Patch: https://git.openjdk.org/jdk/pull/25941.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25941/head:pull/25941
PR: https://git.openjdk.org/jdk/pull/25941
More information about the client-libs-dev
mailing list