RFR: JDK-8290975 Minor cleanup could be done in javax.security [v2]

Sean Mullan mullan at openjdk.org
Fri Aug 5 10:13:46 UTC 2022


On Thu, 4 Aug 2022 20:21:44 GMT, Mark Powers <mpowers at openjdk.org> wrote:

>> First constructor doesn't set defaultName (or inputName), so there will be a error "might not have been initialized".
>
> I verified the error message happens when `defaultName` is final.

Yes but `defaultName` (like `prompt`) should never change once the object is constructed. So it seems inconsistent not to also mark it final (and if necessary, set it to a default value (`null`) in the constructors).

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

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



More information about the security-dev mailing list