mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 15:35:40 +07:00
Fixes IDEA-179273 Nullability check can be simplified when return type is Optional
11 lines
225 B
Java
11 lines
225 B
Java
// "Replace with Optional.ofNullable() chain" "GENERIC_ERROR_OR_WARNING"
|
|
|
|
class Test {
|
|
String getDefault() {
|
|
return "";
|
|
}
|
|
|
|
String select(String foo) {
|
|
return foo =<caret>= null ? getDefault() : foo.trim();
|
|
}
|
|
} |