From 2eeabde94a4a39dd827d4ecc8110a6137d401cba Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 12 Jun 2019 13:12:52 +0900 Subject: [PATCH] BasePackFetchConnection: Prefer boolean operators over logical operators in comparisons Using the | and & operators in boolean conditions results in a warning from Error Prone: [ShortCircuitBoolean] Prefer the short-circuiting boolean operators && and || to & and |. see https://errorprone.info/bugpattern/ShortCircuitBoolean Change-Id: I6cccca3fdd28bf93b302a9b8a66e68ac912cb60d Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/transport/BasePackFetchConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java index a61c243bdf..57d6bc2466 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java @@ -670,7 +670,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection } } - if (noDone & receivedReady) { + if (noDone && receivedReady) { break SEND_HAVES; } if (statelessRPC) { -- 2.39.5