RFR: 7820: Add validations for master password [v2]

Henrik Dafgård hdafgard at openjdk.org
Sun Jul 24 00:29:13 UTC 2022


On Wed, 20 Jul 2022 20:18:36 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added Junit test cases and moved the logic to common util file
>
> application/org.openjdk.jmc.ui.common/src/main/java/org/openjdk/jmc/ui/common/security/PersistentCredentials.java line 86:
> 
>> 84: 
>> 85: 	public static boolean isPasswordValid(final String password) {
>> 86: 		Pattern PASSWORD_PATTERN = Pattern
> 
> Maybe you want to have PASSWORD_PATTERN as a static field with lazy initialization?

Or just initialized on class load, but it should not be done for each password comparison.

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

PR: https://git.openjdk.org/jmc/pull/406


More information about the jmc-dev mailing list