mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 04:07:30 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
14 lines
336 B
Java
14 lines
336 B
Java
// "Replace condition with Stream.ofNullable" "false"
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.IntStream;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Main {
|
|
Stream<Object> getStream(Object[] arr) {
|
|
if<caret>(((arr) == (null))) return Stream.empty();
|
|
else return Stream.of(arr);
|
|
}
|
|
}
|