ObjectWalk: 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: I182f986263b8b9ac189907f4bd1662b4092a52d8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2019-06-12 14:21:39 +09:00 committed by Matthias Sohn
parent 2eeabde94a
commit 0f9063941c
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ public RevObject nextObject() throws MissingObjectException,
continue;
}
visitationPolicy.visited(o);
if ((o.flags & UNINTERESTING) == 0 | boundary) {
if ((o.flags & UNINTERESTING) == 0 || boundary) {
if (o instanceof RevTree) {
// The previous while loop should have exhausted the stack
// of trees.