RFR: JDK-8290975 Minor cleanup could be done in javax.security
Bradford Wetmore
wetmore at openjdk.org
Thu Aug 4 17:19:12 UTC 2022
On Wed, 3 Aug 2022 14:49:25 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> https://bugs.openjdk.org/browse/JDK-8290975
>
> src/java.base/share/classes/javax/security/auth/callback/NameCallback.java line 45:
>
>> 43: * @since 1.4
>> 44: */
>> 45: private final String prompt;
>
> I think you can also mark `defaultName` final.
First constructor doesn't set defaultName (or inputName), so there will be a error "might not have been initialized".
> src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java line 46:
>
>> 44: * @since 1.4
>> 45: */
>> 46: private final String prompt;
>
> I think you can also mark `defaultText` final.
Same as above.
-------------
PR: https://git.openjdk.org/jdk/pull/9664
More information about the security-dev
mailing list