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

RepopulateConversionErrorFieldValidatorSupport logs a warning when repopulating fields without conversion errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.1.8
    • None
    • None
    • Tomcat 6.0.18 on CentOS 4

    Description

      In RepopulateConversionErrorFieldValidatorSupport at line 176 (in the 2.1.2 version at least), a warning is logged on any field that does not have a conversion error.

      The call to "conversionErrors.get(fullFieldName)" returns null when there was no errors, and therefore the result of that call fails to match the instanceof checks, falling through to the else clause and logging the error.

      There should be no log message when there is no conversion error as the repopulate function has nothing it needs to do in that case. I would suggest a "conversionErrors.contains(fullFieldName)" prior to doing anything in that method. Or, change the validate() method to test for that before calling the repopulateField() method.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lucasn Lucas Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: