Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2374

FormBean support simple type Formats like 'int' and 'long' handled incorrectly - at least attempt a trim()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.2.4
    • 1.2.5
    • Unknown
    • None
    • Operating System: Windows 2000
      Platform: PC
    • 33630

    Description

      A FormBean containing properties of type 'int' or 'long' are incorrectly parsed
      or handled.

      If a jsp page contains a text field mapped to the formbean int property and the
      user enters a string (e.g. "AB"), struts tries to convert this value to an int,
      fails and then puts in the default value.

      This leads to incorrect handling of data.

      Instead, an error or exception should be thrown to indicate that the value is
      not of type int or long.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thomas.hentrich@atosorigin.com Thomas Hentrich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: