On Wed, 6 Nov 2024 13:43:51 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> Andy Goryachev has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 52 commits: >> >> - readme >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - review comments >> - input map >> - validate model >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - javadoc >> - Merge remote-tracking branch 'origin/master' into 8301121.RichTextArea >> - review comments >> - measurement node >> - ... and 42 more: https://git.openjdk.org/jfx/compare/bd4bc057...a51ae151 > > modules/jfx.incubator.input/src/main/java/com/sun/jfx/incubator/scene/control/input/PHList.java > line 72: > >> 70: if (handler != null) { >> 71: insert(++ix, handler); >> 72: } > > Is it necessary to store the priority when the handler is `null`. > Will it be safe to simply return at beginning of the method when `handler == > null` ? yes, it's important to store the priority. this is an implementation detail > modules/jfx.incubator.input/src/main/java/com/sun/jfx/incubator/scene/control/input/PHList.java > line 74: > >> 72: } >> 73: } else { >> 74: insert(ix, handler); > > Is `if (handler != null)` check required here as well? yes. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1833505720 PR Review Comment: https://git.openjdk.org/jfx/pull/1524#discussion_r1833505774