Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9523

Specify NumberUtils.parseNumber() trim behavior in the javadoc

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.5, 3.1.1
    • Fix Version/s: 5.1.4
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Prior to performing conversion, NumberUtils is removing all whitespace from input string instead of removing only leading/trailing whitespace. This results in incorrect conversions instead of expected exceptions. As an example, calling NumberUtils.parseNumber("2 3", Double.class) will result in a new Double("23").

        Attachments

          Activity

            People

            • Assignee:
              sdeleuze S├ębastien Deleuze
              Reporter:
              prohr Penny Rohr
              Last updater:
              Spring Issuemaster
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                47 weeks, 5 days ago