Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ private static void compact(ModFileScanData data, String fileName) {
Object annValue = e.getValue();
if (annValue instanceof ArrayList<?> list) {
// We cannot properly compact annValue using List.of() because there are mods that
// (unnecessarily) rely on the list implementation being ArrayList.
list.trimToSize();
// (unnecessarily) rely on the list implementation being ArrayList. Copy instead of
// trimming the original, which other mod construction threads may be iterating.
return new ArrayList<>(list);
}
return annValue;
}))
Expand Down
Loading