mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-15 11:12:59 +07:00
IDEA-180288 Quick fix breaks code: Optional.ofNullable() with not-null argument
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import java.util.Optional;
|
||||
|
||||
import static java.util.Optional.ofNullable;
|
||||
|
||||
class A{
|
||||
void test(){
|
||||
Optional.of(11);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import static java.util.Optional.*;
|
||||
|
||||
class A{
|
||||
void test(){
|
||||
of(11);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import java.util.Optional;
|
||||
|
||||
import static java.util.Optional.*;
|
||||
|
||||
class A{
|
||||
void of() {}
|
||||
|
||||
void test(){
|
||||
Optional.of(11);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import static java.util.Optional.ofNullable;
|
||||
|
||||
class A{
|
||||
void test(){
|
||||
ofNullable(1<caret>1);
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import static java.util.Optional.*;
|
||||
|
||||
class A{
|
||||
void test(){
|
||||
ofNullable(1<caret>1);
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Replace with '.of()'" "true"
|
||||
import static java.util.Optional.*;
|
||||
|
||||
class A{
|
||||
void of() {}
|
||||
|
||||
void test(){
|
||||
ofNullable(1<caret>1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user