title: Checkstyle error - Return count is 4 (max allowed is 2)
body: <p>I am not sure if this is a duplicate question.</p>
  
  <p>I have a Java method with 4 return statements, Each return statement is returning a different HTTP status.</p>
  
  <p>How to fix this checkstyle error to reduce the return statements.</p>
  
  <pre><code>if (condition) {
  return new ResponseEntity&lt;Domain&gt;(domain, HttpStatus.CONFLICT);
              } else if (condition2) {
  return new ResponseEntity&lt;Domain&gt;(domain, HttpStatus.PRECONDITION_FAILED);
              } else {
  return new ResponseEntity&lt;Domain&gt;(domain, HttpStatus.OK);
  }
  </code></pre>