Merge branch 'pr-1625'
This commit is contained in:
@ -41,7 +41,7 @@ public class UnusedImportsRule extends AbstractJavaRule {
|
||||
* @throws package.class label
|
||||
*/
|
||||
private static final Pattern SEE_PATTERN = Pattern
|
||||
.compile("@see\\s+(\\p{Alpha}\\w*)(?:#\\w*(?:\\(([\\w\\s,]*)\\))?)?");
|
||||
.compile("@see\\s+(\\p{Alpha}?+\\w*)(?:#\\w*(?:\\(([\\w\\s,]*)\\))?)?");
|
||||
|
||||
private static final Pattern LINK_PATTERNS = Pattern
|
||||
.compile("\\{@link(?:plain)?\\s+(\\p{Alpha}\\w*)(?:#\\w*(?:\\(([.\\w\\s,]*)\\))?)?[\\s\\}]");
|
||||
|
@ -452,6 +452,22 @@ public class Imports {
|
||||
i = g3(i);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#1625 [java] UnusedImports false positive for method parameter type in @see Javadoc</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
package net.sourceforge.pmd.lang.java.rule.bestpractices.unusedimports;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
||||
public class Derived extends FileInputStream {
|
||||
/** @see #FileInputStream(File) */
|
||||
void main() {}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
Reference in New Issue
Block a user