Bugs item #1964927, was opened at 2008-05-15 15:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=479921&aid=1964927&group_id=56262
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Rick Rupp (tiupayzai)
Assigned to: Nobody/Anonymous (nobody)
Summary: AvoidDuplicateLiterals falsely identifies annotations
Initial Comment:
I am getting false hits because of literals used in annotations.
AvoidDuplicateLiterals rule identifies literals used in annotations.
I've tested by running PMD from an ant task using the following two versions. The result is the same for both of them.
pmd-3.9.jar
pmd-4.2.1.jar
Example:
--------
There are 4 methods in a java class that use the annotation
@SuppressWarnings("unchecked")
I get the following PMD warning...
The String literal "unchecked" appears 4 times in this file; the first occurrence is on line 385
I don't want to turn off this rule, because it is valuable. But it's really annoying to mark up my code with the NOPMD just to make this go away.
@SuppressWarnings("unchecked") // NOPMD string literal
Am I missing a setting, or is this a bug?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=479921&aid=1964927&group_id=56262
|