mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 01:41:11 +07:00
Fixes IDEA-179273 Nullability check can be simplified when return type is Optional
11 lines
253 B
Java
11 lines
253 B
Java
// "Replace with Optional.ofNullable() chain (may change semantics)" "INFORMATION"
|
|
|
|
class Test {
|
|
String trim(String s) {
|
|
return s.isEmpty() ? null : s.trim();
|
|
}
|
|
|
|
String select(String foo) {
|
|
return foo !<caret>= null ? trim(foo) : "";
|
|
}
|
|
} |