[logback-dev] [qos-ch/logback] ed2d5d: marked SocketAppender convenience constructors as ...

Carl Harris ceharris at vt.edu
Sat Apr 27 16:24:27 CEST 2013


  Branch: refs/heads/master
  Home:   https://github.com/qos-ch/logback
  Commit: ed2d5d00d3f583829fbabe7794780ee82b24e4f1
      https://github.com/qos-ch/logback/commit/ed2d5d00d3f583829fbabe7794780ee82b24e4f1
  Author: Carl Harris <ceharris at vt.edu>
  Date:   2013-04-27 (Sat, 27 Apr 2013)

  Changed paths:
    M logback-classic/src/main/java/ch/qos/logback/classic/net/SocketAppender.java

  Log Message:
  -----------
  marked SocketAppender convenience constructors as deprecated

Convenience constructors that are used to set mutable fields that have
proper accessors add little value, and they make it more complicated to
subclass.  Best practice is to use constructor arguments only to
initialize fields that are immutable or for which an accessor method
cannot be safely provided within the design constraints of the class.

The only use of these constructors by logback modules is in the
SocketMin class.  However, because these constructors were exposed as
API (public modifier) there is a chance that other code is using them,
therefore marking them as deprecated rather than removing them.





More information about the logback-dev mailing list