RFR: 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text [v6]
Jeremy Wood
duke at openjdk.org
Mon Jun 2 16:57:14 UTC 2025
> 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 two additional commits since the last revision:
- 8354646: remove redundant code in SynthPasswordFieldUI
This is partially in response to:
https://github.com/openjdk/jdk/pull/25443#issuecomment-2929752779
- 8354646: skip test for unexpected text field UI's
Also I confirmed this test passes for Nimbus
This is partially in response to:
https://github.com/openjdk/jdk/pull/25443#issuecomment-2929752779
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25443/files
- new: https://git.openjdk.org/jdk/pull/25443/files/fe1b781c..0c299471
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25443&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25443&range=04-05
Stats: 21 lines in 2 files changed: 6 ins; 15 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/25443.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25443/head:pull/25443
PR: https://git.openjdk.org/jdk/pull/25443
More information about the client-libs-dev
mailing list