Skip to content

Commit bc208e3

Browse files
committed
Add test for #1318
1 parent c3599d1 commit bc208e3

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleValidatorTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,17 @@ void allowsStringLiteralsOnBothSideInComparisons()
723723
this.runValidation("ValidLiteralComparisonCheck.java", true);
724724
}
725725

726+
/**
727+
* {@link MultilineJavadocTagsCheck} mustn't throw an internal exception,
728+
* if it meets a block comment instead of javadoc.
729+
* @throws Exception If an internal exception occurs
730+
*/
731+
@Test
732+
void rejectsInvalidMethodDocWithoutInternalException()
733+
throws Exception {
734+
this.runValidation("InvalidMethodDoc.java", false);
735+
}
736+
726737
/**
727738
* Convert file name to URL.
728739
* @param file The file
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Hello
3+
*/
4+
package foo;
5+
6+
/**
7+
* The {@code InvalidMethodDoc#method} comment isn't javadoc, but it's not a reason
8+
* to fail {@code MultilineJavadocTagsCheck} validation with an unhandled exception.
9+
* @foo bar
10+
*/
11+
class InvalidMethodDoc {
12+
/*
13+
* Run method.
14+
*/
15+
void method() {
16+
}
17+
}

0 commit comments

Comments
 (0)