From d061343619e635f5f6490d4bad472cde4b3dd077 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sat, 10 Mar 2018 00:33:26 +0100 Subject: [PATCH] Remove deprecated BitmapBuilder#add Use BitmapBuilder#or or BitmapBuilder#addObject instead. Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a Signed-off-by: Matthias Sohn --- .../internal/storage/file/BitmapIndexImpl.java | 16 ---------------- .../src/org/eclipse/jgit/lib/BitmapIndex.java | 13 ------------- 2 files changed, 29 deletions(-) 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 6ade4386ac..1da4304487 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 @@ -212,22 +212,6 @@ public class BitmapIndexImpl implements BitmapIndex { this.bitmapIndex = bitmapIndex; } - @Override - public boolean add(AnyObjectId objectId, int type) { - int position = bitmapIndex.findOrInsert(objectId, type); - if (bitset.contains(position)) - return false; - - Bitmap entry = bitmapIndex.getBitmap(objectId); - if (entry != null) { - or(entry); - return false; - } - - bitset.set(position); - return true; - } - @Override public boolean contains(AnyObjectId objectId) { int position = bitmapIndex.findPosition(objectId); 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 fc354db113..9f64f3524a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java @@ -121,19 +121,6 @@ public interface BitmapIndex { * return a reference to the current builder. */ public interface BitmapBuilder extends Bitmap { - /** - * Adds the id and the existing bitmap for the id, if one exists, to the - * bitmap. - * - * @param objectId - * the object ID - * @param type - * the Git object type. See {@link Constants}. - * @return true if the value was not contained or able to be loaded. - * @deprecated use {@link #or} or {@link #addObject} instead. - */ - @Deprecated - boolean add(AnyObjectId objectId, int type); /** * Whether the bitmap has the id set. -- 2.39.5