summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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. */