On Fri, 26 Apr 2024 22:58:37 GMT, Oliver Kopp <d...@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:
> 
>   Revert using utility method

Additionally I tried to figure out the reason as to why DeepL makes the 
`GetText` call with `INT_MAX` value by reading through all APIs of 
[ITextRangeProvider 
interface](https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nn-uiautomationcore-itextrangeprovider).
Tried to understand if the client application reads any attributes of the text 
range that can be used to determine the `maxLength` value.
If we find a dependency then the right way would have to fix that dependency. 
But I could not identify any attribute or any API that could be related to the 
`maxLength` value.

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

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

Reply via email to