mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
Also: pattern variable can be deleted via simple .delete() GitOrigin-RevId: d3523f64d86de28d90b82d7bd98c1fd70567652d
12 lines
387 B
Java
12 lines
387 B
Java
// "Fix all 'Loop can be collapsed with Stream API' problems in file" "true"
|
|
import java.util.List;
|
|
import java.util.ArrayList;
|
|
import java.util.stream.Collectors;
|
|
|
|
class X {
|
|
void test(List<Object> list) {
|
|
List<Object> result = list.stream().filter(o -> getObject(o) instanceof String s && !s.isEmpty()).collect(Collectors.toList());
|
|
}
|
|
|
|
native Object getObject(Object obj);
|
|
} |