-
Notifications
You must be signed in to change notification settings - Fork 41
Wrong auxclasspath if project is stored outside of workspace #96
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@demonfiddler thanks for the report! Just to be sure, but are you certain you are using the rule from The rules are called the same, but them being different rulesets mean they have different implementations. The one from the If you are using the one from For Eclipse I'm not certain it is properly populated by default, it should if it's not. @adangel can probably tell. |
@jsotuyod thanks for the detailed response. Yes, this was definitely occurring with the version in the typeresolution ruleset. I believed I was seeing the same problem when invoking PMD from both Eclipse and Maven but for reasons I've not yet fathomed the Eclipse PMD builder seems to have stopped reporting any PMD issues at all on this particular project and right now I'm no longer seeing it from either. I hope I haven't raised a false alarm. Will post again when I've done a deeper investigation. UPDATE: I have been able to reproduce this in Eclipse but not Maven - with the attached sample project Eclipse shows four PMD warnings (including CloneMethodMustImplementCloneable) but the Maven build, using the same ruleset, shows only three PMD warnings (excluding CloneMethodMustImplementCloneable). So it might be a problem with the PMD Eclipse plug-in. |
@demonfiddler I'm just noticing the updated comment. Good to hear. This is possibly an Eclipse plugin issue, not providing a complete auxclasspath. Just to be sure 'though, which PMD plugin are you using? As far as I know there are 2 plugins: Thanks in advanced |
When the project was stored outside of the workspace (e.g. when the project is imported, but not copied into the workspace), then the paths for the auxclasspath where wrong - they were always relative to the workspace location. |
Rule Set: Type Resolution
Description: The CloneMethodMustImplementCloneable rule can erroneously report a violation when the class in question extends one that does implement Cloneable.
Code Sample demonstrating the issue:
Running PMD through: Eclipse
The text was updated successfully, but these errors were encountered: