title: Replace this if-then-else statement by a single return statement
body: <p>While solving sonarQube issue i face the below warning,does any one tell me how to overcome this warning</p>
  
  <p>Method:-</p>
  
  <pre><code>@Override
      public boolean equals(Object obj) {
          if (this == obj)
              return true;
          if (obj == null)
              return false;
          if (getClass() != obj.getClass())
              return false;
          Division other = (Division) obj;
  
          if (divisionId != other.divisionId)
          //getting warning for above if condition
  
              return false;
          return true;
      }
  </code></pre>
  
  <p>Warning :</p>
  
  <p><strong>Replace this if-then-else statement by a single return statement.</strong> </p>
  
  <p>Description:-</p>
  
  <p><strong>Return of boolean literal statements wrapped into if-then-else ones should be simplified.</strong></p>