This allows more flexibility in overriding the PackBitmapIndex and also
allows us to turn PackBitmapIndex into an interface in
https://review.gerrithub.io/c/eclipse-jgit/jgit/+/
1178201.
Change-Id: I3be611fad67ff38b308c0052a04149f1497858ae
PackBitmapIndex idx = PackBitmapIndex.open(bitmapIdxFile, idx(),
getReverseIdx());
// At this point, idx() will have set packChecksum.
- if (Arrays.equals(packChecksum, idx.packChecksum)) {
+ if (Arrays.equals(packChecksum, idx.getPackChecksum())) {
bitmapIdx = optionally(idx);
return idx;
}
reverseIndexSupplier, loadParallelRevIndex);
}
- /** Footer checksum applied on the bottom of the pack file. */
- byte[] packChecksum;
+ /**
+ * Footer checksum applied on the bottom of the pack file.
+ *
+ * @return checksum as a byte array
+ */
+ byte[] getPackChecksum() {
+ return null;
+ }
/**
* Finds the position in the bitmap of the object.
private static final int MAX_XOR_OFFSET = 126;
+ private byte[] packChecksum;
+
private static final ExecutorService executor = Executors
.newCachedThreadPool(new ThreadFactory() {
private final ThreadFactory baseFactory = Executors
return getPackIndex().hashCode();
}
+ @Override
+ public byte[] getPackChecksum() {
+ return this.packChecksum;
+ }
+
PackIndex getPackIndex() {
return packIndex;
}