Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4837

StringConverter adds a decimal place to integers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.5.12
    • None
    • Core
    • None

    Description

      Commit 229afea64e77c2dba9eec62b2c339e9fc92c9ec7 caused all inputs recognisable as numbers to be formatted with at least one decimal place. This includes all integers, which is frequently undesirable, particularly if they were meant to be, eg:

      • identifiers, not for arithmetic;
      • strictly validated against an XML schema that does not allow for floating-point numbers;
      • subject to length limitations;
      • etc

      This apparently occurs because all inputs that look like numbers, regardless of format, are of type BigDecimal by the time they reach the StringConverter.

      For our applications, this is a blocker; is it working differently for others? We don't have any special handling of input types.

      Attachments

        1. 2017-08-08_1045.png
          389 kB
          Lukasz Lenart

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thrawnca Mitth'raw'nuruodo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: