RFR: 8255248: NullPointerException in JFXPanel due to race condition in HostContainer [v2]

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Jul 20 10:12:10 UTC 2023


On Thu, 20 Jul 2023 09:17:37 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add lock for read/write of scenePeer/stagePeer and added system test
>
> modules/javafx.swing/src/main/java/javafx/embed/swing/JFXPanel.java line 428:
> 
>> 426:     private void sendMouseEventToFX(MouseEvent e) {
>> 427:         EmbeddedSceneInterface lScenePeer = getScenePeer();
>> 428:         if (lScenePeer == null || !isFxEnabled()) {
> 
> Probably minor, but maybe we should first check `!isFxEnabled()` and return fast before we actually call `getScenePeer()` and thus locking it

ok..sure..

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1178#discussion_r1269243271


More information about the openjfx-dev mailing list