mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 18:13:36 +07:00
for "Null check can be replaced with method call" inspection GitOrigin-RevId: ffa45cce88afb341cdeb9a49d4ee256251865bfc
14 lines
278 B
Java
14 lines
278 B
Java
// "Replace 'if' statement with 'Stream.ofNullable()' call" "true"
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Stream;
|
|
|
|
class Util {
|
|
Stream method(Stream s) {return s;}
|
|
}
|
|
|
|
class Test {
|
|
public Stream test(Object val) {
|
|
return Util.method(Stream.ofNullable(val));
|
|
}
|
|
} |