On Mon, 5 Sep 2022 12:45:53 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> NPE is thrown for closed/disposed JDialogs after uninstalling the UI which is 
> because for SynthEditorPaneUI even though is disposed of, Nimbus 
> propertyHandler tries to get the style of this disposed component resulting 
> in NPE, 
> which is fixed by a null check to prevent deferencing style object to get the 
> color.

test/jdk/javax/swing/plaf/synth/RepaintNPE.java line 84:

> 82:                     try
> 83:                     {
> 84:                         Method method = jComp.getClass().getMethod ( 
> "getUI" );

The getUI() method is public, can be used directly.

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

PR: https://git.openjdk.org/jdk/pull/10167

Reply via email to