You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2019/06/23 04:14:00 UTC

[jira] [Commented] (LOG4J2-2616) Backward compatibility with third party subclasses is broken by added constructor argument in ThrowablePatternConverter

    [ https://issues.apache.org/jira/browse/LOG4J2-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16870434#comment-16870434 ] 

Ralph Goers commented on LOG4J2-2616:
-------------------------------------

Just to point out the obvious, 2.8.2 was 6 releases ago and was released 2 years ago so this incompatibility break has existed for a while. Not that this shouldn't be fixed but I would have thought it would have been reported much sooner if it was causing a lot of problems.

> Backward compatibility with third party subclasses is broken by added constructor argument in ThrowablePatternConverter
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2616
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2616
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.8.2, 2.11.2
>            Reporter: Daniel Skovenborg
>            Priority: Minor
>
> In 2.8.2 a new argument, config, was [added to the ThrowablePatternConverter constructor|https://github.com/apache/logging-log4j2/commit/0146bbae4a94aee9e92e1ba843f0125075debfdc#diff-e4ffc325dbf1d6164a8eb8130f52411eR57] without adding a constructor with the original signature specifying a default value. This breaks backwards compatibility with third party subclasses. If no external subclassing was intended, the constructor should have been made package private instead of protected.
> This is not just a theoretical problem. For example, it is annoying when using Spring Boot and wanting to use a newer Log4j2 than the default 2.7 because Spring Boot has its own ExtendedWhitespaceThrowablePatternConverter. The system does not crash but the log gets some NoSuchMethodError exceptions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)