fix unsupported operation exception when adding to an unmodifiable set

This commit is contained in:
2018-11-19 19:19:51 +01:00
parent 135ab42cd8
commit afd1e36066

View File

@@ -190,7 +190,7 @@ public class DataStore implements AutoCloseable {
final Long oldDocId = tagsToDocId.putValue(tags, docId);
Preconditions.checkNull(oldDocId, "There must be at most one document for tags: {0}", tags);
final SortedSet<Tag> ts = tags.toTags();
final List<Tag> ts = new ArrayList<>(tags.toTags());
ts.add(TAG_ALL_DOCS);
for (final Tag tag : ts) {