Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-964

StringFormattedMessage serialization is incorrect

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: API
    • Labels:
      None

      Description

      The method writeObject(final ObjectOutputStream out) of the class org.apache.logging.log4j.message.StringFormattedMessage does not write the stringArgs array into the output stream. This causes readObject(final ObjectInputStream in) to throw an EOFException when trying to deserialize.

      There is another bug in the same method. The line stringArgs[i] = obj.toString(); throws a NullPointerException when obj is null.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jjyryla Jonne Jyrylä
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: