Repository navigation
Commit 9e18a06
committed
Use mapMulti instead of flatMap(Optional::stream) in a plugin test
error-prone's StreamFlatMapOptional warned about
.flatMap(Optional::stream) in the IntelliJ plugin's settings page test,
where findCheckBox walks the component tree for the first check box.
It now uses the replacement error-prone suggests,
.<JCheckBox>mapMulti(Optional::ifPresent), which builds no stream per
element; findFirst still stops at the first check box.
The three tests that call findCheckBox pass, as do the plugin's other
tests.1 parent 75a1dbb commit 9e18a06
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
- open-java-format-idea-plugin/src/test/java/com/palantir/javaformat/intellij
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
0 commit comments