mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8055251: Re-examine Integer.parseInt and Long.parseLong methods
Reviewed-by: alanb
This commit is contained in:
parent
d04d69fea6
commit
1dc4b5e2f8
9 changed files with 147 additions and 309 deletions
|
@ -358,7 +358,7 @@ public final class Period
|
|||
if (start < 0 || end < 0) {
|
||||
return 0;
|
||||
}
|
||||
int val = Integer.parseInt(text, 10, start, end);
|
||||
int val = Integer.parseInt(text, start, end, 10);
|
||||
try {
|
||||
return Math.multiplyExact(val, negate);
|
||||
} catch (ArithmeticException ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue