RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null

Tejesh R tr at openjdk.org
Tue Sep 6 06:36:05 UTC 2022


On Fri, 26 Aug 2022 04:47:08 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> Default echo character obtained through `PasswordField.echoChar` UIProperty returns null for Nimbus L&F,
> which is fixed by adding the default character * in the UIDefault table.

test/jdk/javax/swing/plaf/nimbus/PasswordFieldTest.java line 56:

> 54:             if (UIManager.get("PasswordField.echoChar") == null) {
> 55:                 throw new RuntimeException(
> 56:                     "PasswordField.echoChar returns null for NimbusL&F");

Hardcoding of NimbusL&F for exception string can be replaced with L&F name. Since the traversal is happening for all L&F, expecting only Nimbus might not be right I guess.

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

PR: https://git.openjdk.org/jdk/pull/10035



More information about the client-libs-dev mailing list