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

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

Daniel Skovenborg created LOG4J2-2616:
-----------------------------------------

             Summary: 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.11.2, 2.8.2
            Reporter: Daniel Skovenborg


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 excpetions.



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