mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 20:07:01 +07:00
Fixes IDEA-165482 Optional.isPresent suggests to replace the code which assigns the variable defined outside
14 lines
290 B
Java
14 lines
290 B
Java
// "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;
|
|
}
|
|
}
|