Merge branch 'pr-1625'
This commit is contained in:
@ -16,6 +16,8 @@ This is a {{ site.pmd.release_type }} release.
|
||||
|
||||
### Fixed Issues
|
||||
|
||||
* java-bestpractices
|
||||
* [#1555](https://github.com/pmd/pmd/issues/1555): \[java] UnusedImports false positive for method parameter type in @see Javadoc
|
||||
* java-codestyle
|
||||
* [#1547](https://github.com/pmd/pmd/issues/1547): \[java] AtLeastOneConstructorRule: false-positive with lombok.AllArgsConstructor
|
||||
|
||||
@ -24,6 +26,7 @@ This is a {{ site.pmd.release_type }} release.
|
||||
### External Contributions
|
||||
|
||||
* [#1623](https://github.com/pmd/pmd/pull/1623): \[java] Fix lombok.AllArgsConstructor support - [Bobby Wertman](https://github.com/CasualSuperman)
|
||||
* [#1625](https://github.com/pmd/pmd/pull/1625): \[java] UnusedImports false positive for method parameter type in @see Javadoc - [Shubham](https://github.com/Shubham-2k17)
|
||||
|
||||
{% endtocmaker %}
|
||||
|
||||
|
@ -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