title: FindBugs - how to solve EQ_COMPARETO_USE_OBJECT_EQUALS
body: <p>I am clueless here...</p>
  
  <pre><code> 1: private static class ForeignKeyConstraint implements Comparable&lt;ForeignKeyConstraint&gt; {
   2: String tableName;
   3: String fkFieldName;
   4: 
   5: public int compareTo(ForeignKeyConstraint o) {
   6:    if (this.tableName.compareTo(o.tableName) == 0) {
   7:            return this.fkFieldName.compareTo(o.fkFieldName);
   8:        }
   9:        return this.tableName.compareTo(o.tableName);
  10:    }
  11: }
  </code></pre>
  
  <p>In line 6 I get from FindBugs: <code>Bug: net.blabla.SqlFixer$ForeignKeyConstraint defines compareTo(SqlFixer$ForeignKeyConstraint) and uses Object.equals()</code></p>
  
  <p><a href="http://findbugs.sourceforge.net/bugDescriptions.html#EQ_COMPARETO_USE_OBJECT_EQUALS" rel="noreferrer">Link to definition</a></p>
  
  <p>I don't know how to correct this.</p>