On Wed, 10 Dec 2025 17:56:22 GMT, Phil Race <[email protected]> wrote:

> This change worries me. How was it tested ? I see MANY places (dozens and 
> dozens) that Swing internally passes null to these calls. The behaviour of 
> these is now changed. @prsadhuk please explain how this is a safe change and 
> if you examined all of the usages of this with null ?

In all cases, Swing passes null to these calls in `uninstallKeyboardActions` 
during `uninstallUI` that is, during L&F change and it doesn't check if the map 
is removed or not, even though spec mandates it should. It would have seen the 
issue if uninstall* APIs  had tried to use the same map
 but map is reloaded and replaced by calling these methods in `installUI` so it 
was never problematic.
I dont know why this spec violation is never caught, apart from this bug, even 
by JCK test.

I have tested with all clientlibs test in CI along with SwingSet2 with L&F 
change and keyboard navigation works ok.

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

PR Comment: https://git.openjdk.org/jdk/pull/28671#issuecomment-3640036120

Reply via email to