Integer.parseInt(String) should not accept just '+'

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 7
    • Affects Version/s: 6
    • Component/s: core-libs
    • b17
    • x86
    • linux
    • Not verified

      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 "+".

            Assignee:
            Joe Darcy
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: