RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v7]
Andy Goryachev
angorya at openjdk.org
Thu Aug 31 19:49:08 UTC 2023
On Wed, 30 Aug 2023 06:49:52 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Due to transient datatype of scenePeer, it can become null which can result in NPE in scenarios where scene is continuously been reset and set, which warrants a null check, as is done in other places for the same variable.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Add nullcheck for sceneState
overall looks good - the new LOCK'ing logic seems well designed.
added some minor suggestions - I hope my comments are still there after I accidentally clicked on 'Cancel Review'...
modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 153:
> 151: private final Object LOCK = new Object();
> 152:
> 153: // Accessed on EDT only
is this comment valid anymore?
perhaps we should mention the fact that access to these fields should be LOCK'ed instead?
-------------
PR Review: https://git.openjdk.org/jfx/pull/1178#pullrequestreview-1605595112
PR Review Comment: https://git.openjdk.org/jfx/pull/1178#discussion_r1312147056
More information about the openjfx-dev
mailing list