parent
26776546fd
commit
7e100714bb
|
|
@ -142,6 +142,7 @@ public class JavadocTag {
|
|||
public boolean canReferenceImports() {
|
||||
return tagInfo == JavadocTagInfo.SEE
|
||||
|| tagInfo == JavadocTagInfo.LINK
|
||||
|| tagInfo == JavadocTagInfo.VALUE
|
||||
|| tagInfo == JavadocTagInfo.LINKPLAIN
|
||||
|| tagInfo == JavadocTagInfo.THROWS
|
||||
|| tagInfo == JavadocTagInfo.EXCEPTION;
|
||||
|
|
|
|||
|
|
@ -104,6 +104,13 @@ public class UnusedImportsCheckTest extends BaseCheckTestSupport {
|
|||
verify(checkConfig, getPath("InputUnusedImports.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testProcessJavadocWithLinkTag() throws Exception {
|
||||
final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
|
||||
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
|
||||
verify(checkConfig, getPath("InputUnusedImportWithValueTag.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAnnotations() throws Exception {
|
||||
final DefaultConfiguration checkConfig = createCheckConfig(UnusedImportsCheck.class);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.puppycrawl.tools.checkstyle.checks.imports;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public class InputUnusedImportWithValueTag {
|
||||
|
||||
/**
|
||||
* Method determines current month as for {@value Calendar#MONTH}.
|
||||
*
|
||||
* @return index of the current month.
|
||||
*/
|
||||
public int currentMonth() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue