RFR: 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text [v5]

Jeremy Wood duke at openjdk.org
Mon Jun 2 17:28:55 UTC 2025


On Mon, 2 Jun 2025 09:52:04 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Does the accompanying testcase fails in Synth/Nimbus L&F, it seems not?

No. I double-checked:
A. If I explicitly set the L&F to Nimbus: this test does fail in this PR, and it does not fail in master.
B. The SynthPasswordFieldUI descends from BasicTextUI, so it should not be impacted by this PR.

... and in reviewing the SynthPasswordFieldUI I found the same code (copied & pasted) from BasicPasswordFieldUI. I removed that, because with this PR it should not be necessary. (And I did NOT find other instances of the same code copied and pasted anywhere else.)

> Also, it will be useful to extend the test case to test all installed L&F since it it changing Basic L&F code?

I'm not sure what you're asking here.

I tweaked the test so it aborts if it is NOT interacting with a BasicTextUI. (Off the top of my head I don't know of any JPasswordField UI's that don't subclass BasicTextUI, but they might exist somewhere.)

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

PR Comment: https://git.openjdk.org/jdk/pull/25443#issuecomment-2931693256


More information about the client-libs-dev mailing list