Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-661

NumberFormatException not getting caught

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None

      Description

      This is against 2.0.0-RELEASE

      With the new model auto binding/validation, as it is right now, it is impossible to handle a String->Number typeMismatch, as the NumberFormatException is never handled, bypassing any binding handling you might have. I have temporarily fixed this by creating a wrapping formatterregistry which catches the NumberFormatException and rethrows as an InvalidFormatException.

      The correct solution would be to actually catch NumberFormatException and rethrowing it as an InvalidFormatException.

        Attachments

          Activity

            People

            Assignee:
            kdonald Keith Donald
            Reporter:
            vsalaman Victor Salaman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: