From 8e168c23bde5fed98dea0141b0cdcf11a74a7454 Mon Sep 17 00:00:00 2001 From: Michal Kordas Date: Thu, 27 Aug 2015 00:13:34 +0200 Subject: [PATCH] Add argument to exception constructor invocation. #1555 Fixes `NewExceptionWithoutArguments` inspection violation. Description: >Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard. --- .../checkstyle/checks/indentation/IndentationCheckTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java index 2ad47a9dd..a3266ac1b 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/indentation/IndentationCheckTest.java @@ -154,7 +154,7 @@ public class IndentationCheckTest extends BaseCheckTestSupport { || indentInComment < expectedMinimalIndent && isWarnComment; } - throw new IllegalStateException(); + throw new IllegalStateException("Comments are not consistent"); } private static int getLineStart(String line, final int tabWidth) {