Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
Return of boolean expression should not be wrapped into an if-the-els…
Browse files Browse the repository at this point in the history
…e statement

Signed-off-by:Matteo Baccan <[email protected]>
  • Loading branch information
matteobaccan committed Apr 21, 2021
1 parent c665ec9 commit 5872540
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions core/src/main/java/pl/project13/core/log/MessageFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,11 @@ static boolean isEscapedDelimeter(String messagePattern, int delimeterStartIndex
return false;
}
char potentialEscape = messagePattern.charAt(delimeterStartIndex - 1);
if (potentialEscape == ESCAPE_CHAR) {
return true;
} else {
return false;
}
return (potentialEscape == ESCAPE_CHAR);
}

static boolean isDoubleEscaped(String messagePattern, int delimeterStartIndex) {
if (delimeterStartIndex >= 2 && messagePattern.charAt(delimeterStartIndex - 2) == ESCAPE_CHAR) {
return true;
} else {
return false;
}
return (delimeterStartIndex >= 2 && messagePattern.charAt(delimeterStartIndex - 2) == ESCAPE_CHAR);
}

// special treatment of array values was suggested by 'lizongbo'
Expand Down

0 comments on commit 5872540

Please sign in to comment.