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 "fixed" >> by using `Math.max` compa

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 `maxLength + start`. Oliver Kopp h

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 `maxLength + start`. Oliver Kopp h

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/WinTextRangeProvider.java > line 116: > >> 1

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 `maxLength + start`. Oliver Kopp h

Re: Possible leak on setOnAction

2024-04-20 Thread Thiago Milczarek Sayão
Yeah, I've been doing some investigating. Using the below example, when the "Refresh Menu" button is clicked, it will replace the items making the old one collectable by the GC. If the Menu was never used/drop down shown, it will get collected. If it was used (just shown), it remains in memory (se

Re: [jfx17u] RFR: 8330682: Change JavaFX release version to 17.0.12 in jfx17u

2024-04-20 Thread Jose Pereda
On Fri, 19 Apr 2024 13:32:14 GMT, Johan Vos wrote: > Increase JavaFX release version to 17.0.12 Marked as reviewed by jpereda (Reviewer). - PR Review: https://git.openjdk.org/jfx17u/pull/189#pullrequestreview-2013084899

[jfx21u] Integrated: 8330683: Change JavaFX release version to 21.0.4 in jfx21u

2024-04-20 Thread Johan Vos
On Fri, 19 Apr 2024 13:29:07 GMT, Johan Vos wrote: > Increase JavaFX release version This pull request has now been integrated. Changeset: 9a5ff29a Author:Johan Vos URL: https://git.openjdk.org/jfx21u/commit/9a5ff29ac8f7906280912fbff2a5f5cc4fba999f Stats: 2 lines in 2 files chan

Re: Possible leak on setOnAction

2024-04-20 Thread John Hendrikx
I think this code is bug free, and the added fix shouldn't be needed -- the old MenuItems should be cleaned up, and so should the referenced Stages. So I think the bug is elsewhere, maybe not even in your code at all. I did see PR's dealing with how MenuItems are linked to their platform speci