Re: RFR: 8301761: The sorting of the SortedList can become invalid [v4]

2024-10-12 Thread Oliver Kopp
On Mon, 7 Oct 2024 16:25:22 GMT, Loay Ghreeb wrote: >> Fix an issue in `SortedList` where the sorting became incorrect when adding >> new items that are equal to existing items according to the comparator. The >> `SortedList` should consider the insertion index of these items to maintain >> th

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v26]

2024-05-08 Thread Oliver Kopp
On Tue, 7 May 2024 06:32:58 GMT, Ambarish Rapte wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Streamline WinTextRangeProviderTest >> >> Source: >> https://github.c

Integrated: 8330462: StringIndexOutOfBoundException when typing anything into TextField

2024-05-08 Thread Oliver Kopp
On Thu, 18 Apr 2024 12:01:52 GMT, Oliver Kopp 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 > u

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v28]

2024-05-07 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v27]

2024-05-07 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v26]

2024-05-07 Thread Oliver Kopp
On Tue, 7 May 2024 18:30:25 GMT, Kevin Rushforth wrote: >> maybe >> https://stackoverflow.com/questions/26115139/junit-ignore-or-skip-entire-test-class >> ? > > We still want to use `assumeTrue` as the pattern (for flexibility), so the > question is whether there is a better place besides a meth

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v25]

2024-05-02 Thread Oliver Kopp
On Thu, 2 May 2024 10:03:46 GMT, Ambarish Rapte wrote: > 1. The test does not compile without fix, hence it won't fail without fix > as we are only testing the newly added helper method. Yes, we could not build on existing a11y test. > 2. It is not required to change the error stream,

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v26]

2024-05-02 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v24]

2024-04-30 Thread Oliver Kopp
On Mon, 29 Apr 2024 14:10:42 GMT, Ambarish Rapte wrote: > In addition to the > [evaluation](https://bugs.openjdk.org/browse/JDK-8330462?focusedId=14666181&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14666181) > added by `@jperedadnr` to > [JDK-8330462](https:/

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v25]

2024-04-30 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v24]

2024-04-29 Thread Oliver Kopp
On Mon, 29 Apr 2024 12:35:19 GMT, Ambarish Rapte wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert using utility method > > modules/javafx.graphics/src/main/java/com/sun/glass/ui

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v24]

2024-04-29 Thread Oliver Kopp
On Mon, 29 Apr 2024 14:09:52 GMT, Ambarish Rapte wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert using utility method > > modules/javafx.graphics/src/main/java/com/sun/glass/ui

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

2024-04-26 Thread Oliver Kopp
On Fri, 26 Apr 2024 09:57:34 GMT, Ambarish Rapte wrote: >> 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 tw

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v24]

2024-04-26 Thread Oliver Kopp
> 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 `maxLeng

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

2024-04-26 Thread Oliver Kopp
On Fri, 26 Apr 2024 09:57:34 GMT, Ambarish Rapte wrote: >> 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 tw

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

2024-04-26 Thread Oliver Kopp
On Thu, 25 Apr 2024 21:41:14 GMT, Oliver Kopp 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 "

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

2024-04-26 Thread Oliver Kopp
On Thu, 25 Apr 2024 21:41:14 GMT, Oliver Kopp 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 "

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

2024-04-25 Thread Oliver Kopp
On Thu, 25 Apr 2024 21:41:14 GMT, Oliver Kopp 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 "

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

2024-04-25 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v22]

2024-04-25 Thread Oliver Kopp
On Thu, 25 Apr 2024 19:39:02 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v22]

2024-04-25 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v21]

2024-04-25 Thread Oliver Kopp
On Thu, 25 Apr 2024 18:03:17 GMT, Andy Goryachev wrote: > focus rectangle follows the windows cursor and announces the letter at the > cursor. I did not change branches, but downloaded a binary from the net. I type "abcdef" in the text field and then press cursor left - no change of the lette

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-25 Thread Oliver Kopp
On Thu, 25 Apr 2024 15:37:09 GMT, Andy Goryachev wrote: > Nope, this fix breaks Narrator. I think, I do not get what Narrator is doing. If I type "Testx" into a Text field, what should be highlighted? ![image](https://github.com/openjdk/jfx/assets/1366654/690e9331-3a92-4e4f-b6fd-a312f29cc592)

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-25 Thread Oliver Kopp
On Fri, 19 Apr 2024 17:33:39 GMT, Andy Goryachev wrote: >> I am new to testing in the JFX project. It seems that `test.` is required as >> package prefix. Thus, I did not use the approach of package-private methods >> and classes, but needed to make the class and the tested method public. >> >

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Oliver Kopp
On Wed, 24 Apr 2024 15:28:30 GMT, Ambarish Rapte wrote: > Windows Narrator reads only the last character of the Text in a TextArea, > when moving the cursor, and the focus rect does not move with cursor. I tested it with a JFX distribution without the fix. Also happens there. Can you check, to

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v15]

2024-04-24 Thread Oliver Kopp
On Wed, 24 Apr 2024 15:26:27 GMT, Kevin Rushforth wrote: >> Interesting = @kevinrushforth what do you think? > > An excellent question. If it is robust, then it seems OK. Using Junit5 > Assumptions is more flexible, though, so might lean toward wanting to use > that. Either way, test this on th

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v21]

2024-04-24 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Oliver Kopp
On Wed, 24 Apr 2024 14:35:07 GMT, Ambarish Rapte wrote: > Sorry for jumping in little late. You are jumping in at the perfect time IMHO 🎉. (We refined the fix, added working tests meanwhile). - PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2075129419

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v20]

2024-04-24 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v18]

2024-04-24 Thread Oliver Kopp
On Wed, 24 Apr 2024 07:45:50 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v19]

2024-04-24 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v16]

2024-04-24 Thread Oliver Kopp
On Tue, 23 Apr 2024 20:23:40 GMT, Andy Goryachev wrote: >> tests/system/src/test/java/test/com/sun/glass/ui/win/WinTextRangeProviderTest.java >> line 28: >> >>> 26: >>> 27: import com.sun.javafx.PlatformUtil; >>> 28: import com.sun.glass.ui.win.WinTextRangeProviderShim; >> >> this generates a

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v18]

2024-04-24 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v17]

2024-04-24 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-23 Thread Oliver Kopp
On Fri, 19 Apr 2024 17:33:39 GMT, Andy Goryachev wrote: >> I am new to testing in the JFX project. It seems that `test.` is required as >> package prefix. Thus, I did not use the approach of package-private methods >> and classes, but needed to make the class and the tested method public. >> >

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v15]

2024-04-23 Thread Oliver Kopp
On Tue, 23 Apr 2024 12:17:55 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v16]

2024-04-23 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v15]

2024-04-23 Thread Oliver Kopp
On Tue, 23 Apr 2024 12:17:55 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v15]

2024-04-23 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v14]

2024-04-23 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v13]

2024-04-20 Thread Oliver Kopp
On Sat, 20 Apr 2024 15:36:44 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v13]

2024-04-20 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v9]

2024-04-20 Thread Oliver Kopp
On Fri, 19 Apr 2024 18:41:14 GMT, Andy Goryachev wrote: > So I really have two comments: a) the code looks way too complex and b) if an > average developer (like me) cannot figure out what it does within 10 seconds, > a good comment would help. Sure thing. I applied the one "usual pattern" of

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v12]

2024-04-20 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v9]

2024-04-20 Thread Oliver Kopp
On Fri, 19 Apr 2024 17:55:12 GMT, Andy Goryachev wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix test > > modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinText

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v11]

2024-04-20 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v9]

2024-04-19 Thread Oliver Kopp
On Fri, 19 Apr 2024 17:57:09 GMT, Andy Goryachev wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix test > > modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinText

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v10]

2024-04-19 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-19 Thread Oliver Kopp
On Fri, 19 Apr 2024 17:49:45 GMT, Kevin Rushforth wrote: > I think you need to add The mentioned issue is fixed. Now, I get java.lang.UnsatisfiedLinkError: 'void com.sun.glass.ui.win.WinTextRangeProvider._initIDs()' at javafx.graphics@23-internal/com.sun.glass.ui.win.WinTextRangePro

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v9]

2024-04-19 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-19 Thread Oliver Kopp
On Fri, 19 Apr 2024 10:33:33 GMT, Oliver Kopp 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 "

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v8]

2024-04-19 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v7]

2024-04-19 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField

2024-04-19 Thread Oliver Kopp
On Fri, 19 Apr 2024 07:29:54 GMT, Johan Vos wrote: > This can easily be done with a unit test, How to create an instance of `WinTextRangeProvider` with a fake `WinAccessible`? I need `WinAccessible.getAttribute(...)`. Normally, I would have used Mockito... `WinAccessible` is `final`. -- I do n

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v6]

2024-04-18 Thread Oliver Kopp
On Thu, 18 Apr 2024 20:19:19 GMT, Oliver Kopp wrote: >> modules/javafx.graphics/src/main/java/com/sun/glass/ui/win/WinTextRangeProvider.java >> line 365: >> >>> 363: if (text == null) return null; >>> 364: validateRange(text); >>>

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v6]

2024-04-18 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v5]

2024-04-18 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v4]

2024-04-18 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v3]

2024-04-18 Thread Oliver Kopp
On Thu, 18 Apr 2024 15:10:47 GMT, Andy Goryachev wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix handling of requestedSteps < 0 > > modules/javafx.graphics/s

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v3]

2024-04-18 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v2]

2024-04-18 Thread Oliver Kopp
> 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 `maxLeng

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField

2024-04-18 Thread Oliver Kopp
On Thu, 18 Apr 2024 14:44:12 GMT, Andy Goryachev wrote: > would this fix need to be backported? how far back? Yes - JavaFX 22 would be helpful for me. `8u20-b12` was the first tag appearing with that code. -- I checked "git blame" https://github.com/openjdk/jfx/blame/master/modules/javafx.grap

Re: RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField

2024-04-18 Thread Oliver Kopp
On Thu, 18 Apr 2024 15:17:54 GMT, Kevin Rushforth wrote: > I'd like to see a test, if possible. Where can I find hints on this? I would use TestFX, fire up some minimal app and try to hit the branches of WinTextRangeProvider. However, I did not find TestFX as used. And there is no `javafx.gra

RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField

2024-04-18 Thread Oliver Kopp
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`. - Commit m