Browse Source

Remove deprecated BitmapBuilder#add

Use BitmapBuilder#or or BitmapBuilder#addObject instead.

Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.0
Matthias Sohn 7 years ago
parent
commit
d061343619
  1. 16
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
  2. 13
      org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java

16
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);

13
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.

Loading…
Cancel
Save