create a copy of the tag collection to reduce memory on caching

This commit is contained in:
Sebastian Sdorra
2013-03-20 07:46:52 +01:00
parent e0cec05b4d
commit 18e6d6d5ab

View File

@@ -212,9 +212,10 @@ public class GitChangesetConverter implements Closeable
Collection<String> tagCollection = tags.get(commit.getId());
if (tagCollection != null)
if (Util.isNotEmpty(tagCollection))
{
changeset.getTags().addAll(tagCollection);
// create a copy of the tag collection to reduce memory on caching
changeset.getTags().addAll(Lists.newArrayList(tagCollection));
}
changeset.setBranches(branches);