Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3196

NumberConverter does not observe NumberFormat's parsePosition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.7
    • 2.3-next-M3
    • General
    • None

    Description

      When parsing numbers with java.text.NumberFormat, it is important to observe the ParsePosition.

      If, after parsing a number, the parsePosition is less than the length of the input string, this actually means there was a problem. Example:

      With grouping disabled, the String "0,23" is parsed to 0, and the parsePosition is set to 1. This should be considered as a parsing error.

      Attachments

        1. NumberConverter.patch
          5 kB
          Michael Heinen

        Activity

          People

            tandraschko Thomas Andraschko
            batzee Bastian Voigt
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: