On Mon, 26 May 2025 16:51:11 GMT, Jeremy Wood <d...@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: Update copyright year Marked as reviewed by tr (Reviewer). src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java line 651: > 649: TransferHandler.getPasteAction()); > 650: > 651: if (getComponent() instanceof JPasswordField) { Since the fix has been made in Basic, we should not restrict the test to Aqua L&F alone. It should be tested for all L&F. (For fix and for regression) ------------- PR Review: https://git.openjdk.org/jdk/pull/25443#pullrequestreview-2880804268 PR Review Comment: https://git.openjdk.org/jdk/pull/25443#discussion_r2115555622