Thanks for the clarification. Changes are fine. Thanks, Jay
> On 04-Oct-2019, at 3:19 AM, Sergey Bylokhov <sergey.bylok...@oracle.com> > wrote: > > Hi, Jay. >> I think we should drive device update through >> GraphicsEnvironment.displayChanged() and DisplayChangeListener instead of >> force updating bounds in GraphicsDevice.displayChanged in the constructor. >> We can synchronise the GraphicsEnvironment.displayChanged() by calling it >> under CGraphicsEnvironment.initDevices() sync lock, this will force call >> DisplayChangeListener when devices are updated. > > Unfortunately, we cannot move the "displayChanged()" method under the lock, > because this method will notify all DisplayChangedListener which might use > some > other locks, so we will have GraphicsEnvironment.sync->SomeOther locks order, > and at the same time, some other thread may acquired SomeOther lock and tried > to > call CGraphicsEnvironment.getScreenDevices(), so we will get > SomeOther->CGraphicsEnvironment.sync and this will cause a deadlock. > > > -- > Best regards, Sergey.