diff options
author | Sam Delmerico <delmerico@google.com> | 2024-03-25 10:52:26 -0700 |
---|---|---|
committer | Sam Delmerico <delmerico@google.com> | 2024-03-25 13:58:32 -0700 |
commit | a5ec41bd2822c5d926d4f75454b784917efb7941 (patch) | |
tree | 653a2a9bb06c1db34779c8548c166b41bb721cab /org.eclipse.jgit/src | |
parent | ebdfd064c4c9ae1b7cb04e51244113f229cb45d0 (diff) | |
download | jgit-a5ec41bd2822c5d926d4f75454b784917efb7941.tar.gz jgit-a5ec41bd2822c5d926d4f75454b784917efb7941.zip |
PackBitmapIndex: convert from class to interface
This abstract class can be an interface after
https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1184614 moved the
packChecksum data behind a getter interface. This also allows easier
overriding of this interface with custom types.
Change-Id: I89851de678e7ff896cc086455907e2898d2eecf6
Diffstat (limited to 'org.eclipse.jgit/src')
3 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java index c2b3926309..5f979b0daa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java @@ -18,7 +18,7 @@ import com.googlecode.javaewah.EWAHCompressedBitmap; /** * Base implementation of the PackBitmapIndex. */ -abstract class BasePackBitmapIndex extends PackBitmapIndex { +abstract class BasePackBitmapIndex implements PackBitmapIndex { private final ObjectIdOwnerMap<StoredBitmap> bitmaps; BasePackBitmapIndex(ObjectIdOwnerMap<StoredBitmap> bitmaps) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java index affd2c0761..4c3f6c1eb4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java @@ -35,7 +35,7 @@ import com.googlecode.javaewah.EWAHCompressedBitmap; * {@link #findPosition(AnyObjectId)} can be used to build other bitmaps that a * compatible with the encoded bitmaps available from the index. */ -public abstract class PackBitmapIndex { +public interface PackBitmapIndex { /** Flag bit denoting the bitmap should be reused during index creation. */ public static final int FLAG_REUSE = 1; @@ -137,7 +137,7 @@ public abstract class PackBitmapIndex { * * @return checksum as a byte array */ - byte[] getPackChecksum() { + default byte[] getPackChecksum() { return null; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java index bb7cfd0464..ffbc0737ac 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java @@ -28,8 +28,8 @@ import com.googlecode.javaewah.IntIterator; * implementations this implementation is not thread safe, as it is intended to * be used with a PackBitmapIndexBuilder, which is also not thread safe. */ -public class PackBitmapIndexRemapper extends PackBitmapIndex - implements Iterable<PackBitmapIndexRemapper.Entry> { +public class PackBitmapIndexRemapper + implements PackBitmapIndex, Iterable<PackBitmapIndexRemapper.Entry> { private final BasePackBitmapIndex oldPackIndex; final PackBitmapIndex newPackIndex; |