RFR: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Wed Sep 28 03:42:39 UTC 2022
On Tue, 27 Sep 2022 17:57:13 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Honour PasswordField.echoChar property
>
> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java line 77:
>
>> 75: LookAndFeel.installProperty(getComponent(), "echoChar", echoChar);
>> 76: }
>> 77: }
>
> This is a public API class, it should provide a Javadoc, the text copied from `BasicPasswordFieldUI.installDefaults` which does the same thing should be enough.
>
> I agree with @turbanoff, let's add a space after `if`.
>
> Let's also add `@Override` annotation which are used on the methods above and below at the very least.
done
> 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");
>
> I agree with @TejeshR13, including the L&F name in the exception message would make the message more specific without opening the log for the test.
ok
-------------
PR: https://git.openjdk.org/jdk/pull/10035
More information about the client-libs-dev
mailing list