title: Variable with same name in subclass and superclass
body: <p>I'm currently working on some Findbugs issues of another persons project.<br>
  This is the issue I'm working on:</p>
  
  <blockquote>
    <p><strong>Correctness - Class defines field that masks a superclass field</strong><br>
    This class defines a field with the same name as a visible instance field in a superclass. This is confusing, and may indicate an error if methods update or access one of the fields when they wanted the other.</p>
  </blockquote>
  
  <p>There is the superclass <code>OutputInterface</code> and the subclass <code>CoreOutputInterface</code> which extends <code>OutputInterface</code>. Both of them define the variable <code>className</code>. 
  <code>CoreOutputInterface</code> has some subclasses as well.  </p>
  
  <p>To fix the issue I would simply remove the <code>className</code> from the subclass (<code>CoreOutputInterface</code>) since it is already defined in the superclass.<br>
  The variable is never read or set with <code>super.className</code> or <code>this.className</code>, only with <code>className</code>, so in my opinion it should not lead to any problems.<br>
  Also the variable from the superclass is never referenced in the whole project (I checked it with the Eclipse reference function).</p>
  
  <p>Can anyone confirm that this can not lead to a problem in any situation?</p>
  
  <p>Thanks in advance for your help.</p>
  
  <hr>
  
  <p><strong>OutputInterface:</strong></p>
  
  <pre><code>public abstract class OutputInterface {
  
      protected String className = null;
  
      ...
  }
  </code></pre>
  
  <p><strong>CoreOutputInterface:</strong></p>
  
  <pre><code>public abstract class CoreOutputInterface extends OutputInterface {
  
      protected String className = null;
  
      ...
  
      public void getClassName() {
          return className;
      }
  
      public void setClassName(String newName) {
          className = newName;
      }
  
      ...
  }
  </code></pre>