title: PMD violation on for each loop (final or not?)
body: <p>I just recently found out about PMD and want to improve my code with it. Therefore I have enabled all rules (and got 47000 violations :P). Anyway, I have a problem with this one:</p>
  
  <pre><code>double mean = 0;
  for (int p : points)
    mean += full[1][p];
  mean /= points.size();
  </code></pre>
  
  <p>On the <code>for each</code> loop, PMD tells me that <strong><em>Local variable 'p' could be declared final</em></strong>. If I change it to</p>
  
  <pre><code>double mean = 0;
  for (final int p : points)
    mean += full[1][p];
  mean /= points.size();
  </code></pre>
  
  <p>it tells me to <strong><em>Avoid using final local variables, turn them into fields</em></strong>. The second violation doesn't really make sense to me. What is the "correct" way to do this? (I realize that there may be different ways, I just want to know how PMD would like it to be.)</p>