From eeb20e6c8cc86d2d283c254ddcddf89f46aa5190 Mon Sep 17 00:00:00 2001 From: Michal Kordas Date: Sun, 16 Aug 2015 23:08:23 +0200 Subject: [PATCH] Correct name of exception. #1555 Fixes `ExceptionNameDoesntEndWithException` inspection violation in test code. Description: >Reports exception classes whose names don't end with 'Exception'. --- .../java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java index 8f006af13..c396f81f9 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/XMLLoggerTest.java @@ -202,7 +202,7 @@ public class XMLLoggerTest { new LocalizedMessage(1, 1, "messages.properties", null, null, null, this.getClass(), null); final AuditEvent ev = new AuditEvent(this, "Test.java", message); - logger.addException(ev, new TestThrowable()); + logger.addException(ev, new TestException()); logger.auditFinished(null); final String[] expectedLines = { "<exception>", @@ -253,7 +253,7 @@ public class XMLLoggerTest { assertEquals("last line.", "", lines[lines.length - 1]); } - private static class TestThrowable extends Exception { + private static class TestException extends Exception { private static final long serialVersionUID = 1L;