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]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Mon Jun 2 09:54:53 UTC 2025
On Fri, 30 May 2025 17:13:24 GMT, Jeremy Wood <duke at openjdk.org> wrote:
>> Make sure AquaTextPasswordFieldUI can't use selectWordAction.
>>
>> The core problem here was we could call selectWordAction in the Aqua LAF on a JPasswordField. This problem was already solved in the BasicPasswordFieldUI, but the AquaTextPasswordFieldUI (and SynthPasswordFieldUI) do NOT extend the BasicPasswordFieldUI, so they weren't inheriting this solution.
>>
>> So the problem is partially about multiple inheritance.
>>
>> My first response at solving the problem is just to move the existing solution to the parent BasicTextUI class and use an instanceof to make sure it is only applied to JPasswordFields.
>>
>> There may be many different philosophies/recommendations on how to resolve this; I'm open to suggestions.
>
> Jeremy Wood has updated the pull request incrementally with one additional commit since the last revision:
>
> 8354646: fixing typo in summary
> but the AquaTextPasswordFieldUI (and SynthPasswordFieldUI) do NOT extend the BasicPasswordFieldUI, so they weren't inheriting this solution.
Does the accompanying testcase fails in Synth/Nimbus L&F, it seems not?
Also, it will be useful to extend the test case to test all installed L&F since it it changing Basic L&F code?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25443#issuecomment-2929752779
More information about the client-libs-dev
mailing list