RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v23]

Ambarish Rapte arapte at openjdk.org
Fri Apr 26 10:00: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

Here is a capture from my machine.
I have two copies of source code: One with fix and other without fix.
Please do unmute the video playback, you can listen to Narrator voice output.

https://github.com/openjdk/jfx/assets/11330676/bd3efcae-c661-4906-8388-fcb373e7e5c7

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

PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2079046989


More information about the openjfx-dev mailing list