Browse Source

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 <david.pursehouse@gmail.com>
stable-5.4
David Pursehouse 5 years ago committed by Matthias Sohn
parent
commit
2eeabde94a
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java

2
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; break SEND_HAVES;
} }
if (statelessRPC) { if (statelessRPC) {

Loading…
Cancel
Save