From 73474466ebcccbeeef21461f0df5839569151c29 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 3 Nov 2015 23:20:14 -0800 Subject: [PATCH] Make BitmapBuilder.getBitmapIndex public Every Bitmap in current JGit code has an associated BitmapIndex. Make it public in BitmapBuilder to make retrieving bitmaps to OR in from that index easier. Change-Id: I2773aa94d8b67f12194608e6317c0792a5de21e2 --- .../jgit/internal/storage/file/BitmapIndexImpl.java | 3 ++- org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java index a8c8aaebc..47adb914f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java @@ -318,7 +318,8 @@ public boolean removeAllOrNone(PackBitmapIndex index) { return true; } - BitmapIndexImpl getBitmapIndex() { + @Override + public BitmapIndexImpl getBitmapIndex() { return BitmapIndexImpl.this; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java index a4b4b6ef2..037d3fd2a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java @@ -204,5 +204,12 @@ public interface BitmapBuilder extends Bitmap { /** @return the number of elements in the bitmap. */ int cardinality(); + + /** + * The BitmapIndex for this BitmapBuilder. + * + * @since 4.2 + */ + BitmapIndex getBitmapIndex(); } }