ppkarwasz opened a new pull request, #1906:
URL: https://github.com/apache/logging-log4j2/pull/1906
Although every `Message` class should be serializable, some common message
classes are not:
* `ParameterizedMessage`,
* `ReusableObjectMessage`,
* `ReusableSimpleMessage`,
* `ReusableParameterizedMessage`.
Since many of these classes can have fields of arbitrary types:
1. We harden the serialization process by requiring the usage of our
`FilteredObjectInputStream` on JRE 8 and by applying filters to
`ObjectInputStream` on JRE 9+. The serialization process is identical to what
is already done in `SortedArrayStringMap`.
2. We add serialization to `ParameterizedMessage`. If a parameter is not
`Serializable`, it is serialized as `String`.
3. We add serialization to the reusable messages by calling `memento()` and
serializing their immutable counterparts
This change solves many serialization bugs detected by Spotbugs (#1849) and
is related to #1884.
This PR introduces the new Java 8 package
`org.apache.logging.log4j.util.internal`. This package already existed in
`log4j-api-java9`, but was not detected by BND. By introducing it in
`log4j-api` too, this should also help solving #1896.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]