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.
This commit is contained in:
Michal Kordas 2015-08-20 18:12:53 +02:00 committed by Roman Ivanov
parent 885fca8fe9
commit 074b36894e
1 changed files with 4 additions and 4 deletions

View File

@ -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();