Scala Programming Language
  1. Scala Programming Language
  2. SI-5032

StringLike.parseBoolean throws a NumberFormatException if the parsed String is malformed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.1
    • Fix Version/s: None
    • Component/s: Misc Library
    • Labels:
      None

      Description

      StringLike.parseBoolean (and hence StringOps.toBoolean) throws a NumberFormatException if the String is not a valid boolean. This makes no sense - should probably be an IllegalArgumentException instead

        Activity

        Hide
        Commit Message Bot added a comment -

        (extempore in r25822) Throw different exception.

        Booleans aren't numbers. Closes SI-5032, no review.

        Show
        Commit Message Bot added a comment - (extempore in r25822 ) Throw different exception. Booleans aren't numbers. Closes SI-5032 , no review.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Chris Marshall
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development