[slf4j-dev] [Bug 261] JDK14: Loggers are not serializable

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Tue Jun 12 15:49:25 CEST 2012


http://bugzilla.slf4j.org/show_bug.cgi?id=261

--- Comment #8 from Thorbjørn Ravn Andersen <thorbjoern at gmail.com> 2012-06-12 15:49:25 CEST ---
(In reply to comment #7)
> I would have merged from your repo had I known about it.

This bug report received no attention.  The work was done as a "Well, I need a
solution until the bug report makes it to a proper release", and would have
been reported in when this bug got attention to.


> The logger field is final because once set by JDK14LoggerAdapter's constructor,
> it can no longer be changed. (Serialization breaks this encapsulation but
> that's a Java language problem.)
> 
> The JDK14LoggerAdapter, as well as all the other logger adapters, are final
> because it seemed like the reasonable thing to do. It does not make sense
> extend an adapter...

I was unclear in my wording.  I was thinking of the JDK14LoggerAdapter. 

If you make classes final, it is impossible to alter their behaviour, e.g. in
unit tests and when debugging.  I suggest that it does not make sense to make
any classes in a library final.

-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list