From edd57a21d6e24e19c7d66b06e3566331c0f889fb Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Fri, 24 May 2019 10:57:09 -0700 Subject: [PATCH] Error Prone: Enable and fix OperatorPrecedence Change-Id: I1c9e79a37cba650b1526793fc7997544bb99aafc --- java/com/google/gerrit/server/submit/SubmoduleOp.java | 2 +- tools/BUILD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/com/google/gerrit/server/submit/SubmoduleOp.java b/java/com/google/gerrit/server/submit/SubmoduleOp.java index d3a578f44c..070d80ff68 100644 --- a/java/com/google/gerrit/server/submit/SubmoduleOp.java +++ b/java/com/google/gerrit/server/submit/SubmoduleOp.java @@ -656,7 +656,7 @@ public class SubmoduleOp { int newSize = msgbuf.length() + bullet.length() + message.length(); if (++numMessages > maxCommitMessages || newSize > maxCombinedCommitMessageSize - || iter.hasNext() && (newSize + ellipsis.length()) > maxCombinedCommitMessageSize) { + || (iter.hasNext() && (newSize + ellipsis.length()) > maxCombinedCommitMessageSize)) { msgbuf.append(ellipsis); break; } diff --git a/tools/BUILD b/tools/BUILD index aa3bb4b321..2ded4c4438 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -65,7 +65,7 @@ java_package_configuration( "-Xep:NullableConstructor:WARN", "-Xep:NullablePrimitive:WARN", "-Xep:NullableVoid:WARN", - "-Xep:OperatorPrecedence:WARN", + "-Xep:OperatorPrecedence:ERROR", "-Xep:OverridesGuiceInjectableMethod:WARN", "-Xep:PreconditionsInvalidPlaceholder:WARN", "-Xep:ProtoFieldPreconditionsCheckNotNull:WARN",