Repository navigation
Commit 7a2bac9
committed
Collect a record's members with Stream.toList()
Collectors.toUnmodifiableList() was there only because the list was
declared List<Tree>, and Stream.toList() on getMembers(), a
List<? extends Tree>, gives a list of the wildcard's capture.
addBodyDeclarations takes a List<? extends Tree>, so the variable is a
var and the stream ends in toList(), as CLAUDE.md asks.1 parent ed5bf34 commit 7a2bac9
1 file changed
Lines changed: 2 additions & 3 deletions
File tree
- open-java-format/src/main/java/com/palantir/javaformat/java/java14
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
| 227 | + | |
229 | 228 | | |
230 | | - | |
| 229 | + | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
0 commit comments