False Positive: LocalVariableCouldBeFinal
A source code analyzer
Brought to you by:
adangel,
juansotuyo
the following code block triggers a false positive in Eclipse (not from maven) for LocalVariableCouldBeFinal. My guess is that it's not properly detecting a Java 5+ environment. I didn't see anywhere in the plugin to configure java5+ support like there is in the maven plugin.
for (final Object user : Objects)
Same here on Java 6
This returns LocalVariableCouldBeFinal on the
and a UR anomaly for variable f.
I think this is because the eclipse plugin doesn't use the latest pmd version.
I hope to release a new pmd-eclipse-plugin soon (means in the next 2 weeks).
Alright, good to hear.
This is fixed now with the version:
PMD for Eclipse 4.0.0.v20130510-1000
It is available via the update site: http://pmd.sourceforge.net/eclipse/