UnusedImports false positive for method parameter type in @see Javadoc

Updated SEE_PATTERN regex pattern.
This commit is contained in:
Shubham
2019-01-28 14:39:08 +05:30
parent dd66f9c5a2
commit 189bb46ea1

View File

@ -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\\}]");