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