You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to parse invalid strings using BigInteger::parseString it often parses the string successfully
into a numeric value while java's BigInteger throws NumberFormatException
To Reproduce
Steps to reproduce the behavior:
Invoke BigInteger.parseString("a") or BigInteger.parseString("a", 10) both return "10" same as if we invoke BigInteger.parseString("a", 16)
Expected behavior
Java's BigInteger throws NumberFormatException for java.math.BigInteger("a") but parses successfully for java.math.BigInteger("a", 16)
Platform
JVM
Additional context
Might be relevant for more use-cases of invalid string values.
Might be worth to verify for parsing invalid strings with BigDecimal.
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to parse invalid strings using
BigInteger::parseString
it often parses the string successfullyinto a numeric value while java's BigInteger throws
NumberFormatException
To Reproduce
Steps to reproduce the behavior:
Invoke
BigInteger.parseString("a")
orBigInteger.parseString("a", 10)
both return "10" same as if we invokeBigInteger.parseString("a", 16)
Expected behavior
Java's BigInteger throws NumberFormatException for
java.math.BigInteger("a")
but parses successfully forjava.math.BigInteger("a", 16)
Platform
Additional context
Might be relevant for more use-cases of invalid string values.
Might be worth to verify for parsing invalid strings with BigDecimal.
The text was updated successfully, but these errors were encountered: