A DESCRIPTION OF THE REQUEST :
When calling Integer.parseInt(String) with the string "+", a FormatNumberException is not thrown.
JUSTIFICATION :
Just as Integer.parseInt(String) throws a FormatNumberException if string is just "-", shouldn't the same behaviour be expected if string is just "+".
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I think that a FormatNumberException should be thrown if the string is just "+".
ACTUAL -
No FormatNumberException is thrown if the string is just "+".
When calling Integer.parseInt(String) with the string "+", a FormatNumberException is not thrown.
JUSTIFICATION :
Just as Integer.parseInt(String) throws a FormatNumberException if string is just "-", shouldn't the same behaviour be expected if string is just "+".
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I think that a FormatNumberException should be thrown if the string is just "+".
ACTUAL -
No FormatNumberException is thrown if the string is just "+".
- relates to
-
JDK-5017980 Allow signed positive integer to be parsed instead of a NumerFormatException
-
- Closed
-