Browse Source

FilterSpec: Use BigInteger.ZERO instead of valueOf(0)

This just simplifies a bit by avoiding an unneeded method call.

Change-Id: I6d8d2fc512d8f8a82da73c355017d0abf833a13b
master
Jonathan Nieder 4 years ago
parent
commit
86aa6deff4
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java

3
org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java

@ -10,6 +10,7 @@
package org.eclipse.jgit.transport;
import static java.math.BigInteger.ZERO;
import static java.util.Objects.requireNonNull;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT;
@ -43,7 +44,7 @@ public final class FilterSpec {
}
static ObjectTypes allow(int... types) {
BigInteger bits = BigInteger.valueOf(0);
BigInteger bits = ZERO;
for (int type : types) {
bits = bits.setBit(type);
}

Loading…
Cancel
Save