Skip to content

Commit a09c34e

Browse files
committed
Fix: symbols are now collected into an unmodifiable list
1 parent 54e8026 commit a09c34e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/ch/usi/si/seart/treesitter/Language.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@ public static void validate(@NotNull Language language) {
506506
this.totalFields = totalFields;
507507
this.symbols = IntStream.range(0, totalSymbols)
508508
.mapToObj(symbolId -> symbol(id, symbolId))
509-
.collect(Collectors.toList());
509+
.collect(Collectors.collectingAndThen(
510+
Collectors.toList(),
511+
Collections::unmodifiableList
512+
));
510513
this.extensions = extensions;
511514
}
512515

0 commit comments

Comments
 (0)