diff --git a/core/src/main/java/pl/project13/core/jgit/JGitCommon.java b/core/src/main/java/pl/project13/core/jgit/JGitCommon.java index ff300c24..1b803990 100644 --- a/core/src/main/java/pl/project13/core/jgit/JGitCommon.java +++ b/core/src/main/java/pl/project13/core/jgit/JGitCommon.java @@ -341,13 +341,11 @@ public static boolean isRepositoryInDirtyState(Repository repo) throws GitAPIExc // repo is dirty. JGit does this, so we cannot use the isClean method // to get the same behaviour. Instead check dirty state without // status.getUntracked().isEmpty() - boolean isDirty = !(status.getAdded().isEmpty() + return !(status.getAdded().isEmpty() && status.getChanged().isEmpty() && status.getRemoved().isEmpty() && status.getMissing().isEmpty() && status.getModified().isEmpty() && status.getConflicting().isEmpty()); - - return isDirty; } } diff --git a/core/src/main/java/pl/project13/core/log/FormattingTuple.java b/core/src/main/java/pl/project13/core/log/FormattingTuple.java index b5bae414..2d34d0dd 100644 --- a/core/src/main/java/pl/project13/core/log/FormattingTuple.java +++ b/core/src/main/java/pl/project13/core/log/FormattingTuple.java @@ -49,7 +49,7 @@ */ public class FormattingTuple { - public static FormattingTuple NULL = new FormattingTuple(null); + public static final FormattingTuple NULL = new FormattingTuple(null); private String message; private Throwable throwable; diff --git a/core/src/main/java/pl/project13/core/log/MessageFormatter.java b/core/src/main/java/pl/project13/core/log/MessageFormatter.java index 81f21bfc..4d593766 100644 --- a/core/src/main/java/pl/project13/core/log/MessageFormatter.java +++ b/core/src/main/java/pl/project13/core/log/MessageFormatter.java @@ -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'