summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-04-02 20:29:21 +0000
committerGerrit Code Review <support@gerrithub.io>2024-04-02 20:29:21 +0000
commit40b78e1877177eab98a1d7674b814de99f8804dc (patch)
treefe6b23ef81bcdb9173f14e1555d881549a0344df /org.eclipse.jgit
parentc111261158c6adabe3be9d7b4d9c54340f700bdb (diff)
parente118d4382358e2258703b4f3d96d29254b8e5279 (diff)
downloadjgit-40b78e1877177eab98a1d7674b814de99f8804dc.tar.gz
jgit-40b78e1877177eab98a1d7674b814de99f8804dc.zip
Merge "PackBitmapIndexBuilder: allow repeated call of getCompressedBitmaps()"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
index a47f2dfcc8..d73c7ce887 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
@@ -323,8 +323,9 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
generateStoredEntry(bitmapsToWriteXorBuffer.pollFirst()));
}
- Collections.reverse(bitmapsToWrite);
- return bitmapsToWrite;
+ List<StoredEntry> bitmapsToReturn = new ArrayList<>(bitmapsToWrite);
+ Collections.reverse(bitmapsToReturn);
+ return bitmapsToReturn;
}
/** Data object for the on disk representation of a bitmap entry. */