<p>
Using <code>toLowerCase()</code> or <code>toUpperCase()</code> to make case insensitive comparisons is inefficient because it requires the creation of temporary, intermediate <code>String</code> objects.
</p>

<p>The following code:</p>

<pre>
boolean result1 = foo.toUpperCase().equals(bar);             // Non-Compliant
boolean result2 = foo.equals(bar.toUpperCase());             // Non-Compliant
boolean result3 = foo.toLowerCase().equals(bar.LowerCase()); // Non-Compliant
</pre>

<p>should be refactored into:</p>

<pre>
boolean result = foo.equalsIgnoreCase(bar);                  // Compliant
</pre>