RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v23]
Oliver Kopp
duke at openjdk.org
Fri Apr 26 07:16:42 UTC 2024
On Thu, 25 Apr 2024 21:41:14 GMT, Oliver Kopp <duke at openjdk.org> wrote:
>> Fixes https://bugs.openjdk.org/browse/JDK-8330462.
>>
>> If the parameter `maxLength` is larger than `Integer.MAX_VALUE - start`, then an addition of `start` to it leads to a negative value. This is "fixed" by using `Math.max` comparing the `maxLength` and `maxLength + start`.
>
> Oliver Kopp has updated the pull request incrementally with one additional commit since the last revision:
>
> Make use of Utils.clamp function
On branch `main`
`rm -rf build && ./gradlew sdk && ./gradlew --info -PFULL_TEST=true systemTests:test --tests "test.com.sun.glass.ui.win.TextAreaTest_Narrator_8330462" || ./gradlew --info -PFULL_TEST=true -PTEST_ONLY=true systemTests:test --tests "test.com.sun.glass.ui.win.TextAreaTest_Narrator_8330462"`
With [Carnac](https://github.com/Code52/carnac/) and [ShareX](https://getsharex.com/) I tried to capture what happens on **`main`**. Showing especially interactions with <kbd>Space</kbd> and <kbd>Cursor-left</kbd>.
https://github.com/openjdk/jfx/assets/1366654/f25bb801-565c-4d50-9471-c4391962049d
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2078773098
More information about the openjfx-dev
mailing list