title: Calling Optional#isPresent() in single line is reported as not called
body: <p>I run SonarQube to check my code and I found a case which I don't understand the reported error.</p>
  
  <p>My code is:</p>
  
  <pre><code>private static final int BASE_ID = 100_000_000;
  private boolean isValidId(Id id) {
      return id.asInteger().isPresent() &amp;&amp; id.asInteger().get() &gt;= BASE_ID;
  }
  </code></pre>
  
  <p>The method <code>asInteger</code> returns <code>Optional&lt;Integer&gt;</code></p>
  
  <p>The error that I am getting from sonarqube is 
  <code>Call "Optional#isPresent()" before accessing the value.</code>
  in the return line.</p>
  
  <p>I understand that the code is ok as the second part of the <code>if</code> won’t get executed if the first one is false. I know that this can be solved with a <code>.filter(..).isPresent()</code> but I like it more this way.</p>
  
  <p>Any ideas why would this happen?</p>