Integrated: 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text
Jeremy Wood
duke at openjdk.org
Thu Jun 12 16:14:53 UTC 2025
On Mon, 26 May 2025 08:32:26 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 . The same solution was copied and pasted into the SynthPasswordFieldUI . But the AquaTextPasswordFieldUI does NOT extend either class with the 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. This should benefit all the PasswordFieldUI's (that I know about).
>
> There may be many different philosophies/recommendations on how to resolve this; I'm open to suggestions.
This pull request has now been integrated.
Changeset: 8d33ea73
Author: jeremy <jeremy.wood at mac.com>
Committer: Alexander Zuev <kizune at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/8d33ea7395e5dd504b899d8972617f6696546d84
Stats: 149 lines in 5 files changed: 110 ins; 34 del; 5 mod
8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text
Reviewed-by: aivanov, kizune, tr, psadhukhan
-------------
PR: https://git.openjdk.org/jdk/pull/25443
More information about the client-libs-dev
mailing list