commit | 9b163e113de9f3a49219a02d388f7f46ea2559d3 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@collab.net> | Wed Jun 01 21:19:24 2016 +0900 |
committer | David Pursehouse <dpursehouse@collab.net> | Wed Jun 01 21:19:24 2016 +0900 |
tree | 5cee2ed8aff06aa7ff75a162d9d80e06ce477e18 | |
parent | 8d295ed48e8f52eef5661b6eb10d6402d197c776 [diff] |
Fix 'Statement unnecessarily nested within else clause' warnings Change-Id: Ief813016e7794e3c08e8e22931129ea4bcf607e0
diff --git a/src/main/java/com/googlesource/gerrit/plugins/validators/CommitMessageLengthValidation.java b/src/main/java/com/googlesource/gerrit/plugins/validators/CommitMessageLengthValidation.java index ff7f1aa..92714ef 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/validators/CommitMessageLengthValidation.java +++ b/src/main/java/com/googlesource/gerrit/plugins/validators/CommitMessageLengthValidation.java
@@ -73,9 +73,8 @@ if (rejectTooLong) { messagesList.add(new CommitValidationMessage(message, true)); throw new CommitValidationException("Commit length validation failed", messagesList); - } else { - messagesList.add(new CommitValidationMessage("(W) " + message, false)); } + messagesList.add(new CommitValidationMessage("(W) " + message, false)); } @Override