]> source.dussan.org Git - jgit.git/commitdiff
Remove deprecated BitmapBuilder#add 16/119116/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 9 Mar 2018 23:33:26 +0000 (00:33 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 10 Mar 2018 18:41:23 +0000 (19:41 +0100)
Use BitmapBuilder#or or BitmapBuilder#addObject instead.

Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java

index 6ade4386acaf68709fed76f4bfa5c2150c8b05c0..1da43044874ee26390c808a562832c1fe33d7aa1 100644 (file)
@@ -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);
index fc354db1135e091a6f0f0ef61adab4105870a830..9f64f3524a8cd3ec5b15f3bc23e8d560a7a936f8 100644 (file)
@@ -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.