From 074b36894e7926817ff85703854bd4d87bbfd6d4 Mon Sep 17 00:00:00 2001 From: Michal Kordas Date: Thu, 20 Aug 2015 18:12:53 +0200 Subject: [PATCH] Remove unnecessary parentheses in test code. #1555 Fixes `UnnecessaryParentheses` inspection violations in test code. Description: >Reports on any instance of unnecessary parentheses. Parentheses are considered unnecessary if the evaluation order of an expression remains unchanged if the parentheses are removed. --- .../test/base/IndentationConfigurationBuilder.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java b/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java index 4be8921b7..e8727684e 100644 --- a/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java +++ b/src/it/java/com/google/checkstyle/test/base/IndentationConfigurationBuilder.java @@ -127,16 +127,16 @@ public class IndentationConfigurationBuilder extends ConfigurationBuilder if (match.matches()) { final int expectedLevel = Integer.parseInt(match.group(1)); - return (expectedLevel == indentInComment) && !isWarnComment - || (expectedLevel != indentInComment) && isWarnComment; + return expectedLevel == indentInComment && !isWarnComment + || expectedLevel != indentInComment && isWarnComment; } match = NONSTRICT_LEVEL_COMMENT_REGEX.matcher(comment); if (match.matches()) { final int expectedMinimalIndent = Integer.parseInt(match.group(1)); - return (indentInComment >= expectedMinimalIndent) && !isWarnComment - || (indentInComment < expectedMinimalIndent) && isWarnComment; + return indentInComment >= expectedMinimalIndent && !isWarnComment + || indentInComment < expectedMinimalIndent && isWarnComment; } throw new IllegalArgumentException();