We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getChildren
OffsetNode
1 parent f150740 commit b8a6273Copy full SHA for b8a6273
src/main/java/ch/usi/si/seart/treesitter/OffsetTreeCursor.java
@@ -5,6 +5,7 @@
5
import lombok.experimental.FieldDefaults;
6
import org.jetbrains.annotations.NotNull;
7
8
+import java.util.Collections;
9
import java.util.List;
10
import java.util.Objects;
11
import java.util.function.Consumer;
@@ -125,7 +126,10 @@ public int getChildCount() {
125
126
public List<Node> getChildren() {
127
return node.getChildren().stream()
128
.map(OffsetNode::new)
- .collect(Collectors.toList());
129
+ .collect(Collectors.collectingAndThen(
130
+ Collectors.toList(),
131
+ Collections::unmodifiableList
132
+ ));
133
}
134
135
@Override
0 commit comments