PMD 4.2.5
The expression
for ( Long chunk[] : splitter )
fails with:
Encountered ":" at line 1153, column 28.
Was expecting one of:
"[" ...
";" ...
"," ...
"=" ...
It doesn't like a C-style array declaration in for/in - even though the compiler is perfectly happy with it.
Rearranging the statement to
for ( Long[] chunk : splitter )
gets rid of the problem.
After reading the Java Language Spec v3.0, I realize that PMD is "right" in not parsing this. But given that the compiler parses it, I think it should be treated as a portability issue and warned about. Incidentally, you're in good company; CheckStyle and JavaNCSS have the same problem - if you agree that it is one.