mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix(NumberUtil): parseInt逻辑先后修改
- https://gitee.com/dromara/hutool/issues/I800C9 - 十六进制中E被误判为科学技术法,修改判断先后处理
This commit is contained in:
@@ -273,8 +273,8 @@ public class NumberUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseIntTest() {
|
||||
int number = NumberUtil.parseInt("0xFF");
|
||||
Assert.assertEquals(255, number);
|
||||
int number = NumberUtil.parseInt("0xFE");
|
||||
Assert.assertEquals(254, number);
|
||||
|
||||
// 0开头
|
||||
number = NumberUtil.parseInt("010");
|
||||
|
Reference in New Issue
Block a user