Fixed false positive in UnusedImports: javadoc comments are parsed to check @see and other tags

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6023 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Xavier Le Vourch 2008-04-16 23:34:30 +00:00
parent 33bcfed90f
commit 99348a8582

View File

@ -45,10 +45,10 @@ public class UnusedImportsRule extends AbstractRule {
"@see\\s+(\\p{Alpha}\\p{Alnum}*)[\\s#]");
private static final Pattern LINK_PATTERNS = Pattern.compile(
"\\{@link(?:plain)?\\s+(\\p{Alpha}\\p{Alnum}*)[\\s#]");
"\\{@link(?:plain)?\\s+(\\p{Alpha}\\p{Alnum}*)[\\s#\\}]");
private static final Pattern VALUE_PATTERN = Pattern.compile(
"\\{@value\\s+(\\p{Alpha}\\p{Alnum}*)[\\s#]");
"\\{@value\\s+(\\p{Alpha}\\p{Alnum}*)[\\s#\\}]");
private static final Pattern[] PATTERNS = { SEE_PATTERN, LINK_PATTERNS, VALUE_PATTERN };