mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-17 11:40:50 +07:00
use Optional.of() instead ofNullable() in "opt" postfix template when expression is not null
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class Test {
|
||||
@NotNull
|
||||
String foo() {
|
||||
return "";
|
||||
}
|
||||
|
||||
void m() {
|
||||
foo().opt<caret>
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class Test {
|
||||
@NotNull
|
||||
String foo() {
|
||||
return "";
|
||||
}
|
||||
|
||||
void m() {
|
||||
java.util.Optional.of(foo())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user