mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
Fixes IDEA-179273 Nullability check can be simplified when return type is Optional
9 lines
211 B
Java
9 lines
211 B
Java
// "Replace with Optional.ofNullable() chain" "GENERIC_ERROR_OR_WARNING"
|
|
|
|
import java.util.Optional;
|
|
|
|
class Test {
|
|
String select(String foo, String bar) {
|
|
return Optional.ofNullable(foo).orElse(bar);
|
|
}
|
|
} |