Skip to content

Commit bbb00f9

Browse files
Carbon14-48romani
authored andcommitted
Issue #16361: add comment on testAddException
1 parent 601213d commit bbb00f9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/test/java/com/puppycrawl/tools/checkstyle/DefaultLoggerTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,14 @@ public void testNewCtor() throws Exception {
308308
}
309309
}
310310

311+
/**
312+
* Direct invocation of {@code addException} is necessary because
313+
* {@code Checker} implementation does not call {@code addException}
314+
* during normal file processing flow, leaving mutations on lines 179-183
315+
* ({@code PrintWriter::println}, {@code getLocalizedMessage},
316+
* {@code AuditEvent::getFileName}, {@code Throwable::printStackTrace})
317+
* with no coverage if tested only through {@code verifyWithInlineConfigParserAndDefaultLogger}.
318+
*/
311319
@Test
312320
public void testAddException() throws Exception {
313321
try (MockByteArrayOutputStream errorStream = new MockByteArrayOutputStream()) {

0 commit comments

Comments
 (0)