Home | History | Annotate | Download | only in pages
      1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 
      5 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
      6 <title>Compatibility report</title>
      7 <link rel="stylesheet" type="text/css" media="screen" href="css/site.css" />
      8 </head>
      9 <body>
     10 	<script>
     11 prefix='';	
     12 </script>
     13 
     14 <script src="templates/header.js"></script>
     15 <div id="left">
     16   <script src="templates/left.js"></script>
     17 </div>
     18 <div id="right">
     19   <script src="templates/right.js"></script>
     20 </div>
     21 <div id="content">
     22 
     23 
     24   <h1>Compatibility report</h1>
     25 
     26   <p>Given the very large user base of SLF4J, we take backward
     27   compatibility very seriously. As such, changes that may cause
     28   incompatibility problems are listed in this page. Moreover, since
     29   slf4j-api.jar is the main entry point into SLF4J, that is the module
     30   that will be covered in most detail.
     31   </p>
     32 
     33   <p>Please note that in many cases incompatibility problems are
     34   caused by mixing different versions of slf4j artifacts. For example,
     35   if you are using slf4j-api-1.5.4.jar you should also use
     36   slf4j-simple-1.5.4.jar, using slf4j-simple-1.4.2.jar will not
     37   work. The same goes for all other SLF4J artifacts.
     38   </p>
     39 
     40   <p>The list is computed using <a
     41   href="http://clirr.sourceforge.net/">clirr</a>. If you have reasons
     42   to suspect incompatible changes not mentioned here, please kindly
     43   contact the slf4j developers list.</p>
     44 
     45   <h2><a href="#1_5_7" name="1_5_6">Version 1.5.7 compared to 1.5.6</a></h2>
     46 
     47   <p>No breaking changes to report.</p>
     48 
     49   <h2><a href="#1_5_6" name="1_5_5">Version 1.5.6 compared to 1.5.5</a></h2>
     50 
     51 
     52   <table class="bodyTable">
     53     <tr>
     54       <th>Severity</th>
     55       <th>Description</th>
     56       <th>Class</th>
     57       <th>Method / Field</th>
     58     </tr>
     59     <tr>
     60       <td>Error</td>
     61       <td>The&nbsp;number&nbsp;of&nbsp;parameters&nbsp;of SubstituteLoggerFactory
     62       constructor has changed</td>
     63       <td>org.slf4j.helpers.SubstituteLoggerFactory</td>
     64       <td>public SubstituteLoggerFactory(java.util.List)</td>
     65     </tr>
     66   </table>
     67 
     68   <p>&nbsp;</p>
     69 
     70   <p>The <code>SubstituteLoggerFactory</code> class is used internally
     71   by the LoggerFactory class. Changes to the constructor of
     72   SubstituteLoggerFactory should have strictly no effect on users.
     73   </p>
     74 
     75   <h2><a href="#1_5_5" name="1_5_4">Version 1.5.5 compared to 1.5.4</a></h2>
     76   
     77   <p>No breaking changes to report.</p>     
     78 
     79   <h2><a href="#1_5_4" name="1_5_4">Version 1.5.4 compared to 1.5.3</a></h2>
     80 
     81   <h3>slf4j-api module, list of breaking changes:</h3>
     82   
     83 
     84   <table class="bodyTable">
     85     <tr>
     86       <th>Severity</th>
     87       <th>Description</th>
     88       <th>Class</th>
     89       <th>Method / Field</th>
     90     </tr>
     91     <tr>
     92       <td>Error</td>
     93       <td>Method 'hasReferences()' has been added to an interface</td>
     94       <td>org.slf4j.Marker</td>
     95       <td>public boolean hasReferences()</td>
     96     </tr>
     97     <tr class="alt">
     98       <td>Info</td>
     99       <td>Method 'hasChildren()' was deprecated</td>
    100       <td>org.slf4j.Marker</td>
    101       <td>public boolean hasChildren()</td>
    102     </tr>
    103 
    104   </table>
    105 
    106   <p>&nbsp;</p>
    107 
    108   <p>The <code>hasChildren()</code> and other documentation in the
    109   Marker interface was misleading users to think in terms of parent
    110   child relationship for markers. However, as <a
    111   href="http://bugzilla.slf4j.org/show_bug.cgi?id=100">bug 100</a>
    112   illustrates, associating markers as parents and children is not very
    113   helpful. It is much better to think of markers in terms of abstract
    114   graphs. As such, we now say that a marker contains (zero or more)
    115   <code>references</code> to other markers.
    116   </p>
    117 
    118   <p>This breaking change is justified because it corrects a
    119   conceptual error in the design. Previously, it was all too easy for
    120   developers to get confused and incorrectly link markers
    121   together.</p>
    122 
    123   <h2><a href="#1_5_3" name="1_5_3">Version 1.5.3 compared to 1.5.2</a></h2>
    124 
    125   <h3>slf4j-api module, list of breaking changes:</h3>
    126   
    127 
    128   <table class="bodyTable">
    129     <tr>
    130       <th>Severity</th>
    131       <th>Description</th>
    132       <th>Class</th>
    133       <th>Method / Field</th>
    134     </tr>
    135     <tr >
    136       <td>Error</td>
    137       <td>Added final modifier to class</td>
    138       <td>org.slf4j.helpers.MessageFormatter</td>
    139       <td></td>
    140     </tr>
    141   </table>
    142 
    143   <p>Declaring <code>MessageFormatter</code> class as final should not
    144   affect users, unless they extend this class. However, since this
    145   class is intended to be used internally, very few users should be
    146   affected.
    147   </p>
    148 
    149   <h2><a href="#1_5_2" name="1_5_2">Version 1.5.2 compared to 1.5.1</a></h2>
    150 
    151   <p>No breaking changes to report.</p>   
    152   
    153   <h2><a href="#1_5_1" name="1_5_1">Version 1.5.1 compared to 1.5.0</a></h2>
    154 
    155 
    156   <h3>slf4j-api module, list of breaking changes:</h3>
    157   
    158 
    159   <table class="bodyTable">
    160     <tr>
    161       <th>Severity</th>
    162       <th>Description</th>
    163       <th>Class</th>
    164       <th>Method / Field</th>
    165     </tr>
    166     <tr >
    167       <td>Error</td>
    168       <td>Method 'getCopyOfContextMap()' has been added to an
    169       interface
    170       </td>
    171       <td>org.slf4j.spi.MDCAdapter</td>
    172       <td>public java.util.Map getCopyOfContextMap()</td>
    173     </tr>
    174     <tr class="alt">
    175       <td>Error</td>
    176       <td>Method 'setContextMap(Map)' has been added to an
    177       interface
    178       </td>
    179       <td>org.slf4j.spi.MDCAdapter</td>
    180       <td>public void setContextMap(java.util.Map)</td>
    181     </tr>
    182 
    183     <tr>
    184       <td>Error</td>
    185       <td>Method 'getDetachedMarker(String)' has been added to an
    186       interface
    187       </td>
    188       <td>org.slf4j.IMarkerFactory</td>
    189       <td>public org.slf4j.Marker getDetachedMarker(java.lang.String)</td>
    190     </tr>
    191 
    192     <tr class="alt">
    193       <td>Info</td>
    194       <td>Method 'equals(Object)' has been added to an
    195       interface
    196       </td>
    197       <td>org.slf4j.Marker</td>
    198       <td>public boolean equals(java.lang.Object)</td>
    199     </tr>
    200 
    201     <tr>
    202       <td>info</td>
    203       <td>Method 'hashCode()' has been added to an
    204       interface
    205       </td>
    206       <td>org.slf4j.Marker</td>
    207       <td>public int hashCode()</td>
    208     </tr>
    209 
    210   </table>
    211 
    212   <p>The addition of the <code>getCopyOfContextMap()</code> method in
    213   the <code>MDCAdapter</code> class should only impact users who have
    214   their own implementation of the said interface. Except for bindings
    215   that ship with SLF4J and for logback-classic, which will be
    216   naturally upgraded, there are no known other implementations of
    217   <code>MDCAdapter</code>. In a rare but still possible scenario, if
    218   the user mixes different versions for slf4j-api.jar, say version
    219   1.5.1. and an SLF4J binding, say slf4j-log4j12.jar version 1.5.0,
    220   then a <code>java.lang.AbstractMethodError</code> will be thrown,
    221   but only if the client code calls the newly added method. <span
    222   style="color:green"> In short, although generally speaking the
    223   addition of a method to an interface is a breaking change, we are
    224   confident that no users will be impacted in this particular
    225   case.</span>
    226   </p>
    227 
    228   <p>Similar reasoning applies to the <code>setContextMap(Map)</code>
    229   method.</p> 
    230 
    231   <p>The addition of <code>getDetachedMarker(String)</code> method in
    232   the <code>org.slf4j.IMarkerFactory</code> should not impact users as
    233   the only (known) implementation of this interface ships with SLF4J
    234   itself.
    235   </p>
    236 
    237   <p>The <code>equals()</code> and <code>hashCode()</code> methods
    238   were added to the <code>org.slf4j.Marker</code> interface for
    239   documentation purposes. Given that all objects implicitly implement
    240   these methods, their addition should theoretically not break
    241   existing code. </p>
    242 
    243 
    244   <h3>Other modules</h3>
    245 
    246   <p>No breaking changes to report.</p> 
    247 
    248 
    249   <!-- ========================================= -->
    250   <h2><a href="#1_5_0" name="1_5_0">Version 1.5.0 compared to
    251   1.4.3</a></h2>
    252 
    253   <p>No breaking changes to report.</p> 
    254 
    255   <!-- ========================================= -->
    256   <h2><a href="#1_4_3" name="1_4_3">Version 1.4.3 compared to
    257   1.4.2</a></h2>
    258   <p>No breaking changes to report.</p>
    259 
    260   <!-- ========================================= -->
    261   <h2><a href="#1_4_2" name="1_4_2">Version 1.4.2 compared to 1.4.1</a></h2>
    262   <p>No breaking changes to report.</p> 
    263 
    264   <!-- ========================================= -->
    265   <h2><a href="#1_4_1" name="1_4_1">Version 1.4.1 compared to
    266   1.4.0</a></h2>
    267   <p>No breaking changes to report.</p> 
    268 
    269 </div> </body> </html>