mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix bug
This commit is contained in:
parent
8af31805a3
commit
2b4f70f88d
@ -3,7 +3,7 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.7.18 (2021-12-17)
|
||||
# 5.7.18 (2021-12-20)
|
||||
|
||||
### 🐣新特性
|
||||
* 【core 】 新增CollStreamUtil.groupKeyValue(pr#479@Gitee)
|
||||
@ -18,6 +18,7 @@
|
||||
* 【core 】 修复CharSequenceUtil.replace问题(issue#I4M16G@Gitee)
|
||||
* 【json 】 修复JSONObject 初始化大小值未被使用问题(issue#2016@Github)
|
||||
* 【core 】 修复StrUtil.startWith都为null返回错误问题(issue#I4MV7Q@Gitee)
|
||||
* 【core 】 修复PasswdStrength检测问题(issue#I4N48X@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.7.17 (2021-12-09)
|
||||
|
@ -159,7 +159,7 @@ public class PasswdStrength {
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.isNumeric(passwd) && len >= 6) { // 19881010 or 881010
|
||||
if (StrUtil.isNumeric(passwd) && len >= 6 && len <= 8) { // 19881010 or 881010
|
||||
int year = 0;
|
||||
if (len == 8 || len == 6) {
|
||||
year = Integer.parseInt(passwd.substring(0, len - 4));
|
||||
|
@ -9,4 +9,10 @@ public class PasswdStrengthTest {
|
||||
String passwd = "2hAj5#mne-ix.86H";
|
||||
Assert.assertEquals(13, PasswdStrength.check(passwd));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void strengthNumberTest(){
|
||||
String passwd = "9999999999999";
|
||||
Assert.assertEquals(0, PasswdStrength.check(passwd));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user