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

Array-of-null parameters are converted to string "null"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.12
    • Fix Version/s: 2.5.13
    • Component/s: Core
    • Labels:
      None

      Description

      The com.opensymphony.xwork2.conversion.impl.StringConverter class, since Struts 2.5.11, incorrectly handles arrays containing null; it converts them to arrays containing the string "null" (using String.valueOf).

      This is breaking one of our applications; some pages are OK, but on other pages, every non-provided field is populated with the String "null".

      This is a similar issue to WW-4737, but occurring in different code.

      Please ensure that conversion to String always uses the two-argument version of Objects.toString, which preserves nulls, rather than String.valueOf, which converts them to the four-letter string "null".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lukaszlenart Lukasz Lenart
                Reporter:
                thrawnca Mitth'raw'nuruodo
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: