You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Volkan Yazıcı <vo...@gmail.com> on 2021/05/29 11:20:19 UTC

[LOG4J2-3100] log4j2 lots of final class, forbid extend class, why log4j allow extend class but log4j2 not?

I have shared my personal take on this issue in the ticket. Please comment
on the ticket if you have any other remarks.

On Sat, May 29, 2021 at 1:17 PM Volkan Yazici (Jira) <ji...@apache.org>
wrote:

>
>     [
> https://issues.apache.org/jira/browse/LOG4J2-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17353709#comment-17353709
> ]
>
> Volkan Yazici commented on LOG4J2-3100:
> ---------------------------------------
>
> _[Below are my personal opinions and do not reflect a general consensus or
> anything resembling that for the rest of the project maintainers.]_
>
> Many developers (including myself) prefer conservative APIs to the more
> relaxed ones due to backward compatibility burden the former introduces.
> Also note that you can still reuse these classes you have mentioned, though
> you cannot just extend them. This also encourages the users for
> [composition over inheritance|
> https://en.wikipedia.org/wiki/Composition_over_inheritance#:~:text=Composition%20over%20inheritance%20(or%20composite,than%20inheritance%20from%20a%20base],
> which is a recommended practice in OOP. I hope this answers your question.
>
> I see that you have set the ticket {{Type}} to {{Bug}} and {{Priority}} to
> {{Blocker}}. Assuming this was a deliberate decision, why is this a
> _blocker bug_ for you? Otherwise, I kindly ask you to close the ticket if
> my answer suffices your question.
>
> > log4j2 lots of final class,  forbid extend class,  why log4j allow
> extend class but log4j2 not?
> >
> -----------------------------------------------------------------------------------------------
> >
> >                 Key: LOG4J2-3100
> >                 URL: https://issues.apache.org/jira/browse/LOG4J2-3100
> >             Project: Log4j 2
> >          Issue Type: Bug
> >            Reporter: hzwwe
> >            Priority: Blocker
> >
> > RollingFileAppender
> > PatternLayout
> > etc....
> > all are final class
>
>
>
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)
>