diff options
author | Ivan Frade <ifrade@google.com> | 2023-09-06 17:19:21 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2023-09-06 17:19:21 -0400 |
commit | 9607ee02a19c828f7b58cac72f9137f9d6544256 (patch) | |
tree | 9205b4f9a2bb5f33f579cfc2374f42ba62bfc75c | |
parent | ba1653162c4dba3a25a600bef642dc5459ce01ee (diff) | |
parent | 4f5afe9d7c2eb5e11140d2cff328782478588c71 (diff) | |
download | jgit-9607ee02a19c828f7b58cac72f9137f9d6544256.tar.gz jgit-9607ee02a19c828f7b58cac72f9137f9d6544256.zip |
Merge "CommitGraphWriter: Make the list of chunks immutable"
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java index afbd7e654a..aef01fbb3c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java @@ -33,6 +33,7 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Optional; @@ -171,7 +172,7 @@ public class CommitGraphWriter { chunks.add(new ChunkHeader(CHUNK_ID_BLOOM_FILTER_DATA, bloomFilterChunks.data)); } - return chunks; + return Collections.unmodifiableList(chunks); } private static long calculateExpectedSize(List<ChunkHeader> chunks) { |