Steps to reproduce:
- Create new workspace.
- Create new java project.
- Add the class attached to the issue.
- Go to Window->Preferences->PMD->Rule Configuration
- Switch on "Use global rule management"
- Select each of two rules "Empty Catch Block" and mark "Empty blocks containing comments will be skipped" on "Properties" page.
- Remove mark from rule "LocalVariableCouldBeFinal".
- Apply changes.
- Open context menu in added class editor and select PMD->Check Code.
- Sure that the problem "LocalVariableCouldBeFinal" was not reported.
- Clear violations (PMD->Clear Violations)
- Restart Eclipse
- Open context menu in added class editor and select PMD->Check Code.
- Sure that the problem "LocalVariableCouldBeFinal" WAS reported. BUT it is not expected!
- Open PMD global rule configuration and sure that rule "LocalVariableCouldBeFinal" is switched off.
- Place and remove mark on the rule, remove violations and check code again. The problem is not reported anymore.
Eclipse: Eclipse IDE for Java EE Developers Eclipse IDE for Java EE Developers x64 4.3.2
OS: Windows 7 x64
I think, I've fixed it. You can try out the fix by installing the latest (snapshot) version of the plugin from here:
https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site-latest/
The bugfix will be included in the next release of the plugin.