So I’ve updated the PR to remove the generic parameter from Layout. I’ve also found the remaining classes implementing Serializable and updated them which includes several interesting things like:
* Logger (all of them) * Level * Message * MessageFactory * LogEvent * ThreadContextMap * ThreadContextStack * Some random plugins and plugin builder classes that felt like being serializable for some reason * Comparable<T> implementations (used to be suggested that these should be serializable) * The extended stack trace and throwable proxy classes There may be a few others, but that’s the main list. The only code that still references serializable at all is some JMS code that’s explicitly for serializable classes, though that could also potentially be removed. — Matt Sicker > On Jan 11, 2023, at 23:13, Matt Sicker <m...@musigma.org> wrote: > > Not really I guess? Layout already extends Encoder<LogEvent>, and the only > reasonable return value now is String since byte[] is already covered by > another method, and ByteBuffer is covered by the Encoder interface. That > could further simplify things! > — > Matt Sicker > >> On Jan 11, 2023, at 14:50, Gary Gregory <garydgreg...@gmail.com> wrote: >> >> Is the generic needed at all? >> >> Gary >> >> On Wed, Jan 11, 2023, 12:19 Matt Sicker <m...@musigma.org> wrote: >> >>> I’ve opened https://github.com/apache/logging-log4j2/pull/1199 to handle >>> this issue. The vast majority of the changes are from replacing `Layout<? >>> extends Serializable` with just `Layout<?>`. Please take a look and provide >>> any feedback. >