On Wed, 25 Jun 2025 03:14:33 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

> I dont think its a product bug since the L&F was not propagated to all nodes 
> of the Swing components after L&F change so it should be a test issue which 
> was solved.

I didn't say it was a product bug, it is rather a product *feature*: multiple 
L&Fs at the same time aren't really supported, have never been.

As I said above, the problem wasn't that the L&F wasn't propagated to all nodes 
of the Swing components. The problem is and was that the current L&F doesn't 
match the L&F with which a component was created.

> Rewriting the test, if needed, could be done as part of new issue but this 
> one fixes the issue and let manual testing team run the test in all L&F

Why not now? We have a bug in the test, your fix doesn't fix the fundamental 
problem with the test, but rather tweaks the test so that the problem isn't 
visible any more.

> > I commented out the line UIManager.setLookAndFeel(save), the Windows menu 
> > looks good but clicking the Metal menu now throws NPE:
> 
> I couldn't reproduce this problem with the current PR..What L&F you started 
> the test with? I tested the test with Metal/Windows/Nimbus from the 
> commandline and couldn't find any issue.

Nimbus, as specified in the command line in the bug description:

`-vmoption:-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel`

You can't reproduce NPE if there's a call to 
`SwingUtilities.updateComponentTreeUI(frame)` because it updates the L&F of the 
top-level menu items, those that are on the menu bar.

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

PR Comment: https://git.openjdk.org/jdk/pull/25907#issuecomment-3004059997

Reply via email to