Sonar error Conditions should not unconditionally evaluate to "TRUE" or to "FALSE"
<p>I am getting sonar violation: </p>

<blockquote>
  <p>"Conditions should not unconditionally evaluate to "TRUE" or to "FALSE""</p>
</blockquote>

<p>for the code below.</p>

<pre><code>List&lt;MediaContent&gt; savedList = source.getChildMediaContents();
List&lt;MediaContent&gt; supplierList = target.getChildMediaContents();

// if existing and incoming both empty
if(savedList == null &amp;&amp; supplierList == null){
    return false;
}

// if one is null and other is not then update is required
if(savedList == null &amp;&amp; supplierList != null){
    return true;
}

if(savedList != null &amp;&amp; supplierList == null){
    return true;
}
</code></pre>

<p>Below the two if blocks it is giving an error</p>

<pre><code>// if one is null and other is not then update is required
if(savedList == null &amp;&amp; supplierList != null){
    return true;
}

if(savedList != null &amp;&amp; supplierList == null){
    return true;
}
</code></pre>