mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
LambdaGenerationUtil: disable if expression is accessed for writing
Fixes IDEA-165482 Optional.isPresent suggests to replace the code which assigns the variable defined outside
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// "Replace Optional.isPresent() condition with functional style expression" "false"
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class Main {
|
||||
void assignVariable(Optional<Object> opt) {
|
||||
String s;
|
||||
if(opt.isPre<caret>sent()) {
|
||||
s = opt.get().toString();
|
||||
}
|
||||
String s2 = s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user