IntelliJ complaining "for statement does not loop"?
<p>This is the code I have:</p>

<pre><code>public enum Modification {
    NONE, SET, REMOVE;
}

boolean foo(){
    for (S s : sList) {
        final Modification modification = s.getModification();
        switch (modification) {
            case SET:
            case REMOVE:
                return true;
            /*
            case NONE:
                break;
            */
        }
    }
    return false;
}
</code></pre>

<p>And when the code is as seen above, IntelliJ will say:</p>

<blockquote>
  <p>'for' statement does not loop less... ()  Reports any instance of for,
  while and do statements whose bodies are guaranteed to execute at most
  once. Normally, this is an indication of a bug.</p>
</blockquote>

<p>Only if I make the following change, IntelliJ will be happy:</p>

<pre><code>for (S s : sList) {
    final Modification modification = s.getModification();
    switch (modification) {
        case SET:
        case REMOVE:
            return true;
        case NONE:
            break;
    }
}
</code></pre>

<p>Why is my for loop not looping if <strong>case NONE:</strong>  is not included in the switch statement?</p>